|
1 | 1 | # rscripts-modeleval |
2 | 2 |
|
3 | 3 | WRF_Hydro model evaluation R scripts. |
| 4 | + |
| 5 | +# Main control script |
| 6 | + |
| 7 | +TO BE DETERMINED |
| 8 | + |
| 9 | +# Process Masks |
| 10 | + |
| 11 | +Create properly formatted mask objects: |
| 12 | +* Update the parameters in urg_process_MASKS.R: |
| 13 | + * Optional info to process existing mask files |
| 14 | + * Pathname to the high-res grid and aggregation factor if creating from scratch |
| 15 | + * Output R dataset filename |
| 16 | +* The script will create a number of mask objects: |
| 17 | + * msk.List - the basin mask matrices |
| 18 | + * msk.areaList - the total area of each basin |
| 19 | + * msk.nameList |
| 20 | + * msk.minInds |
| 21 | + * msk.maxInds |
| 22 | + * msk.countInds |
| 23 | + where mskgeo are masks at the geogrid resolution and maskhyd are masks at the high-res routing resolution |
| 24 | +* The script also stores any relevant lookup tables (that you must manually specify) |
| 25 | + |
| 26 | +# Process Observations |
| 27 | + |
| 28 | +Download and prep observations. See: |
| 29 | +* urg_prep_AMF.R |
| 30 | +* urg_prep_SNOTEL.R |
| 31 | +* urg_prep_MET.R |
| 32 | +* urg_prep_STR.R |
| 33 | + |
| 34 | +# Process Model Output |
| 35 | + |
| 36 | +1. Read in model output |
| 37 | +* Update the parameters in the urg_modelreads_ALL.R: |
| 38 | + * Path to the model output directory |
| 39 | + * Path to the forcing data (if needed) |
| 40 | + * Pathname for the output R dataset |
| 41 | + * Suffix to add to the objects to identify them |
| 42 | + * Options to run |
| 43 | +* Run the urg_modelreads_ALL.R script. |
| 44 | +* The script will create a new R dataset with "raw" data objects. Possible objects (depending on which options you choose): |
| 45 | + * modFrxstout - streamflow time series |
| 46 | + * modGwout - groundwater outflow time series |
| 47 | + * modLdasin - climate forcings |
| 48 | + * modLdasout - LSM output |
| 49 | + * Objects will be appended with "_BAS" for basin means and "_SNO" for point values. |
| 50 | + |
| 51 | +2. Process the model output by basin: |
| 52 | +* Update the parameters in the urg_process_BASIN.R: |
| 53 | + * Pathname to the raw dataset from step 1 |
| 54 | + * Pathname for the output R dataset |
| 55 | + * Suffixes to process (all or some subset of those from step 1) |
| 56 | + * Dates that each of the model runs stopped putting out meaningful data (in case the model ran out with static forcings) |
| 57 | + * Start date to restrict the output data to (applies to all models) |
| 58 | + * Start and end dates to restrict the full stats calcs |
| 59 | + * Start and end dates to restrict the subset stats calcs |
| 60 | +* Feed the R dataset created in step 1 into this processing function. |
| 61 | +* The script will create a new R dataset with processed data objects at the basin scale. The objects will be same as in step 1 with new fields added. New objects include: |
| 62 | + * stats_str - summary statistics for each model run |
| 63 | + * stats_str_all - combined object with summary statistics for all runs |
| 64 | + |
| 65 | +3. Process the model output by station: |
| 66 | +* Update the parameters in the urg_process_SNOTEL.R: |
| 67 | + * Pathname to the raw dataset from step 1 |
| 68 | + * Pathname for the output R dataset |
| 69 | + * Suffixes to process (all or some subset of those from step 1) |
| 70 | + * Dates that each of the model runs stopped putting out meaningful data (in case the model ran out with static forcings) |
| 71 | + * Start date to restrict the output data to (applies to all models) |
| 72 | + * Start and end dates to restrict the full stats calcs |
| 73 | + * Start and end dates to restrict the subset stats calcs |
| 74 | + * Options to run |
| 75 | +* Feed the R dataset created in step 1 into this processing function. |
| 76 | +* The script will create a new R dataset with processed data objects at the point station scale. The objects will be same as in step 1 with new fields added. New objects include: |
| 77 | + * .metd - objects as above but aggregated to the MET station day |
| 78 | + * .snod - objects as above but aggregated to the SNOTEL station day |
| 79 | + * stats_met_all - combined summary statistics for each model run compared to the MET stations |
| 80 | + * stats_sno_all - combined summary statistics for each model run compared to the SNOTEL stations |
| 81 | + |
| 82 | +4. Create plots: |
| 83 | +* Update the parameters in urg_plots_BASIN.R or urg_plots_SNOTEL.R: |
| 84 | + * Pathname to the processed R dataset |
| 85 | + * Pathname to the directory to output plots |
| 86 | + * Start and end date to restrict the plots |
| 87 | +* Run the plot script to generate plot images. NOTE: plot function are stored in a separate R script file that is sourced by this script. This file specifies the loops over basins/sites, the plot function calls and the file exports. |
| 88 | + |
0 commit comments