Skip to content

Commit

Permalink
Merge pull request ESCOMP#2888 from ESCOMP/cesm3_0_beta04_changes
Browse files Browse the repository at this point in the history
Testing cleanup from the cesm3_0_beta03/04 "chill" tags for cesm3_0_beta05
  • Loading branch information
ekluzek authored Dec 3, 2024
2 parents 2307c15 + cfdac04 commit 1d824b8
Show file tree
Hide file tree
Showing 86 changed files with 941 additions and 547 deletions.
30 changes: 15 additions & 15 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -60,67 +60,67 @@ fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
[submodule "mizuRoute"]
path = components/mizuRoute
url = https://github.com/ESCOMP/mizuRoute
fxtag = cesm-coupling.n02_v2.1.2
fxtag = cesm-coupling.n02_v2.1.3
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute

[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.0
fxtag = ccs_config_cesm1.0.10
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git

[submodule "cime"]
path = cime
url = https://github.com/ESMCI/cime
fxtag = cime6.0.246
fxtag = cime6.1.37
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/cime

[submodule "cmeps"]
path = components/cmeps
url = https://github.com/ESCOMP/CMEPS.git
fxtag = cmeps0.14.77
fxtag = cmeps1.0.16
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git

[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.48
fxtag = cdeps1.0.53
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git

[submodule "share"]
path = share
url = https://github.com/ESCOMP/CESM_share
fxtag = share1.0.19
fxtag = share1.1.2
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share

[submodule "mct"]
path = libraries/mct
url = https://github.com/MCSclimate/MCT
fxtag = MCT_2.11.0
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/MCSclimate/MCT

[submodule "parallelio"]
path = libraries/parallelio
url = https://github.com/NCAR/ParallelIO
fxtag = pio2_6_2
fxtag = pio2_6_3
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NCAR/ParallelIO

[submodule "mpi-serial"]
path = libraries/mpi-serial
url = https://github.com/ESMCI/mpi-serial
fxtag = MPIserial_2.5.1
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial

[submodule "doc-builder"]
path = doc/doc-builder
url = https://github.com/ESMCI/doc-builder
Expand Down
38 changes: 22 additions & 16 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ REQUIRED OPTIONS
(if read they allow user_nl_clm and CLM_BLDNML_OPTS to expand
variables [for example to use \$DIN_LOC_ROOT])
(default current directory)
-lnd_frac "domainfile" Land fraction file (the input domain file) (needed for LILAC)
-lnd_frac "domainfile" Land fraction file (the input domain file) (only needed with --lilac option)
-res "resolution" Specify horizontal grid. Use nlatxnlon for spectral grids;
dlatxdlon for fv grids (dlat and dlon are the grid cell size
in degrees for latitude and longitude respectively)
Expand Down Expand Up @@ -678,6 +678,18 @@ sub setup_cmdl_chk_res {
}
}

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

sub begins_with
{
# Arguments: long-string, substring
# For an input long-string check if it starts with the substring
# For example, if a string like NEON_PRISM starts with NEON
return substr($_[0], 0, length($_[1])) eq $_[1];
}

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

sub setup_cmdl_resolution {
my ($opts, $nl_flags, $definition, $defaults, $envxml_ref) = @_;

Expand Down Expand Up @@ -713,7 +725,7 @@ sub setup_cmdl_resolution {
$nl_flags->{'neon'} = ".false.";
$nl_flags->{'neonsite'} = "";
if ( $nl_flags->{'res'} eq "CLM_USRDAT" ) {
if ( $opts->{'clm_usr_name'} eq "NEON" ) {
if ( begins_with($opts->{'clm_usr_name'}, "NEON") ) {
$nl_flags->{'neon'} = ".true.";
$nl_flags->{'neonsite'} = $envxml_ref->{'NEONSITE'};
$log->verbose_message( "This is a NEON site with NEONSITE = " . $nl_flags->{'neonsite'} );
Expand Down Expand Up @@ -1989,7 +2001,7 @@ sub setup_logic_lnd_frac {
"env variables) AND fatmlndfrac on namelist");
}
if ( $opts->{$var} =~ /UNSET/ ) {
$log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist set it with the env variables: LND_DOMAIN_PATH/LND_DOMAIN_FILE.");
$log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist, it's required with the --lilac option");
}
my $lnd_frac = SetupTools::expand_xml_var( $opts->{$var}, $envxml_ref);
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fatmlndfrc','val'=>$lnd_frac );
Expand All @@ -1999,20 +2011,22 @@ sub setup_logic_lnd_frac {
if (defined $nl->get_value('fatmlndfrc')) {
# do nothing - use value provided by config_grid.xml and clm.cpl7.template
} else {
$log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist.");
$log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist, it is required for the --lilac option.");
}
#
# For the NUOPC driver neither lnd_frac nor fatmlndfrc need to be set
#
} else {
} elsif ($opts->{'driver'} eq "nuopc" ) {
if ( defined($opts->{$var}) ) {
if ( $opts->{$var} !~ /UNSET/ ) {
$log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused" );
$log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused (only used by the --lilac option)" );
}
}
if ( defined($nl->get_value('fatmlndfrc')) ) {
$log->fatal_error("fatmlndfrac should NOT be set in the namelist for the NUOPC driver as it is unused" );
}
} else {
$log->fatal_error("Input --driver type of $opts->{'driver'} is an invalid option. Correct this in xml variable COMP_iINTERFACE in your case" );
}
}

Expand Down Expand Up @@ -2113,7 +2127,7 @@ sub setup_logic_roughness_methods {
my $phys = $physv->as_string();
if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) {
if ( $var eq "Meier2022" ) {
$log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm5_1 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file");
$log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm6_0 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file");
}
}
}
Expand Down Expand Up @@ -2757,7 +2771,7 @@ SIMYR: foreach my $sim_yr ( @sim_years ) {
# 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, even if the initial conditions (finidat) file has hillslope information. If you are sure you want this behaviour, add -ignore_warnings to CLM_BLDNML_OPTS.")
}
}

} # end initial conditions

Expand Down Expand Up @@ -4751,8 +4765,6 @@ sub setup_logic_fates {
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_inventory_init is set" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$fname does NOT point to a valid filename" );
}
}
}
Expand Down Expand Up @@ -4783,8 +4795,6 @@ sub setup_logic_fates {
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_luh is set and use_fates_potentialveg is false" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$var does NOT point to a valid filename" );
}
}
}
Expand All @@ -4797,8 +4807,6 @@ sub setup_logic_fates {
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when use_fates_luh and use_fates_fixed_biogeog is set" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$var does NOT point to a valid filename" );
}
}
}
Expand Down Expand Up @@ -4840,8 +4848,6 @@ sub setup_logic_fates {
my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) );
if ( ! defined($nl->get_value($var)) ) {
$log->fatal_error("$var is required when fates_harvest_mode is landuse_timeseries" );
} elsif ( ! -f "$fname" ) {
$log->fatal_error("$var does NOT point to a valid filename" );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions bld/config_files/clm_phys_vers.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use bigint;
#use warnings;
#use diagnostics;

my @version_strings = ("clm4_5", "clm5_0", "clm5_1", "clm6_0");
my @version_strings = ("clm4_5", "clm5_0", "clm6_0");

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

Expand Down Expand Up @@ -88,7 +88,7 @@ if ( ! defined(caller) && $#ARGV == -1 ) {
sub testit {
print "unit tester\n";
my %lastv;
my @vers_list = ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" );
my @vers_list = ( "clm4_5", "clm5_0", "clm6_0" );
foreach my $vers ( @vers_list ) {
my $phys = config_files::clm_phys_vers->new($vers);
isa_ok($phys, "config_files::clm_phys_vers", "created clm_phys_vers object");
Expand Down
4 changes: 2 additions & 2 deletions bld/config_files/config_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<config_definition>

<entry id="phys"
valid_values="clm4_5,clm5_0,clm5_1,clm6_0"
valid_values="clm4_5,clm5_0,clm6_0"
value="clm4_5"
category="physics">
Specifies either clm4_5, clm5_0, clm5_1 (deprecated), or clm6_0 physics
Specifies either clm4_5, clm5_0, or clm6_0 physics
</entry>

<entry id="clm_root"
Expand Down
Loading

0 comments on commit 1d824b8

Please sign in to comment.