Skip to content

Commit

Permalink
Add clm51 namelist defaults for crop_residue_removal_frac and tillage…
Browse files Browse the repository at this point in the history
…_mode
  • Loading branch information
slevis-lmwg committed Jan 18, 2024
1 parent 1ca0860 commit b3a05fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,7 @@ sub setup_logic_crop_inparm {
'use_crop'=>$nl->get_value('use_crop') );

my $crop_residue_removal_frac = $nl->get_value('crop_residue_removal_frac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'crop_residue_removal_frac' );
if ( $crop_residue_removal_frac < 0.0 or $crop_residue_removal_frac > 1.0 ) {
$log->fatal_error("crop_residue_removal_frac must be in range [0, 1]");
}
Expand All @@ -2276,6 +2277,8 @@ sub setup_logic_crop_inparm {
sub setup_logic_tillage {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'tillage_mode' );

my $tillage_mode = remove_leading_and_trailing_quotes( $nl->get_value( "tillage_mode" ) );
if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl->get_value('use_crop')) ) {
$log->fatal_error( "Tillage only works on crop columns, so use_crop must be true if tillage is enabled." );
Expand Down
3 changes: 3 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<use_grainproduct use_crop=".true." phys="clm5_1" >.true.</use_grainproduct> <!-- 1-year grain product pool default to on for clm50 if crop is turned on -->

<crop_residue_removal_frac>0.d+0</crop_residue_removal_frac>
<crop_residue_removal_frac phys="clm5_1">0.5d00</crop_residue_removal_frac>

<!-- Crop model options -->
<baset_mapping use_crop=".true." phys="clm4_5" >constant</baset_mapping>
Expand Down Expand Up @@ -2814,6 +2815,8 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<!-- ========================================= -->

<tillage_mode>off</tillage_mode>
<tillage_mode phys="clm5_1">low</tillage_mode>

<use_original_tillage_phases>.false.</use_original_tillage_phases>
<max_tillage_depth>0.26d00</max_tillage_depth>

Expand Down

0 comments on commit b3a05fa

Please sign in to comment.