DassHydro / smash

An open source, Python library interfacing the Fortran Spatially distributed Modelling and ASsimilation for Hydrology platform.
https://smash.recover.inrae.fr/
GNU General Public License v3.0
10 stars 5 forks source link

BUG: VIC3L under and overflow #201

Closed inoelloc closed 3 weeks ago

inoelloc commented 1 month ago

In some cases, the states of the reservoirs in the VIC3L hydrological module is greater than 1 or less than 0. Under and over flow checks should be added to compensate for machine inaccuracies if the reservoir is very full or almost empty in vic3l_infiltration subroutine

! % Avoid under and overflow
husl = min(0.999999_sp, husl)
husl = max(1e-6_sp, husl)
hmsl = min(0.999999_sp, hmsl)
hmsl = max(1e-6_sp, hmsl)