UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
260 stars 383 forks source link

Bug in VIC5 canopy_evap spare_transp calculation #910

Open BramDr opened 3 years ago

BramDr commented 3 years ago

Dear Mr/Ms,

After staring at some of my model results for a few days now I have found a bug in the calculation of spare_transp in the canopy_evap function (version VIC.5.0.1 - latest release)

Line 350 of canopy_evap should be: spare_transp += transp (double) root[i] (1.0 - gsm_inv); Note the "+" in "+=". Otherwise, spare transpiration would not be recorded if a lower layer did not have any spare transpiration. This was the case for me where excessive irrigation (for testing) would result in a empty upper soil layer, but a full lower soil layer. This would subsequently reduce transpiration as the spare transpiration was not redistributed (and transpiration went down while there was no water stress).

How such as small thing can give a huge headache ;) I've fixed it on my repository, but maybe you can fix it in this repository.

Cheers!