Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a namelist warning when hillslope hydrology is used with initial interpolation. #2703

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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

#-------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading