Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for soil layer temperatures when soil thermal nodes do not reach bottom of soil column. #467
This change is relatively minor. This addresses #377, at least for 5.0. The error in #377 was reported for 4.2.c, even when FROZEN_SOIL was FALSE. I was not able to reproduce this error in 5.0 unless FROZEN_SOIL was TRUE. What happens is: if the bottom of the lowest soil layer is deeper than the soil thermal damping depth (dp), and if FROZEN_SOIL is true, then when the model attempts to estimate layer ice content via estimate_layer_ice_content(), it encounters a layer for which soil thermal nodes do not cover the entire layer. In this case, VIC would abort.
The thing is, if the log_err() call were removed, the logic in estimate_layer_ice_content() would actually work fine: the temperature of the deepest node would be used for all depths below it. So, my fix here was simply to remove the log_err() call.