Skip to content

Commit

Permalink
Resolve conflicts of merge toCTSM5.1.dev128
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-peano committed Jun 13, 2023
2 parents b6f2b66 + 5df6c98 commit 5249cc9
Show file tree
Hide file tree
Showing 353 changed files with 8,701 additions and 2,756 deletions.
24 changes: 12 additions & 12 deletions .config_files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
<entry_id>

<!-- This is the same as the default entry in
cime/config/cesm/config_files.xml except for the value for CTSM:
In a standalone CTSM checkout, COMP_ROOT_DIR_LND is $SRCROOT
cime/config/cesm/config_files.xml except for the value for CLM:
In a standalone CLM checkout, COMP_ROOT_DIR_LND is $SRCROOT
rather than $SRCROOT/components/clm.
However, because of the way overrides are handled, we need to
re-specify the full information here rather than just overriding
the value for CTSM.
the value for CLM.
-->
<entry id="COMP_ROOT_DIR_LND">
<type>char</type>
<default_value>unset</default_value>
<values>
<value component="clm" >$SRCROOT</value>
<value component="ctsm" >$SRCROOT</value>
<value component="dlnd" comp_interface="mct">$SRCROOT/components/cpl7/components/data_comps_mct/dlnd</value>
<value component="dlnd" comp_interface="nuopc">$SRCROOT/components/cdeps/dlnd</value>
<value component="slnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_mct/slnd</value>
<value component="xlnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_mct/xlnd</value>
<value component="slnd" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_nuopc/slnd</value>
<value component="xlnd" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_nuopc/xlnd</value>
<value component="clm" >$SRCROOT</value>
<value component="slim" >$SRCROOT/components/slim/</value>
<value component="dlnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/dlnd</value>
<value component="dlnd" comp_interface="nuopc" >$SRCROOT/components/cdeps/dlnd</value>
<value component="slnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/slnd</value>
<value component="slnd" comp_interface="nuopc" >$CIMEROOT/CIME/non_py/src/components/stub_comps_$COMP_INTERFACE/slnd</value>
<value component="xlnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xlnd</value>
<value component="xlnd" comp_interface="nuopc" >$CIMEROOT/CIME/non_py/src/components/xcpl_comps_$COMP_INTERFACE/xlnd</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
<desc>Root directory of the case land model component </desc>
<schema>$CIMEROOT/config/xml_schemas/config_compsets.xsd</schema>
<schema>$CIMEROOT/CIME/data/config/xml_schemas/config_compsets.xsd</schema>
</entry>

</entry_id>
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
# Using pyproject.toml makes sure this testing is consistent with our python directory testing
options: "--check --config python/pyproject.toml"
src: "./python"
# Version should be coordinated with the ctsm_py conda environment under the python directory
# Version should be coordinated with the ctsm_pylib conda environment under the python directory
version: "22.3.0"
16 changes: 8 additions & 8 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ required = True
local_path = components/mosart
protocol = git
repo_url = https://github.com/ESCOMP/MOSART
tag = mosart1_0_47
tag = mosart1_0_48
required = True

[mizuRoute]
Expand All @@ -34,7 +34,7 @@ hash = 34723c2
required = True

[ccs_config]
tag = ccs_config_cesm0.0.38
tag = ccs_config_cesm0.0.64
protocol = git
repo_url = https://github.com/ESMCI/ccs_config_cesm.git
local_path = ccs_config
Expand All @@ -44,33 +44,33 @@ required = True
local_path = cime
protocol = git
repo_url = https://github.com/ESMCI/cime
tag = cime6.0.45
tag = cime6.0.108
required = True

[cmeps]
tag = cmeps0.13.71
tag = cmeps0.14.21
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
local_path = components/cmeps
required = True

[cdeps]
tag = cdeps0.12.65
tag = cdeps1.0.13
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
required = True

[cpl7]
tag = cpl7.0.14
tag = cpl77.0.5
protocol = git
repo_url = https://github.com/ESCOMP/CESM_CPL7andDataComps
local_path = components/cpl7
required = True

[share]
tag = share1.0.13
tag = share1.0.17
protocol = git
repo_url = https://github.com/ESCOMP/CESM_share
local_path = share
Expand All @@ -84,7 +84,7 @@ local_path = libraries/mct
required = True

[parallelio]
tag = pio2_5_7
tag = pio2_5_10
protocol = git
repo_url = https://github.com/NCAR/ParallelIO
local_path = libraries/parallelio
Expand Down
2 changes: 1 addition & 1 deletion Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_path = src/fates
protocol = git
repo_url = https://github.com/NGEET/fates
tag = sci.1.59.7_api.24.1.0
tag = sci.1.65.3_api.25.4.0
required = True

