OpenCDSS / ArkDSS-Colors-of-Water

Colorado's Decision Support Systems (CDSS) ArkDSS Colors of Water Model Engine code
GNU General Public License v3.0
2 stars 5 forks source link

StateTL - output fix/enhancement for calibration #22

Closed kelleythompson closed 2 years ago

kelleythompson commented 2 years ago

B&C identified two issues when attempting to first attempting to run the code prepared for calibration. First, results didn't change when input parameters were changed. Second, dates in the multiyear gage/observation files were not changing per the year. Also, reading the output into their python/calibration process, they preferred output to be in columns instead of rows. Furthermore, they also thought they would prefer output in long row format (ie date, id, value) rather than in a matrix (ie one date column and columns of values at different ids). Finally, the team thought they might like a more discrete output of the gain/loss/error term to evaluate this term in relation to calibration (this can currently be output by subreach but maybe better just by reach).

kelleythompson commented 2 years ago

Code bugs were fixed; ie output results not changing and multiyear dates in gage output not showing correct year. Also, calibration output was reoriented from row to column and an option was provided in the control file to orient output as a matrix or as single columns. An additional option was also added to the control file to output the gain/loss/error term on a reach basis - if this is done in a simulation run then it will output both the calculated gains/losses but also the averaged (median) gain/losses uses for simulation. Two additional option controls that were in the code were also put into the control file which were the window size in days to average (median) the gains/losses for simulation and also the option to output simulation statistics in a file separate from the simulated flow data. Both the gain/loss and statistic output was currently turned off in the control file entered into github but can easily be turned on in the control file for evaluation.

Therefore, the new options in the control file as they are currently set are: outputcalregr=0; %output calibration stats file if doing calibration loop outputgain=0; %output gain/loss/error term by reach (gage location) outputmat=0; %0 output is rows of date,id,value (larger size), 1 output is matrix with id in header, first column is date, and subsequent columns are values for each location/id gainsavgwindowdays=14; %window size in days if using movingavg or median for gains/losses in calibration; 14days will avg 1 week before and after point; also using in bank storage method to average gains for evaporation calc

The other output; additional river flow based output and water class output both based on subreach rather than reach; has not yet been reoriented from row to column; but it will be soon and committed to this issue. However, the changing of this other output will have no effect on calibration efforts (so calibration code development can continue without it).

kelleythompson commented 2 years ago

Rick and Mark - for the columnar output I see you are currently using WDID - I initially had in this last push as the station abbreviation that is easy for Div2 staff etc to recognize. But I'll quick change that to WDID and repush - just a second.