diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index a5b19dd62b..86b9943f34 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2743,6 +2743,13 @@ SIMYR: foreach my $sim_yr ( @sim_years ) { $log->fatal_error("$useinitvar is being set for you but a $var was not found, so $useinitvar, init_interp_attributes, and finidat must not be set correctly for this configuration in the namelist_default file" ); } } + + # this check has to be here and not earlier since use_init_interp is set here and hillslope is already set above in setup_logic_hillslope + if ( &value_is_true($nl->get_value($useinitvar)) && value_is_true($nl->get_value("use_hillslope")) ) { + $log->warning("WARNING: You have set use_hillslope while $useinitvar is TRUE.\n This means all hillslope columns in a gridcell will read identical values" . + " from initial conditions. If you are sure you want this behaviour:") + } + } # end initial conditions #------------------------------------------------------------------------------- diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 8b2827b069..5424c54352 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -1301,6 +1301,10 @@ sub cat_and_create_namelistinfile { namelst=>"fsurdat='build-namelist_test.pl'", phys=>"clm6_0", }, + "hillslope with init_interp"=>{ options=>"-bgc bgc -envxml_dir .", + namelst=>"use_init_interp=.true.,use_hillslope=.true.", + phys=>"clm6_0", + }, ); foreach my $key ( keys(%warntest) ) { print( "$key\n" ); diff --git a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands index 6f3602d2e6..a2759b51b4 100644 --- a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands @@ -2,3 +2,6 @@ DIN_LOC_ROOT=$(./xmlquery --value DIN_LOC_ROOT) meshfile=$DIN_LOC_ROOT/lnd/clm2/testdata/ESMFmesh_10x15_synthetic_cosphill_1.0.nc ./xmlchange ATM_DOMAIN_MESH=${meshfile},LND_DOMAIN_MESH=${meshfile} + +# -ignore_warnings is needed as long as we don't allow use_hillslope and use_init_interp together +./xmlchange --append CLM_BLDNML_OPTS=-ignore_warnings