diff --git a/include/SW_datastructs.h b/include/SW_datastructs.h index 85054f750..a6baab1a6 100644 --- a/include/SW_datastructs.h +++ b/include/SW_datastructs.h @@ -404,7 +404,6 @@ typedef struct { `swrcp` but we need to loop over soil layers for every vegetation type in `my_transp_rng` */ - /** SWRC parameters of the mineral soil component */ double swrcpMineralSoil[MAX_LAYERS][SWRC_PARAM_NMAX]; /** SWRC parameters of the organic soil component diff --git a/src/SW_Site.c b/src/SW_Site.c index ab9f739a8..9fe43221b 100644 --- a/src/SW_Site.c +++ b/src/SW_Site.c @@ -230,6 +230,12 @@ static Bool SW_check_soil_properties( fval = SW_Site->soils.fractionWeight_om[layerno]; errtype = Str_Dup("organic matter content", LogInfo); + } else if (LT(SW_Site->soils.evap_coeff[layerno], 0.) || + GT(SW_Site->soils.evap_coeff[layerno], 1.)) { + res = swFALSE; + fval = SW_Site->soils.fractionWeight_om[layerno]; + errtype = Str_Dup("organic matter content", LogInfo); + } else if (LT(SW_Site->soils.evap_coeff[layerno], 0.) || GT(SW_Site->soils.evap_coeff[layerno], 1.)) { res = swFALSE; @@ -2561,7 +2567,7 @@ void SW_SIT_init_run( /* Check parameters of bulk soil SWRC */ if (!SWRC_check_parameters( - SW_Site->swrc_type[s], SW_Site->soils.swrcp[s], LogInfo + SW_Site->swrc_type[s], SW_Site->swrcpMineralSoil[s], LogInfo )) { LogError( LogInfo,