Request to eliminate unnecessary unit conversions of soil moisture thresholds (primarily soil_con.resid_moist, but there are other occurrences too). The key is to make the units of soil_con.resid_moist be [mm], for consistency with other soil moisture thresholds.
Currently, the soil_con terms max_moist, Wcr, and Wpwp, have units of [mm] but resid_moist has units of [mm/mm]. Every time resid_moist is used in the model physics, it is first multiplied by depth * MM_PER_M for consistency with soil moisture units. Not only is this needless extra computation, but it also makes debugging and modification of the code needlessly difficult. Furthermore, it requires adding depth as an argument to various functions for the sole purpose of appearing in the unit conversion. There are also a few instances in which other soil moisture thresholds have their units converted needlessly (either other variables with the desired units already exist, or the units actually get converted BACK again before use!).
This will be backwards-compatible as the conversion to [mm] can happen in the driver code once, immediately after reading the parameters.
soil_con.resid_moist
, but there are other occurrences too). The key is to make the units ofsoil_con.resid_moist
be [mm], for consistency with other soil moisture thresholds.soil_con
termsmax_moist
,Wcr
, andWpwp
, have units of [mm] butresid_moist
has units of [mm/mm]. Every timeresid_moist
is used in the model physics, it is first multiplied bydepth * MM_PER_M
for consistency with soil moisture units. Not only is this needless extra computation, but it also makes debugging and modification of the code needlessly difficult. Furthermore, it requires addingdepth
as an argument to various functions for the sole purpose of appearing in the unit conversion. There are also a few instances in which other soil moisture thresholds have their units converted needlessly (either other variables with the desired units already exist, or the units actually get converted BACK again before use!).