Skip to content

Commit b70cab7

Browse files
authored
Merge branch 'b4b-dev' into fix-generate_gdd20_baseline
2 parents b60c83a + d42e9df commit b70cab7

File tree

61 files changed

+1225
-850
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1225
-850
lines changed

.gitmodules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
[submodule "fates"]
2929
path = src/fates
3030
url = https://github.com/NGEET/fates
31-
fxtag = sci.1.88.0_api.42.0.0
31+
fxtag = sci.1.89.0_api.43.0.0
3232
fxrequired = AlwaysRequired
3333
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
3434
fxDONOTUSEurl = https://github.com/NGEET/fates
3535

3636
[submodule "cism"]
3737
path = components/cism
3838
url = https://github.com/ESCOMP/CISM-wrapper
39-
fxtag = cismwrap_2_2_010
39+
fxtag = cismwrap_2_2_011
4040
fxrequired = ToplevelRequired
4141
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
4242
fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
@@ -68,15 +68,15 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
6868
[submodule "ccs_config"]
6969
path = ccs_config
7070
url = https://github.com/ESMCI/ccs_config_cesm.git
71-
fxtag = ccs_config_cesm1.0.61_add_domain_ne3np4.pg2_1
71+
fxtag = ccs_config_cesm1.0.66
7272
fxrequired = ToplevelRequired
7373
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
7474
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
7575

7676
[submodule "cime"]
7777
path = cime
7878
url = https://github.com/ESMCI/cime
79-
fxtag = cime6.1.144
79+
fxtag = cime6.1.145
8080
fxrequired = ToplevelRequired
8181
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
8282
fxDONOTUSEurl = https://github.com/ESMCI/cime

WhatsNewInCTSM5.4.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# What's new in CTSM 5.4 (tag `ctsm5.4.0xx`)
1+
# What's new in CTSM 5.4 (tag `ctsm5.4.002`)
22

33
# Purpose and description of changes since CTSM 5.3 (tag `ctsm5.3.021`)
44

