GLM
GLM copied to clipboard
multiple crest height updates
This PR addresses the following
- overland flow through a weir was calculated as m3/s instead of the m3/day that is required by the do_single_outflow function. The PR fixes this by adding a new internal variable called
day_fractionthat is the proportion of a day that cover by the current day of the simulation. A mid-night to mid-night simulation has a day_fraction = 1.0. day_fraction can be multiplied by the number of seconds in a day to get the number of seconds in the current day of the simulation. - seepage was also m3/s so needed to be coverted to m3/day
- there was a check as initalization that compare the height of the top layer to the crest elevation. The checked needed to compare to the max elevation since it is possible to have water higher than a weir elevation (which is what the crest elevation represents).
Addresses #51
I fixed another issue where multiple values for the same time-step would occur in the netcdf output when starting on non 00:00 hours (so the last day was not a full day).
This PR now includes an additional write_output step that occurs before the daily loop. This allows the initial conditions to be reflected in the model output.
@casper-boon @matthipsey Don't forget this PR as you move to version 4.