[externals_description]
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ CTSM code management is provided primarily by:
Software engineering team:
- [Erik Kluzek](https://github.com/ekluzek)
- [Bill Sacks](https://github.com/billsacks)
- [Mariana Vertenstein](https://github.com/mvertens)
- [Negin Sobhani](https://github.com/negin513)
- [Sam Levis](https://github.com/slevisconsulting)
- [Adrianna Foster](https://github.com/adrifoster)
- [Sam Rabin](https://github.com/samsrabin)
- [Greg Lemieux](https://github.com/glemieux)
- [Ryan Knox](https://github.com/rgknox)

Science team:
- [Dave Lawrence](https://github.com/dlawrenncar)
- [Will Wieder](https://github.com/wwieder)
- [Danica Lombardozzi](https://github.com/danicalombardozzi)
- [Keith Oleson](https://github.com/olyson)
- [Sean Swenson](https://github.com/swensosc)
- [Mike Barlage](https://github.com/barlage)
- [Jackie Shuman](https://github.com/jkshuman)
- [Peter Lawrence](https://github.com/lawrencepj1)
- [Rosie Fisher](https://github.com/rosiealice)
- Gordon Bonan
82 changes: 75 additions & 7 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1687,11 +1687,6 @@ sub process_namelist_inline_logic {
#############################################
setup_logic_rooting_profile($opts, $nl_flags, $definition, $defaults, $nl);

#############################################
# namelist group: friction_velocity #
#############################################
setup_logic_friction_vel($opts, $nl_flags, $definition, $defaults, $nl);

#############################
# namelist group: cngeneral #
#############################
Expand All @@ -1711,6 +1706,11 @@ sub process_namelist_inline_logic {
#############################################
setup_logic_canopyfluxes($opts, $nl_flags, $definition, $defaults, $nl);

##########################################################
# namelist group: friction_velocity (after canopyfluxes) #
##########################################################
setup_logic_friction_vel($opts, $nl_flags, $definition, $defaults, $nl);

#############################################
# namelist group: canopyhydrology_inparm #
#############################################
Expand Down Expand Up @@ -2491,6 +2491,7 @@ sub setup_logic_dynamic_subgrid {
setup_logic_do_transient_lakes($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_do_transient_urban($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_do_harvest($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_do_grossunrep($opts, $nl_flags, $definition, $defaults, $nl);

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_dynbal_baselines');
if ( &value_is_true($nl->get_value('reset_dynbal_baselines')) &&
Expand Down Expand Up @@ -2836,6 +2837,63 @@ sub setup_logic_do_harvest {

#-------------------------------------------------------------------------------

sub setup_logic_do_grossunrep {
#
# Set do_grossunrep default value, and perform error checking on do_grossunrep
#
# Assumes the following are already set in the namelist (although it's okay
# for them to be unset if that will be their final state):
# - flanduse_timeseries
# - use_cn
# - use_fates
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

my $var = 'do_grossunrep';

# Start by assuming a default value of '.true.'. Then check a number of
# conditions under which do_grossunrep cannot be true. Under these
# conditions: (1) set default value to '.false.'; (2) make sure that the
# value is indeed false (e.g., that the user didn't try to set it to true).

my $default_val = ".false.";

# cannot_be_true will be set to a non-empty string in any case where
# do_grossunrep should not be true; if it turns out that do_grossunrep IS true
# in any of these cases, a fatal error will be generated
my $cannot_be_true = "";

if (string_is_undef_or_empty($nl->get_value('flanduse_timeseries'))) {
$cannot_be_true = "$var can only be set to true when running a transient case (flanduse_timeseries non-blank)";
}
elsif (&value_is_true($nl->get_value('use_fates'))) {
$cannot_be_true = "$var currently doesn't work with FATES";
}
elsif (!&value_is_true($nl->get_value('use_cn'))) {
$cannot_be_true = "$var can only be set to true when running with CN (use_cn = true)";
}

if ($cannot_be_true) {
$default_val = ".false.";
}

if (!$cannot_be_true) {
# Note that, if the variable cannot be true, we don't call add_default
# - so that we don't clutter up the namelist with variables that don't
# matter for this case
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, val=>$default_val);
}

# Make sure the value is false when it needs to be false - i.e., that the
# user hasn't tried to set a true value at an inappropriate time.

if (&value_is_true($nl->get_value($var)) && $cannot_be_true) {
$log->fatal_error($cannot_be_true);
}

}

#-------------------------------------------------------------------------------
sub setup_logic_spinup {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

Expand Down Expand Up @@ -3683,6 +3741,10 @@ sub setup_logic_fire_emis {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

if ($opts->{'fire_emis'} ) {
if ( &value_is_true( $nl_flags->{'use_fates'} ) ) {
$log->warning("Fire emission can NOT be on when FATES is also on.\n" .
" DON'T use the '-fire_emis' option when '-bgc fates' is activated");
}
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_emis_factors_file');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_emis_specifier');
} else {
Expand Down Expand Up @@ -3898,10 +3960,11 @@ sub setup_logic_rooting_profile {
#-------------------------------------------------------------------------------

sub setup_logic_friction_vel {
#
# Must be after canopyfluxes so that use_biomass_heat_storage will be set
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'zetamaxstable' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'zetamaxstable',
'use_biomass_heat_storage'=>$nl_flags->{'use_biomass_heat_storage'}, 'phys'=>$nl_flags->{'phys'} );
}

#-------------------------------------------------------------------------------
Expand All @@ -3926,6 +3989,11 @@ sub setup_logic_canopyfluxes {
if ( &value_is_true($nl->get_value('use_biomass_heat_storage') ) && &value_is_true( $nl_flags->{'use_fates'}) ) {
$log->fatal_error('use_biomass_heat_storage can NOT be set to true when fates is on');
}
if ( &value_is_true($nl->get_value('use_biomass_heat_storage')) ) {
$nl_flags->{'use_biomass_heat_storage'} = ".true.";
} else {
$nl_flags->{'use_biomass_heat_storage'} = ".false.";
}
}

#-------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 5249cc9

Please sign in to comment.