@@ -37,21 +37,23 @@ Changes to defaults for \`clm6\` physics:
3737
* See “Changes to FATES and the FATES parameter file” below.
3838
* Namelist defaults change so that
3939
* use\_c13/use\_c14 are on only for HistClm60Bgc compsets with CRUJRA2024 or CAM7 forcing; examples of when use\_c13/use\_c14 are now off include SSP and single-point compsets, as well as cases using older forcings, such as CAM6, GSWP3v1, Qian, and CRUv7
40-
* when use\_c13 or use\_c14 is on, turn on the corresponding time series file
40+
* when use\_c13 or use\_c14 is on, turn on the corresponding time series file (responding to the CLM_CMIP_ERA flag)
41+
* C13/C14 CMIP7 data is done using streams with new namelist variables (stream_*_atm_c13, stream_*_atm_c14)
4142
* irrigation is on for transient cases (1850-2000, 1850-2100, but not for clm4\_5).
4243

4344
Changes for all physics versions:
4445

4546
* Parameters updated: Added MIMICS parameter \`mimics\_fi\` (fraction of litter inputs that bypass litter pools, directly contributing to SOM) and updated other MIMICS parameters (https://github.com/ESCOMP/CTSM/pull/2365) to remove NPP control on turnover, fix density dependent control on turnover, add litterfall fluxes that bypass litter pools and contribute directly to soil organic matter.
4647
* FATES parameter file updated: ([PR \#2965](https://github.com/ESCOMP/CTSM/pull/2965), [PR \#2904](https://github.com/ESCOMP/CTSM/pull/2904), [PR \#1344](https://github.com/NGEET/fates/pull/1344), [PR \#3087](https://github.com/ESCOMP/CTSM/pull/3087)). See “FATES parameter file” section below for details.
4748
* New surface datasets and landuse timeseries files (see “surface datasets” section below).
49+
* CMIP7 C13/C14 atmospheric timeseries data
4850

4951
## Heads up
5052

5153
* History tapes now split into two files from hX to hXi and hXa, where X is the tape number (e.g. h0i/h0a) and where "i" stands for history file containing instantaneous fields, while "a" stands for history file containing non-instantaneous fields. Details in the “history files” section below and in the PRs https://github.com/ESCOMP/ctsm/pull/2445 https://github.com/ESCOMP/MOSART/pull/117 https://github.com/ESCOMP/RTM/pull/61 and the corresponding issues.
5254
* Adding time to 1d weighting fields in transient simulations PR https://github.com/ESCOMP/CTSM/pull/3328
5355
* Regarding CMIP7 vs. CMIP6 inputs:
54-
* We supply only CMIP7 C13/C14 isotope datasets, so these get used regardless of CLM\_CMIP\_ERA setting.
56+
* C13/C14 isotope datasets are the new CMIP7 datasets using streams, while when CLM_CMIP_ERA==cmip6, the older cmip6 files are used
5557
* We supply only CMIP7 population density with clm6 physics in non-SSP cases, because the fire model is calibrated to that; conversely, we supply only CMIP6 population density for pre-clm6 physics and for SSP cases.
5658
* We supply only CESM2 nitrogen deposition (ndep), so this gets used regardless of CLM\_CMIP\_ERA setting.
5759
* For DATM we supply only CMIP6 aerosols.
@@ -147,4 +149,3 @@ The former is calculated as a function of the latter and can be time-evolving de
147149
* ne30 with \`Clm60BgcCropCruJra\`: https://github.com/NCAR/LMWG_dev/issues/123 (123\_HIST\_popDens)
148150
* ne30 SP https://github.com/NCAR/LMWG_dev/issues/126
149151
* f09 SP https://github.com/NCAR/LMWG_dev/issues/127
150-

bld/CLMBuildNamelist.pm

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ SYNOPSIS
6060
Create the namelist for CLM
6161
REQUIRED OPTIONS
6262
-cimeroot "directory" Path to cime directory
63+
-landroot "directory" Path to the land models parent directory, ie <>/ctsm
6364
-config "filepath" Read the given CLM configuration cache file.
6465
Default: "config_cache.xml".
6566
-configuration "cfg" The overall configuration being used [ clm | nwp ]
@@ -259,6 +260,7 @@ sub process_commandline {
259260
$nl_flags->{'cmdline'} = "@ARGV\n";
260261

261262
my %opts = ( cimeroot => undef,
263+
landroot => undef,
262264
config => "config_cache.xml",
263265
configuration => undef,
264266
csmdata => undef,
@@ -300,6 +302,7 @@ sub process_commandline {
300302

301303
GetOptions(
302304
"cimeroot=s" => \$opts{'cimeroot'},
305+
"landroot=s" => \$opts{'landroot'},
303306
"driver=s" => \$opts{'driver'},
304307
"clm_demand=s" => \$opts{'clm_demand'},
305308
"co2_ppmv=f" => \$opts{'co2_ppmv'},
@@ -3779,15 +3782,14 @@ sub setup_logic_c_isotope {
37793782
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c14_bombspike', 'use_c14'=>$use_c14 );
37803783
$use_c14_bombspike = $nl->get_value('use_c14_bombspike');
37813784
if ( &value_is_true($use_c14_bombspike) ) {
3782-
if ( defined($stream_fldfilename_atm_c14) ) {
3783-
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c14_bombspike" );
3784-
setup_logic_c14_streams($opts, $nl_flags, $definition, $defaults, $nl);
3785-
} else {
3785+
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c14_bombspike" );
3786+
setup_logic_c14_streams($opts, $nl_flags, $definition, $defaults, $nl);
3787+
$stream_fldfilename_atm_c14 = $nl->get_value('stream_fldfilename_atm_c14');
3788+
if ( ! defined($stream_fldfilename_atm_c14) ) {
37863789
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c14_filename',
37873790
'use_c14'=>$use_c14, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c14_bombspike'=>$nl->get_value('use_c14_bombspike'),
3788-
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
3791+
'ssp_rcp'=>$nl_flags->{'ssp_rcp'}, 'cmip_era'=>$nl_flags->{'cmip_era'} );
37893792
}
3790-
$stream_fldfilename_atm_c14 = $nl->get_value('stream_fldfilename_atm_c14');
37913793
$atm_c14_filename = $nl->get_value('atm_c14_filename');
37923794
if ( defined($stream_fldfilename_atm_c14) && defined($atm_c14_filename) ) {
37933795
$log->fatal_error("Both stream_fldfilename_atm_c14 and atm_c14_filename set, only one should be set");
@@ -3809,15 +3811,14 @@ sub setup_logic_c_isotope {
38093811
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_c13_timeseries', 'use_c13'=>$use_c13 );
38103812
$use_c13_timeseries = $nl->get_value('use_c13_timeseries');
38113813
if ( &value_is_true($use_c13_timeseries) ) {
3812-
if ( defined($stream_fldfilename_atm_c13) ) {
3813-
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13_timeseries" );
3814-
setup_logic_c13_streams($opts, $nl_flags, $definition, $defaults, $nl);
3815-
} else {
3814+
&add_logical_to_nl_flags( $nl_flags, $nl, "use_c13_timeseries" );
3815+
setup_logic_c13_streams($opts, $nl_flags, $definition, $defaults, $nl);
3816+
$stream_fldfilename_atm_c13 = $nl->get_value('stream_fldfilename_atm_c13');
3817+
if ( ! defined($nl->get_value('stream_fldfilename_atm_c13')) ) {
38163818
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'atm_c13_filename',
38173819
'use_c13'=>$use_c13, 'use_cn'=>$nl_flags->{'use_cn'}, 'use_c13_timeseries'=>$nl->get_value('use_c13_timeseries'),
38183820
'ssp_rcp'=>$nl_flags->{'ssp_rcp'} );
38193821
}
3820-
$stream_fldfilename_atm_c13 = $nl->get_value('stream_fldfilename_atm_c13');
38213822
$atm_c13_filename = $nl->get_value('atm_c13_filename');
38223823
if ( defined($stream_fldfilename_atm_c13) && defined($atm_c13_filename) ) {
38233824
$log->fatal_error("Both stream_fldfilename_atm_c13 and atm_c13_filename set, only one should be set");
@@ -3859,7 +3860,11 @@ sub setup_logic_c13_streams {
38593860

38603861
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_atm_c13',
38613862
'use_c13'=>$nl_flags->{'use_c13'}, 'use_c13_timeseries'=>$nl_flags->{'use_c13_timeseries'},
3862-
'ssp_rcp'=>$nl_flags->{'ssp_rcp'});
3863+
'ssp_rcp'=>$nl_flags->{'ssp_rcp'}, 'cmip_era'=>$nl_flags->{'cmip_era'}, 'nofail'=>1);
3864+
# If stream_fldfilename_atm_c13 is not defined then return and get the cmip6 file format version
3865+
if ( ! defined( $nl->get_value( "stream_fldfilename_atm_c13") ) ) {
3866+
return;
3867+
}
38633868

38643869
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_atm_c13',
38653870
'sim_year'=>$nl_flags->{'sim_year'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'});
@@ -3885,13 +3890,16 @@ sub setup_logic_c14_streams {
38853890

38863891
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_atm_c14',
38873892
'use_c14'=>$nl_flags->{'use_c14'}, 'use_c14_bombspike'=>$nl_flags->{'use_c14_bombspike'},
3888-
'ssp_rcp'=>$nl_flags->{'ssp_rcp'});
3893+
'ssp_rcp'=>$nl_flags->{'ssp_rcp'}, 'nofail'=>1);
3894+
# If stream_fldfilename_atm_c14 is not defined then return and get the cmip6 file format version
3895+
if ( ! defined( $nl->get_value( "stream_fldfilename_atm_c14") ) ) {
3896+
return;
3897+
}
38893898

3890-
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_meshfile_atm_c14',
3899+
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_meshfile_atm_c14',
38913900
'use_c14'=>$nl_flags->{'use_c14'}, 'use_c14_bombspike'=>$nl_flags->{'use_c14_bombspike'});
38923901
if ( &remove_leading_and_trailing_quotes( $nl->get_value( "stream_meshfile_atm_c14") ) eq "none" ) {
3893-
# TODP: Change this to a fatal when we start using this
3894-
$log->warning( "stream_meshfile_atm_c14 is set to 'none' which will only copy the first latitude to the globe")
3902+
$log->fatal_error( "stream_meshfile_atm_c14 is set to 'none' which will only copy the first latitude to the globe")
38953903
}
38963904

38973905
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_year_first_atm_c14',
@@ -4493,10 +4501,12 @@ sub setup_logic_cropcal_streams {
44934501
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_swindow_start');
44944502
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_swindow_end');
44954503
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_cultivar_gdds',
4504+
'cropcals_rx'=>$cropcals_rx,
4505+
'cropcals_rx_adapt'=>$cropcals_rx_adapt,
44964506
'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'}
44974507
);
44984508
if ( &value_is_true($cropcals_rx_adapt) ) {
4499-
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_gdd20_baseline', 'stream_gdd20_seasons'=>$stream_gdd20_seasons);
4509+
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldFileName_gdd20_baseline', 'stream_gdd20_seasons'=>$stream_gdd20_seasons, 'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'});
45004510
}
45014511
}
45024512

@@ -5573,17 +5583,22 @@ sub add_default {
55735583
# The default values for input pathnames are relative. If the namelist
55745584
# variable is defined to be an absolute pathname, then prepend
55755585
# the CESM inputdata root directory.
5576-
if (not defined $settings{'no_abspath'}) {
5577-
if (defined $settings{'set_abspath'}) {
5578-
$val = set_abs_filepath($val, $settings{'set_abspath'});
5579-
} else {
5580-
if ($is_input_pathname eq 'abs') {
5581-
$val = set_abs_filepath($val, $inputdata_rootdir);
5582-
if ( $test_files and ($val !~ /null|none/) and (! -f "$val") ) {
5583-
$log->fatal_error("file not found: $var = $val");
5584-
}
5585-
}
5586-
}
5586+
if ($is_input_pathname eq 'landroot') {
5587+
#my $landroot = $opts->{'landroot'};
5588+
$val = set_abs_filepath($val,$opts->{'landroot'});
5589+
} else {
5590+
if (not defined $settings{'no_abspath'}) {
5591+
if (defined $settings{'set_abspath'}) {
5592+
$val = set_abs_filepath($val, $settings{'set_abspath'});
5593+
} else {
5594+
if ($is_input_pathname eq 'abs') {
5595+
$val = set_abs_filepath($val, $inputdata_rootdir);
5596+
if ( $test_files and ($val !~ /null|none/) and (! -f "$val") ) {
5597+
$log->fatal_error("file not found: $var = $val");
5598+
}
5599+
}
5600+
}
5601+
}
55875602
}
55885603

55895604
# query the definition to find out if the variable takes a string value.

0 commit comments

Comments
 (0)