Skip to content

Commit

Permalink
pass physics and proper defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdebolskiy committed Jul 29, 2024
1 parent 88adda4 commit 6d07a80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ sub process_namelist_inline_logic {
#################################
# namelist group: exice_streams #
#################################
setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv);

##########################################
# namelist group: clm_temperature_inparm #
Expand Down Expand Up @@ -2322,7 +2322,6 @@ sub setup_logic_soilstate {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'organic_frac_squared' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_bedrock',
'use_fates'=>$nl_flags->{'use_fates'}, 'vichydro'=>$nl_flags->{'vichydro'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice'); # excess ice flag should be read before stream vars

my $var1 = "soil_layerstruct_predefined";
my $var2 = "soil_layerstruct_userdefined";
Expand Down Expand Up @@ -4583,7 +4582,8 @@ sub setup_logic_exice {
#
# excess ice streams
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
my $use_exice = $nl->get_value( 'use_excess_ice' );
my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' );
my $finidat = $nl->get_value('finidat');
Expand Down Expand Up @@ -4642,10 +4642,13 @@ sub setup_logic_coldstart_temp {

# set initial temperatures for excess ice gridcells:

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

my $use_exice = $nl->get_value( 'use_excess_ice' );

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_temp',
'use_excess_ice'=>$use_exice);
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'excess_ice_coldstart_depth',
'use_excess_ice'=>$use_exice);

my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' );
my $exice_cs_temp = $nl->get_value( 'excess_ice_coldstart_temp' );
my $exice_cs_depth = $nl->get_value( 'excess_ice_coldstart_depth' );
Expand Down
4 changes: 2 additions & 2 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2058,8 +2058,8 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c
<!-- ========================================= -->

<use_excess_ice>.false.</use_excess_ice>
<excess_ice_coldstart_temp>0.0</excess_ice_coldstart_temp>
<excess_ice_coldstart_depth>1.0</excess_ice_coldstart_depth>
<excess_ice_coldstart_temp>-1.0</excess_ice_coldstart_temp>
<excess_ice_coldstart_depth>0.5</excess_ice_coldstart_depth>
<excess_ice_coldstart_temp use_excess_ice=".true.">-3.15</excess_ice_coldstart_temp>
<excess_ice_coldstart_depth use_excess_ice=".true.">0.5</excess_ice_coldstart_depth>
<stream_fldfilename_exice use_excess_ice=".true.">lnd/clm2/paramdata/exice_init_0.125x0.125_c20220516.nc</stream_fldfilename_exice>
Expand Down

0 comments on commit 6d07a80

Please sign in to comment.