|
1 |
| -# Prepare Spatial Data (scripts not provided) |
2 |
| -This step instructs you to collect 3 gis files and use them to generate 2 tables. All 5 files (3 gis files and 2 |
3 |
| -tables) should go in the `gis_inputs` directory |
| 1 | +# Processing Input Data |
4 | 2 |
|
5 |
| -1. Clip model drainage lines and catchments shapefile to extents of the region of interest. |
6 |
| - For speed/efficiency, merge their attribute tables and save as a csv. |
7 |
| - - read drainage line shapefile and with GeoPandas |
8 |
| - - delete all columns ***except***: NextDownID, COMID, Tot_Drain_, order_ |
9 |
| - - rename the columns: |
10 |
| - - NextDownID -> downstream_model_id |
11 |
| - - COMID -> model_id |
12 |
| - - Tot_Drain -> drainage_area |
13 |
| - - order_ -> stream_order |
14 |
| - - compute the x and y coordinates of the centroid of each feature (needs the geometry column) |
15 |
| - - delete geometry column |
16 |
| - - save as `drain_table.csv` in the `gis_inputs` directory |
| 3 | +Before following these steps, you should have prepared the required datasets and organized them in a working directory. |
| 4 | +Refer to the [Required Datasets](../data/index.md) page for more information. |
17 | 5 |
|
18 |
| -Tip to compute the x and y coordinates using geopandas |
| 6 | +***Prereqs:*** |
19 | 7 |
|
| 8 | +1. Create a working directory and subdirectories |
| 9 | +2. Prepare the `drain_table` and `gauge_table` files. |
| 10 | +3. Prepare the `hindcast_series_table` file. |
20 | 11 |
|
21 |
| -Your table should look like this: |
| 12 | +## Prepare Flow Duration Curve Data |
22 | 13 |
|
23 |
| -| downstream_model_id | model_id | model_drain_area | stream_order | x | y | |
24 |
| -|---------------------|-----------------|------------------|--------------|-----|-----| |
25 |
| -| unique_stream_# | unique_stream_# | area in km^2 | stream_order | ## | ## | |
26 |
| -| unique_stream_# | unique_stream_# | area in km^2 | stream_order | ## | ## | |
27 |
| -| unique_stream_# | unique_stream_# | area in km^2 | stream_order | ## | ## | |
28 |
| -| ... | ... | ... | ... | ... | ... | |
29 |
| - |
30 |
| -1. Prepare a csv of the attribute table of the gauge locations shapefile. |
31 |
| - - You need the columns: |
32 |
| - - model_id |
33 |
| - - gauge_id |
34 |
| - - drainage_area (if known) |
35 |
| - |
36 |
| -Your table should look like this (column order is irrelevant): |
37 |
| - |
38 |
| -| model_id | gauge_drain_area | gauge_id | |
39 |
| -|-------------------|------------------|------------------| |
40 |
| -| unique_stream_num | area in km^2 | unique_gauge_num | |
41 |
| -| unique_stream_num | area in km^2 | unique_gauge_num | |
42 |
| -| unique_stream_num | area in km^2 | unique_gauge_num | |
43 |
| -| ... | ... | ... | |
44 |
| - |
45 |
| -# Prepare Discharge Data |
46 |
| - |
47 |
| -This step instructs you to gather simulated data and observed data. The raw simulated data (netCDF) and raw observed |
48 |
| -data (csvs) should be included in the `data_inputs` folder. You may keep them in another location and provide the path |
49 |
| -as an argument in the functions that need it. These datasets are used to generate several additional csv files which |
50 |
| -are stored in the `data_processed` directory and are used in later steps. The netCDF file may have any name and the |
51 |
| -directory of observed data csvs should be called `obs_csvs`. |
52 |
| - |
53 |
| -Use the dat |
54 |
| - |
55 |
| -1. Create a single large csv of the historical simulation data with a datetime column and 1 column per stream segment labeled by the stream's ID number. |
56 |
| - |
57 |
| -| datetime | model_id_1 | model_id_2 | model_id_3 | |
58 |
| -|------------|------------|------------|------------| |
59 |
| -| 1979-01-01 | 50 | 50 | 50 | |
60 |
| -| 1979-01-02 | 60 | 60 | 60 | |
61 |
| -| 1979-01-03 | 70 | 70 | 70 | |
62 |
| -| ... | ... | ... | ... | |
63 |
| - |
64 |
| -2. Process the large simulated discharge csv to create a 2nd csv with the flow duration curve on each segment (script provided). |
| 14 | +Process the `hindcast_series_table` to create a 2nd table with the flow duration curve on each segment. |
65 | 15 |
|
66 | 16 | | p_exceed | model_id_1 | model_id_2 | model_id_3 |
|
67 | 17 | |----------|------------|------------|------------|
|
68 | 18 | | 100 | 0 | 0 | 0 |
|
69 |
| -| 99 | 10 | 10 | 10 | |
70 |
| -| 98 | 20 | 20 | 20 | |
| 19 | +| 97.5 | 10 | 10 | 10 | |
| 20 | +| 95 | 20 | 20 | 20 | |
71 | 21 | | ... | ... | ... | ... |
|
72 | 22 |
|
73 |
| -3. Process the large historical discharge csv to create a 3rd csv with the monthly averages on each segment (script provided). |
| 23 | +Then process the FDC data to create a 3rd table with scaled/transformed FDC data for each segment. |
74 | 24 |
|
75 |
| -| month | model_id_1 | model_id_2 | model_id_3 | |
76 |
| -|-------|------------|------------|------------| |
77 |
| -| 1 | 60 | 60 | 60 | |
78 |
| -| 2 | 30 | 30 | 30 | |
79 |
| -| 3 | 70 | 70 | 70 | |
80 |
| -| ... | ... | ... | ... | |
| 25 | +| model_id | Q100 | Q97.5 | Q95 | |
| 26 | +|----------|------|-------|-----| |
| 27 | +| 1 | 60 | 50 | 40 | |
| 28 | +| 2 | 60 | 50 | 40 | |
| 29 | +| 3 | 60 | 50 | 40 | |
| 30 | +| ... | ... | ... | ... | |
0 commit comments