Skip to content

Commit

Permalink
Warn user if nc-inputs provide SWRCp while a pedotransfer function is…
Browse files Browse the repository at this point in the history
… activated

- clarify description of swrc-related inputs in "siteparam.in"
- fix "swrcp" ncTestRuns
  • Loading branch information
dschlaep committed Dec 20, 2024
1 parent 6f9325a commit df50686
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 70 deletions.
38 changes: 24 additions & 14 deletions src/SW_netCDF_Input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ static void checkRequiredSoils(
char *tempWritePtr;
int writeSize = MAX_FILENAMESIZE;
int tmp;
int nSWRCInputs;
int k;
const int nRequired1Var = 4;
int required1Vars[4] = {
Expand All @@ -1091,6 +1092,24 @@ static void checkRequiredSoils(
const int nSuggested1Vars = 2;
int suggested1Vars[2] = {eiv_impermeability, eiv_avgLyrTempInit};


/* Count number of input SWRCp */
nSWRCInputs = 0;
for (k = 0; k < SWRC_PARAM_NMAX; k++) {
nSWRCInputs += (int) readInVarsSoils[eiv_swrcpMS[k] + 1];
}

/* Warn user if both PTF and any SWRCp nc-input are turned on */
if (!inputsProvideSWRCp && nSWRCInputs > 0) {
LogError(
LogInfo,
LOGWARN,
"Requested pedotransfer function will overwrite "
"provided SWRCp inputs: activate one or the other but not both."
);
}


/* Check that we have sufficient soil inputs */
if (hasConsistentSoilLayerDepths) {
/* Note: SW_NCIN_soilProfile() warns if any soil nc-input has
Expand Down Expand Up @@ -1179,20 +1198,11 @@ static void checkRequiredSoils(
}

// Required: all SWRCp required unless estimated via PTF
if (inputsProvideSWRCp) {
tmp = 0;
for (k = 0; k < SWRC_PARAM_NMAX; k++) {
tmp += (int) readInVarsSoils[eiv_swrcpMS[k] + 1];
}
if (tmp != SWRC_PARAM_NMAX) {
tempWritePtr = (char *) sw_memccpy(
writePtr,
"all SWRC parameters are required; ",
'\0',
writeSize
);
writeSize -= (int) (tempWritePtr - soilErrorMsg - 1);
}
if (inputsProvideSWRCp && nSWRCInputs != SWRC_PARAM_NMAX) {
tempWritePtr = (char *) sw_memccpy(
writePtr, "all SWRC parameters are required; ", '\0', writeSize
);
writeSize -= (int) (tempWritePtr - soilErrorMsg - 1);
}

if (writeSize != MAX_FILENAMESIZE) {
Expand Down
16 changes: 9 additions & 7 deletions tests/example/Input/siteparam.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ RCP85
# Note: option "Campbell1974"/"Cosby1984AndOthers" was hard-coded < v7.0.0
# Note: `rSOILWAT2` may implement additional PTFs

Campbell1974 # Specify soil water retention curve
Cosby1984AndOthers # Specify pedotransfer function
# (if not implemented, then provide SWRC parameters via "swrc_params.in")

0 # Has SWRC parameters for the mineral soil component (see `has_swrcp`)?
# 0: Estimate with specified pedotransfer function
# 1: Use values from "swrc_params.in"
Campbell1974 # Specify soil water retention curve
Cosby1984AndOthers # Specify pedotransfer function
# * if not implemented, then provide SWRC parameters
# as inputs via "swrc_params.in" and/or "swrcp.nc")

0 # Are SWRC parameters for the mineral soil component
# provided as inputs (see `has_swrcp`)?
# 0: Estimate with specified pedotransfer function
# 1: Use inputs from "swrc_params.in" and/or "swrcp.nc"


#---- Transpiration regions
Expand Down
92 changes: 46 additions & 46 deletions tests/ncTestRuns/data-raw/metadata_testRuns.csv
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
id,testrun,tag,comment,expectation,domainType,domainCRS,domainSize,domainSubset,domainLonConvention,domainShift,inputType,inputCRS,inputSize,expectIndexLookup,inWeather,calendarWeather,simStartYear,simEndYear,pft,inputVarType,inputDimOrder,inputSoilProfile,inputsProvideSWRCp
1,1,dom-s-1-geog_in-s-geog-1,example,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
2,5,dom-s-1-proj_in-s-geog-1,SpatialCombination-5,success,s,projected,1,NA,NA,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
3,11,dom-xy-1x1-geog_in-xy-geog-1x1,SpatialCombination-11,success,xy,geographic,1x1,NA,180,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
4,15,dom-xy-1x1-proj_in-xy-geog-1x1,SpatialCombination-15,success,xy,projected,1x1,NA,NA,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
5,2,dom-s-1-geog_in-s-proj,SpatialCombination-2,error,s,geographic,1,NA,180,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
6,3,dom-s-1-geog_in-xy-geog-1x1,SpatialCombination-3,success,s,geographic,1,NA,180,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
7,4,dom-s-1-geog_in-xy-proj-1x1,SpatialCombination-4,error,s,geographic,1,NA,180,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
8,6,dom-s-1-proj_in-s-proj,SpatialCombination-6,success,s,projected,1,NA,NA,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
9,7,dom-s-1-proj_in-xy-geog-1x1,SpatialCombination-7,success,s,projected,1,NA,NA,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
10,8,dom-s-1-proj_in-xy-proj-1x1,SpatialCombination-8,success,s,projected,1,NA,NA,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
11,9,dom-xy-1x1-geog_in-s-geog,SpatialCombination-9,error,xy,geographic,1x1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
12,10,dom-xy-1x1-geog_in-s-proj,SpatialCombination-10,error,xy,geographic,1x1,NA,180,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
13,12,dom-xy-1x1-geog_in-xy-proj-1x1,SpatialCombination-12,error,xy,geographic,1x1,NA,180,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
14,13,dom-xy-1x1-proj_in-s-geog,SpatialCombination-13,error,xy,projected,1x1,NA,NA,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
15,14,dom-xy-1x1-proj_in-s-proj,SpatialCombination-14,error,xy,projected,1x1,NA,NA,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
16,16,dom-xy-1x1-proj_in-xy-proj-1x1,SpatialCombination-16,success,xy,projected,1x1,NA,NA,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
17,17,dom-s-1-geog_in-s-geog-1-noleap,noleap calendar,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,noleap,1980,2010,dim,double,standard,standard,FALSE
18,18,dom-s-1-geog_in-s-geog-1-allleap,allleap calendar,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,allleap,1980,2010,dim,double,standard,standard,FALSE
19,19,dom-s-1-geog_in-s-geog-1-float,float instead of double as input,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,float,standard,standard,FALSE
20,24,dom-xy-3x2-geog_in-xy-geog-3x2,gridded geographic,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
21,25,dom-xy-3x2-geog-shifted_in-xy-geog-3x2,gridded geographic shifted out-of-inputs,error,xy,geographic,3x2,NA,180,10;5,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
22,26,dom-xy-3x2-proj_in-xy-proj-3x2,gridded projected,success,xy,projected,3x2,NA,NA,NA,xy,projected,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
23,27,dom-xy-3x2-proj-subset_in-xy-proj-3x2,gridded projected subset,success,xy,projected,3x2,3;5,NA,NA,xy,projected,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
24,20,dom-xy-1x2-geog_in-xy-geog-3x2,gridded+lookup geographic,success,xy,geographic,1x2,NA,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
25,21,dom-xy-1x2-geog-lon360_in-xy-geog-3x2,gridded+lookup geographic lon0-360,success,xy,geographic,1x2,NA,360,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
26,22,dom-xy-1x2-proj_in-xy-proj-3x2,gridded+lookup projected,success,xy,projected,1x2,NA,NA,NA,xy,projected,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
27,23,dom-xy-1x2-proj-lon360_in-xy-geog-3x2,gridded+lookup projected lon0-360,success,xy,projected,1x2,NA,360,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
28,28,dom-xy-3x2-geog_in-xy-geog-3x2-pftvar,pft as variable instead dimension,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,var,double,standard,standard,FALSE
29,29,dom-xy-3x2-geog_in-xy-geog-3x2-mixdim,"gridded geographic, mixed order of input dimensions",success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,mix,standard,FALSE
30,30,dom-xy-3x2-geog_in-xy-geog-3x2-soillayers,variable number of soil layers,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerNumber,FALSE
31,31,dom-xy-3x2-geog_in-xy-geog-3x2-soildepths,variable soil layer thickness,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerThickness,FALSE
32,32,dom-xy-3x2-geog_in-xy-geog-3x2-swrcp,input SWRCp,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,TRUE
33,37,dom-s-6-geog_in-s-geog-6,site geographic,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
34,38,dom-s-6-geog_in-s-geog-6-pftvar,pft as variable instead dimension,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,var,double,standard,standard,FALSE
35,39,dom-s-6-geog_in-s-geog-6-mixdim,"site geographic, mixed order of input dimensions",success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,mix,standard,FALSE
36,40,dom-s-6-geog_in-s-geog-6-soillayers,variable number of soil layers,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerNumber,FALSE
37,41,dom-s-6-geog_in-s-geog-6-soildepths,variable soil layer thickness,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerThickness,FALSE
38,41,dom-s-6-geog_in-s-geog-6-swrcp,input SWRCp,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,standard,TRUE
39,34,dom-s-6-geog_in-xy-geog-3x2,site-gridded geographic,success,s,geographic,6,NA,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
40,35,dom-s-6-geog-shifted_in-xy-geog-3x2,site-gridded geographic shifted out-of-inputs,error,s,geographic,6,NA,180,10;5,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
41,36,dom-s-6-geog-subset_in-xy-geog-3x2,site-gridded geographic subset,success,s,geographic,6,3;5,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
42,37,dom-s-6-proj_in-xy-proj-3x2,site-gridded projected,success,s,projected,6,NA,NA,NA,xy,projected,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,FALSE
43,43,dom-xy-3x2-geog_in-xy-geog-gridMET-3x2,gridMET,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,gridMET,NA,1980,2010,dim,double,standard,standard,FALSE
44,44,dom-xy-3x2-geog_in-xy-geog-MACAv2METDATA-3x2,MACAv2METDATA,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,MACAv2METDATA,NA,1980,2005,dim,double,standard,standard,FALSE
45,45,dom-xy-3x2-geog_in-xy-geog-Daymet-3x2,Daymet-geographic,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,Daymet,NA,1980,2010,dim,double,standard,standard,FALSE
46,46,dom-xy-3x2-proj_in-xy-proj-Daymet-3x2,Daymet-projected,success,xy,projected,3x2,NA,NA,NA,xy,projected,3x2,1,Daymet,NA,1980,2010,dim,double,standard,standard,FALSE
1,1,dom-s-1-geog_in-s-geog-1,example,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
2,5,dom-s-1-proj_in-s-geog-1,SpatialCombination-5,success,s,projected,1,NA,NA,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
3,11,dom-xy-1x1-geog_in-xy-geog-1x1,SpatialCombination-11,success,xy,geographic,1x1,NA,180,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
4,15,dom-xy-1x1-proj_in-xy-geog-1x1,SpatialCombination-15,success,xy,projected,1x1,NA,NA,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
5,2,dom-s-1-geog_in-s-proj,SpatialCombination-2,error,s,geographic,1,NA,180,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
6,3,dom-s-1-geog_in-xy-geog-1x1,SpatialCombination-3,success,s,geographic,1,NA,180,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
7,4,dom-s-1-geog_in-xy-proj-1x1,SpatialCombination-4,error,s,geographic,1,NA,180,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
8,6,dom-s-1-proj_in-s-proj,SpatialCombination-6,success,s,projected,1,NA,NA,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
9,7,dom-s-1-proj_in-xy-geog-1x1,SpatialCombination-7,success,s,projected,1,NA,NA,NA,xy,geographic,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
10,8,dom-s-1-proj_in-xy-proj-1x1,SpatialCombination-8,success,s,projected,1,NA,NA,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
11,9,dom-xy-1x1-geog_in-s-geog,SpatialCombination-9,error,xy,geographic,1x1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
12,10,dom-xy-1x1-geog_in-s-proj,SpatialCombination-10,error,xy,geographic,1x1,NA,180,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
13,12,dom-xy-1x1-geog_in-xy-proj-1x1,SpatialCombination-12,error,xy,geographic,1x1,NA,180,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
14,13,dom-xy-1x1-proj_in-s-geog,SpatialCombination-13,error,xy,projected,1x1,NA,NA,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
15,14,dom-xy-1x1-proj_in-s-proj,SpatialCombination-14,error,xy,projected,1x1,NA,NA,NA,s,projected,1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
16,16,dom-xy-1x1-proj_in-xy-proj-1x1,SpatialCombination-16,success,xy,projected,1x1,NA,NA,NA,xy,projected,1x1,0,sw2,standard,1980,2010,dim,double,standard,standard,no
17,17,dom-s-1-geog_in-s-geog-1-noleap,noleap calendar,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,noleap,1980,2010,dim,double,standard,standard,no
18,18,dom-s-1-geog_in-s-geog-1-allleap,allleap calendar,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,allleap,1980,2010,dim,double,standard,standard,no
19,19,dom-s-1-geog_in-s-geog-1-float,float instead of double as input,success,s,geographic,1,NA,180,NA,s,geographic,1,0,sw2,standard,1980,2010,dim,float,standard,standard,no
20,24,dom-xy-3x2-geog_in-xy-geog-3x2,gridded geographic,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,no
21,25,dom-xy-3x2-geog-shifted_in-xy-geog-3x2,gridded geographic shifted out-of-inputs,error,xy,geographic,3x2,NA,180,10;5,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
22,26,dom-xy-3x2-proj_in-xy-proj-3x2,gridded projected,success,xy,projected,3x2,NA,NA,NA,xy,projected,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,no
23,27,dom-xy-3x2-proj-subset_in-xy-proj-3x2,gridded projected subset,success,xy,projected,3x2,3;5,NA,NA,xy,projected,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,no
24,20,dom-xy-1x2-geog_in-xy-geog-3x2,gridded+lookup geographic,success,xy,geographic,1x2,NA,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
25,21,dom-xy-1x2-geog-lon360_in-xy-geog-3x2,gridded+lookup geographic lon0-360,success,xy,geographic,1x2,NA,360,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
26,22,dom-xy-1x2-proj_in-xy-proj-3x2,gridded+lookup projected,success,xy,projected,1x2,NA,NA,NA,xy,projected,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
27,23,dom-xy-1x2-proj-lon360_in-xy-geog-3x2,gridded+lookup projected lon0-360,success,xy,projected,1x2,NA,360,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
28,28,dom-xy-3x2-geog_in-xy-geog-3x2-pftvar,pft as variable instead dimension,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,var,double,standard,standard,no
29,29,dom-xy-3x2-geog_in-xy-geog-3x2-mixdim,"gridded geographic, mixed order of input dimensions",success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,mix,standard,no
30,30,dom-xy-3x2-geog_in-xy-geog-3x2-soillayers,variable number of soil layers,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerNumber,no
31,31,dom-xy-3x2-geog_in-xy-geog-3x2-soildepths,variable soil layer thickness,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerThickness,no
32,32,dom-xy-3x2-geog_in-xy-geog-3x2-swrcp,input SWRCp,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,0,sw2,standard,1980,2010,dim,double,standard,standard,yes
33,37,dom-s-6-geog_in-s-geog-6,site geographic,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,standard,no
34,38,dom-s-6-geog_in-s-geog-6-pftvar,pft as variable instead dimension,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,var,double,standard,standard,no
35,39,dom-s-6-geog_in-s-geog-6-mixdim,"site geographic, mixed order of input dimensions",success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,mix,standard,no
36,40,dom-s-6-geog_in-s-geog-6-soillayers,variable number of soil layers,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerNumber,no
37,41,dom-s-6-geog_in-s-geog-6-soildepths,variable soil layer thickness,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,variableSoilLayerThickness,no
38,41,dom-s-6-geog_in-s-geog-6-swrcp,input SWRCp,success,s,geographic,6,NA,180,NA,s,geographic,6,0,sw2,standard,1980,2010,dim,double,standard,standard,yes
39,34,dom-s-6-geog_in-xy-geog-3x2,site-gridded geographic,success,s,geographic,6,NA,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
40,35,dom-s-6-geog-shifted_in-xy-geog-3x2,site-gridded geographic shifted out-of-inputs,error,s,geographic,6,NA,180,10;5,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
41,36,dom-s-6-geog-subset_in-xy-geog-3x2,site-gridded geographic subset,success,s,geographic,6,3;5,180,NA,xy,geographic,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
42,37,dom-s-6-proj_in-xy-proj-3x2,site-gridded projected,success,s,projected,6,NA,NA,NA,xy,projected,3x2,1,sw2,standard,1980,2010,dim,double,standard,standard,no
43,43,dom-xy-3x2-geog_in-xy-geog-gridMET-3x2,gridMET,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,gridMET,NA,1980,2010,dim,double,standard,standard,no
44,44,dom-xy-3x2-geog_in-xy-geog-MACAv2METDATA-3x2,MACAv2METDATA,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,MACAv2METDATA,NA,1980,2005,dim,double,standard,standard,no
45,45,dom-xy-3x2-geog_in-xy-geog-Daymet-3x2,Daymet-geographic,success,xy,geographic,3x2,NA,180,NA,xy,geographic,3x2,1,Daymet,NA,1980,2010,dim,double,standard,standard,no
46,46,dom-xy-3x2-proj_in-xy-proj-Daymet-3x2,Daymet-projected,success,xy,projected,3x2,NA,NA,NA,xy,projected,3x2,1,Daymet,NA,1980,2010,dim,double,standard,standard,no
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ for (k0 in seq_len(nrow(listTestRuns))) {
#--- ..** inSoil: set ncinputs.tsv ------
toggleNCInputTSV(filename = fname_ncintsv, inkeys = "inSoil", value = 1L)

if (!identical(listTestRuns[k0, "inputsProvideSWRCp", drop = TRUE], "TRUE")) {
if (!identical(listTestRuns[k0, "inputsProvideSWRCp", drop = TRUE], "yes")) {
# Deactivate inputs from SWRCp
toggleNCInputTSV(
filename = fname_ncintsv,
Expand Down Expand Up @@ -1651,11 +1651,11 @@ for (k0 in seq_len(nrow(listTestRuns))) {
)
}

if (identical(listTestRuns[k0, "inputsProvideSWRCp", drop = TRUE], "TRUE")) {
if (identical(listTestRuns[k0, "inputsProvideSWRCp", drop = TRUE], "yes")) {
# Activate inputs from SWRCp
setTxtInput(
filename = fname,
tag = "# Has SWRC parameters for the mineral soil component",
tag = "# Are SWRC parameters for the mineral soil component",
value = 1L, # change to 1 from default 0
classic = TRUE
)
Expand Down

0 comments on commit df50686

Please sign in to comment.