-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Level-pool persistence #295
Comments
#259 would close this |
Peristence-Level Pool Hybrid Module(This documentation will go here) General Purpose and FunctionalityThe purpose of this module is to persist observed reservoir discharges in order to improve the accuracy of discharge predictions. This module simultaneously runs the Level Pool module to calculate a release at each timestep. The observed discharge and the calculated level pool release are each multiplied by a fractional weight and then summed to give a final calculated release. The fractional weights are determined by the length of model time between the observed discharge and the current release calculation. For example, if a release is calculated 12 hours in model time after an observation is read, then a weight of 1.0 might be applied to this observed discharge, and a corresponding weight of 0.0 would be applied to the level pool calculated release. The resulting summed release would be the same as the observed discharge. If a release is calculated 5 days in model time after an observation is read, then a weight of 0.2 might be applied to the observed discharge, and a corresponding weight of 0.8 would be applied to the level pool calculated release. These weighted values would then be summed to give a final release. If observations are missing or are not good quality for a given time window, then full weight of 1.0 is given to the level pool release. Partial autocorrelation is performed in advance from historical reservoir data to determine the appropriate weights for each reservoir. These weights are read in from a reservoir persistence parameter file whenever a reservoir of this type is initialized. Before the final calculated release/outflow is returned from this module back to the model at each timestep, mass balance checks are performed to ensure the calculated release does not cause the reservoir storage to fall below the minimum or exceed the max, and the release is modified accordingly. Input ParametersThis module requires five input parameters that are set in hydro.namelist.
Module ArchitectureThis module builds off of the same class structure and architecture of the Level Pool module. As in Level Pool, each reservoir in this module is instantiated into an object at model initialization. The Persistence_Level_Pool_Hybrid directory contains module_persistence_levelpool_hybrid.F, module_persistence_levelpool_hybrid.F, module_persistence_levelpool_hybrid_parameters.F, module_persistence_levelpool_hybrid_state.F, module_persistence_levelpool_hybrid_tests.F, and a Makefile. The module_persistence_levelpool_hybrid.F module defines and instantiates objects for a hybrid persistence levelpool type reservoir. The module_RT.F module will call and pass parameters to the constructor in this module to instantiate the hybrid reservoir object and its sub-objects. The hybrid reservoir struct inherits input and output stucts from the reservoir base module and calls instantiation of these into sub-objects. The hybrid reservoir struct also points to structs for hybrid parameters and state and calls instantiation of these into sub-objects. A pointer to a levelpool reservoir object is also held in state, and this module instantiates that levelpool object. There is also a subroutine to run hybrid release that is derived from the reservoir base struct interface to run release. The release function will periodically call a function in module_read_timeslice_data.F that will read a timeslice file and return a corresponding observed discharge. The timeslice files will be read at a particular update time. The first hybrid reservoir on each processor to reach an update time will call the function to read the timeslice files, and the resulting observations will be used by each reservoir on that processor. The release function also peforms the functionality described above including calling level pool release along with weighting and combining that release with the weighted observed discharge, and finally calling mass balance checks before returning the release/outflow back to the model. The module_persistence_levelpool_hybrid_parameters.F module defines and instantiates objects for a hybrid type reservoir's parameters/properties. Parameters holds static/unchanging variables that are set when the given reservoir object is initialized/instantiated. The module_persistence_levelpool_hybrid_state.F module defines and instantiates objects for a hybrid type reservoir's state. State holds and tracks dynamic/changing variables that are only relevant to the given hybrid reservoir object and not other modules or areas of the system. The module_persistence_levelpool_hybrid_tests.F module holds unit tests that test for all components of a hybrid reservoir are properly initialized. Within the Reservoirs directory, the module_read_timeslice_data.F module reads USGS timeslice files to get gage discharge values that will be used by reservoirs. Future development will either expand this module or replicate its functionality to another module to read in other forms of observation and forecast data. An observation lookback period is passed in to determine how far back in time from the current model time the module will look for timeslice files. The observation resolution determines the time increments the module will look back. For instance, a standard lookback period would be 18 hours with an observation resolution of 15 minutes, where a model current time of 8:00 PM would search for timeslice files at every 15 minute increment between 2:00 AM and 8:00 PM that day. The module will first search for the most recent timeslice files and grab the discharge for a particular lake/reservoir if the gage quality standard is met at that time. If a gage discharge is missing or if the gage quality standard is not met for any particular lake/reservoir in the given timeslice file, the module will continue to look back at every observation resolution increment until either all lakes/reservoirs have a good quality discharge or the end of the lookback period is reached. The total lookback seconds from current model time that the discharge is read will also be returned. Also within the Reservoirs directory, the module_reservoir_utilities.F module contains multiple functions used by the Hybrid module. The modify_for_projected_storage function is called from the hybrid release function and modifies the outflow if a projected storage falls below the minimum or exceeds the maximum for the reservoir. There are also multiple functions used for reading variables from the reservoir persistence parameter and timeslice NetCDF files. TestingTo compile and run the unit tests, go to the Reservoir directory in the terminal and type
and hit enter. Then type
and hit enter. The user should see "All Reservoir Tests Passed". |
This is feature development.
This issue is opened to build the documentation for the new feature.
The text was updated successfully, but these errors were encountered: