casadoj / lisflood-reservoirs

An analysis of possible improvements in the reservoir representation in the hydrological model LISFLOOD Open Source.
GNU General Public License v3.0
0 stars 0 forks source link

Implement a routine like that in Turner et al. 2020 #6

Closed casadoj closed 1 month ago

casadoj commented 2 months ago

https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2020WR027902

casadoj commented 1 month ago

I've converted into Python the R code in the repository starfit. The new code is in lisfloodreservoirs.models.starfit.

That repository includes the funcions to fit the harmonic curves of both storage limits and release, but it lacks the implementation of the reservoir routine.

casadoj commented 1 month ago

I have created the class Starfit that inherits the superclass Basemodel. It must be fed with the parameters fitted with fit_storage() and fit_release(), and it simulates the reservoir operation with its method simulate().

Special care is needed with the units. The functions that fit the Starfit model use hm3 for volume and hm3/week for fluxes. However, in the simulation we would like to have the same units as the rest of the reservoir models, i.e., m3 for volume and m3/s for fluxes. Some of the fitted parameters need to be converted into those latter units.

casadoj commented 1 month ago

Done