Skip to content

Commit bafe717

Browse files
committed
Merge branch 'master' into fates_fuel_refactor
2 parents 228cbda + 16cf4ac commit bafe717

File tree

129 files changed

+2026
-4596
lines changed

Some content is hidden

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

129 files changed

+2026
-4596
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ aa04d1f7d86cc2503b98b7e2b2d84dbfff6c316b
5151
1a49e547ba3c48fa483f9ae81a8f05adcd6b888c
5252
045d90f1d80f713eb3ae0ac58f6c2352937f1eb0
5353
753fda3ff0147837231a73c9c728dd9ce47b5997
54+
f112ba0bbf96a61d5a4d354dc0dcbd8b0c68145c

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ ctsm.input_data_list.previous
8585
# mksurfdata unit tests
8686
unit_test_build
8787

88-
# Tools executables
89-
/tools/mkprocdata_map/mkprocdata_map
90-
9188
# run_neon output directories
9289
/tools/site_and_regional/listing.csv
9390
/tools/site_and_regional/????/

README

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
$CTSMROOT/README 04/19/2023
1+
$CTSMROOT/README 09/05/2024
22

3-
Community Terrestrial Systems Model (CTSM) science version 5.2 series -- source code, tools,
3+
Community Terrestrial Systems Model (CTSM) science version 5.3 series -- source code, tools,
44
offline-build and test scripts. This gives you everything you need
55
to run CTSM with CESM with the CMEPS driver and CDEPS data models to provide CRU NCEP or GSWP3 forcing data in
66
place of a modeled atmosphere.
@@ -51,7 +51,7 @@ tools ------------- CTSM Offline tools to prepare input datasets and process out
5151
cime_config ------- Configuration files of cime for compsets and CTSM settings
5252
bin/git-fleximod -- Script to manage the needed sub-component source directories (handled with git submodule)
5353
py_env_create ----- Script to setup the python environment for CTSM python tools using conda
54-
python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scirpts
54+
python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scripts
5555

5656
Directory structure only for a CTSM checkout:
5757

@@ -66,6 +66,8 @@ components/cmeps -------------------- CESM top level driver (for NUOPC driver [w
6666
components/cdeps -------------------- CESM top level data model shared code (for NUOPC driver).
6767
components/cism --------------------- CESM Community land Ice Sheet Model.
6868
components/mosart ------------------- Model for Scale Adaptive River Transport
69+
components/mizuRoute ---------------- Reached based river transport model for water routing
70+
(allows both gridded river and Hydrologic Responce Unit river grids)
6971
components/rtm ---------------------- CESM River Transport Model.
7072

7173
Top level documentation ($CTSMROOT):
@@ -74,6 +76,7 @@ README ------------------- This file
7476
README.md ---------------- File that displays on github under https::/github.com/ESCOMP/CTSM.git
7577
README.rst --------------- File that displays under the project in github
7678
README_GITFLEXIMOD.rst --- Information on how to work with git-fleximod for CTSM
79+
WhatsNewInCTSM5.3.md ----- Overview document of the changes between ctsm5.2.0 and ctsm5.3.0
7780
CODE_OF_CONDUCT.md ------- Code of Conduct for how to work with each other on the CTSM project
7881
Copyright ---------------- CESM Copyright file
7982
doc/UpdateChangeLog.pl --- Script to add documentation on a tag to the
@@ -104,17 +107,16 @@ run_sys_tests --------------- Python script to send the standard CTSM testing of
104107
parse_cime.cs.status -------- Script to parse test status files cs.status.* created by create_test
105108
(can be used along with run_sys_tests)
106109
doc/Quickstart.GUIDE -------- Quick guide to using NUOPC scripts.
107-
doc/IMPORTANT_NOTES --------- Some important notes about this version of
108-
CTSM, configuration modes and namelist items
109-
that are not validated or functional.
110+
doc/IMPORTANT_NOTES.md ------ Some important notes about this version of
111+
CTSM, configuration modes and namelist items
112+
that are not validated or functional.
110113
doc/ChangeLog --------------- Detailed list of changes for each model version.
111114
doc/ChangeSum --------------- Summary one-line list of changes for each
112115
model version.
113116
doc/UsersGuide -------------- CTSM Users Guide
114-
doc/IMPORTANT_NOTES --------- Some important notes on caveats for some configurations/namelist items
115117

116118
bld/README ------------------ Description of how to use the build-namelist scripts.
117-
bld/build-namelist ---------- Script to build CTSM namelists.
119+
bld/build-namelist ---------- Lower level script to build CTSM namelists.
118120

119121
cime_config/buildnml ------------- Build the CTSM namelist for CIME
120122
cime_config/buildlib ------------- Build the CTSM library
@@ -130,8 +132,6 @@ cime_config/usermods_dirs -------- Directories of sets of user-modification subd
130132

131133
tools/mksurfdata_esmf --------- Directory to build program to create surface dataset
132134
at any resolution.
133-
tools/mkprocdata_map ---------- Process history data from unstructed grids to a gridded
134-
format.
135135
tools/mkmapgrids -------------- NCL script to create a SCRIP grid file for a regular lat/lon grid (deprecated)
136136
tools/crop_calendars ---------- Tools to process and process and create crop calendar datasets for CTSM
137137
tools/modify_input_files ------ Script to modify existing CTSM input datasets in standard ways
@@ -155,9 +155,9 @@ src/dyn_subgrid --- Dynamic land unit change
155155
src/init_interp --- Online interpolation
156156
scr/fates --------- FATES model and sub-directories
157157
Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
158-
Experimental Ecosystem Demography model
158+
Ecosystem Demography model
159159
src/utils --------- Utility codes
160-
src/self_tests ---- Internal testing (unit tests run as a part of a CTSM simulation)
160+
src/self_tests ---- Internal testing (unit tests run as a part of a CTSM system test)
161161
src/unit_test_shr - Unit test shared modules for unit testing
162162
src/unit_test_stubs Unit test stubs that replicate CTSM code simpler
163163

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
The Community Terrestrial Systems Model.
88

9-
This includes the Community Land Model (CLM5.0 and CLM4.5) of the Community Earth System Model.
9+
This includes the Community Land Model of the Community Earth System Model.
1010

1111
For documentation, quick start, diagnostics, model output and
1212
references, see
@@ -43,7 +43,7 @@ CTSM code management is provided primarily by:
4343
Software engineering team:
4444
- [Erik Kluzek](https://github.com/ekluzek)
4545
- [Bill Sacks](https://github.com/billsacks)
46-
- [Sam Levis](https://github.com/slevisconsulting)
46+
- [Sam Levis](https://github.com/slevis-lmwg)
4747
- [Adrianna Foster](https://github.com/adrifoster)
4848
- [Sam Rabin](https://github.com/samsrabin)
4949
- [Greg Lemieux](https://github.com/glemieux)

README_GITFLEXIMOD.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ Switching to a different CTSM branch or tag
6767

6868
If you have already checked out a branch or tag and **HAVE NOT MADE ANY
6969
MODIFICATIONS** it is simple to change your sandbox. Say that you
70-
checked out ctsm1.0.0 but really wanted to have ctsm1.1.0;
70+
checked out ctsm5.2.0 but really wanted to have ctsm5.3.0;
7171
you would simply do the following::
7272

73-
git checkout ctsm1.1.0
73+
git checkout ctsm5.3.0
7474
./bin/git-fleximod update
7575

7676
You should **not** use this method if you have made any source code

WhatsNewInCTSM5.3.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Purpose and description of changes since ctsm5.2.005
2+
----------------------------------------------------
3+
4+
Bring in updates needed for the CESM3.0 science capability/functionality "chill". Most importantly bringing
5+
in: CN Matrix to speed up spinup for the BGC model, updated surface datasets, updated Leung 2023 dust emissions,
6+
explicit Air Conditioning for the Urban model, updates to crop calendars. For clm6_0 physics these options are now
7+
default turned on in addition to Sturm snow, and excess ice.
8+
9+
Changes to CTSM Infrastructure:
10+
===============================
11+
12+
- manage_externals removed and replaced by git-fleximod
13+
- Ability to handle CAM7 in LND_TUNING_MODE
14+
15+
Changes to CTSM Answers:
16+
========================
17+
18+
Changes to defaults for clm6_0 physics:
19+
- Urban explicit A/C turned on
20+
- Snow thermal conductivity is now Sturm_1997
21+
- New IC file for f09 1850
22+
- New crop calendars
23+
- Dust emissions is now Leung_2023
24+
- Excess ice is turned on
25+
- Updates to MEGAN for BVOC's
26+
- Updates to BGC fire method
27+
28+
Changes for all physics versions:
29+
30+
- Parameter files updated
31+
- FATES parameter file updated
32+
- Glacier region 1 is now undefined
33+
- Update in FATES transient Land use
34+
- Pass active glacier (CISM) runoff directly to river model (MOSART)
35+
- Add the option for using matrix for Carbon/Nitrogen BGC spinup
36+
37+
New surface datasets:
38+
=====================
39+
40+
- With new surface datasets the following GLC fields have region "1" set to UNSET:
41+
glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior
42+
- Updates to allow creating transient landuse timeseries files going back to 1700.
43+
- Fix an important bug on soil fields that was there since ctsm5.2.0. This results in mksurfdata_esmf now giving identical answers with a change in number of processors, as it should.
44+
- Add in creation of ne0np4.POLARCAP.ne30x4 surface datasets.
45+
- Add version to the surface datasets.
46+
- Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for it.
47+
- Remove VIC fields from surface datasets.
48+
49+
New input datasets to mksurfdata_esmf:
50+
======================================
51+
52+
- Updates in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (AG fire, peatland), and the glacier behavior dataset.
53+

bld/CLMBuildNamelist.pm

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,7 @@ sub process_namelist_inline_logic {
16651665
setup_logic_demand($opts, $nl_flags, $definition, $defaults, $nl);
16661666
setup_logic_surface_dataset($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref);
16671667
setup_logic_dynamic_subgrid($opts, $nl_flags, $definition, $defaults, $nl);
1668+
setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv);
16681669
if ( remove_leading_and_trailing_quotes($nl_flags->{'clm_start_type'}) ne "branch" ) {
16691670
setup_logic_initial_conditions($opts, $nl_flags, $definition, $defaults, $nl, $physv);
16701671
}
@@ -1894,7 +1895,7 @@ sub process_namelist_inline_logic {
18941895
#################################
18951896
# namelist group: exice_streams #
18961897
#################################
1897-
setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv);
1898+
setup_logic_exice_streams($opts, $nl_flags, $definition, $defaults, $nl, $physv);
18981899

18991900
##########################################
19001901
# namelist group: clm_temperature_inparm #
@@ -2506,8 +2507,9 @@ sub setup_logic_surface_dataset {
25062507
# consistent with it
25072508
# MUST BE AFTER: setup_logic_demand which is where flanduse_timeseries is set
25082509
#
2509-
my ($opts, $nl_flags, $definition, $defaults, $nl, $xmlvar_ref) = @_;
2510+
my ($opts_in, $nl_flags, $definition, $defaults, $nl, $xmlvar_ref) = @_;
25102511

2512+
my $opts = $opts_in;
25112513
$nl_flags->{'flanduse_timeseries'} = "null";
25122514
my $flanduse_timeseries = $nl->get_value('flanduse_timeseries');
25132515
if (defined($flanduse_timeseries)) {
@@ -2523,6 +2525,11 @@ sub setup_logic_surface_dataset {
25232525
if ($flanduse_timeseries ne "null" && &value_is_true($nl_flags->{'use_cndv'}) ) {
25242526
$log->fatal_error( "dynamic PFT's (setting flanduse_timeseries) are incompatible with dynamic vegetation (use_cndv=.true)." );
25252527
}
2528+
# Turn test option off for NEON until after XML is interpreted
2529+
my $test_files = $opts->{'test'};
2530+
if ( &value_is_true($nl_flags->{'neon'})) {
2531+
$opts->{'test'} = 0;
2532+
}
25262533
#
25272534
# Always get the crop version of the datasets now and let the code turn it into the form desired
25282535
# Provided this isn't with FATES on
@@ -2548,7 +2555,7 @@ sub setup_logic_surface_dataset {
25482555
'use_crop'=>$nl_flags->{'use_crop'} );
25492556
}
25502557
#
2551-
# Expand the XML variables for NEON cases so that NEONSITE will be used
2558+
# Expand the XML variables for NEON cases so that NEONSITE will be used and test for existence
25522559
#
25532560
if ( &value_is_true($nl_flags->{'neon'}) ) {
25542561
my $fsurdat = $nl->get_value($var);
@@ -2557,6 +2564,9 @@ sub setup_logic_surface_dataset {
25572564
my $group = $definition->get_group_name($var);
25582565
$nl->set_variable_value($group, $var, $newval);
25592566
$log->verbose_message( "This is a NEON site and the fsurdat file selected is: $newval" );
2567+
if ( $test_files and ($newval !~ /null|none/) and (! -f remove_leading_and_trailing_quotes($newval) ) ) {
2568+
$log->fatal_error("file not found: $var = $newval");
2569+
}
25602570
}
25612571
}
25622572
}
@@ -2571,10 +2581,12 @@ sub setup_logic_initial_conditions {
25712581
#
25722582
# MUST BE AFTER: setup_logic_demand which is where flanduse_timeseries is set
25732583
# AFTER: setup_logic_irrigate which is where irrigate is set
2584+
# AFTER: setup_logic_exice which is where use_excess_ice is set
25742585
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
25752586

25762587
my $var = "finidat";
25772588
my $finidat = $nl->get_value($var);
2589+
$nl_flags->{'excess_ice_on_finidat'} = "unknown";
25782590
if ( $nl_flags->{'clm_start_type'} =~ /cold/ ) {
25792591
if (defined $finidat ) {
25802592
$log->warning("setting $var (either explicitly in your user_nl_clm or by doing a hybrid or branch RUN_TYPE)\n is incomptable with using a cold start" .
@@ -2623,7 +2635,7 @@ sub setup_logic_initial_conditions {
26232635
$settings{'sim_year'} = $st_year;
26242636
}
26252637
foreach my $item ( "mask", "maxpft", "irrigate", "glc_nec", "use_crop", "use_cn", "use_cndv",
2626-
"use_fates",
2638+
"use_fates", "use_excess_ice",
26272639
"lnd_tuning_mode",
26282640
) {
26292641
$settings{$item} = $nl_flags->{$item};
@@ -2644,6 +2656,7 @@ sub setup_logic_initial_conditions {
26442656
my $done = 2;
26452657
do {
26462658
$try++;
2659+
$nl_flags->{'excess_ice_on_finidat'} = $settings{'use_excess_ice'};
26472660
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, %settings );
26482661
# If couldn't find a matching finidat file, check if can turn on interpolation and try to find one again
26492662
$finidat = $nl->get_value($var);
@@ -2743,6 +2756,13 @@ SIMYR: foreach my $sim_yr ( @sim_years ) {
27432756
$log->fatal_error("$useinitvar is being set for you but a $var was not found, so $useinitvar, init_interp_attributes, and finidat must not be set correctly for this configuration in the namelist_default file" );
27442757
}
27452758
}
2759+
2760+
# 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
2761+
if ( &value_is_true($nl->get_value($useinitvar)) && value_is_true($nl->get_value("use_hillslope")) ) {
2762+
$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" .
2763+
" from initial conditions. If you are sure you want this behaviour:")
2764+
}
2765+
27462766
} # end initial conditions
27472767

27482768
#-------------------------------------------------------------------------------
@@ -4957,18 +4977,39 @@ sub setup_logic_cnmatrix {
49574977
#-------------------------------------------------------------------------------
49584978
sub setup_logic_exice {
49594979
#
4960-
# excess ice streams
4980+
# excess ice streams, must be set before initial conditions
49614981
#
49624982
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
49634983
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
49644984
my $use_exice = $nl->get_value( 'use_excess_ice' );
4985+
# Put use_exice into nl_flags so can be referenced later
4986+
if ( value_is_true($use_exice) ) {
4987+
$nl_flags->{'use_excess_ice'} = ".true.";
4988+
} else {
4989+
$nl_flags->{'use_excess_ice'} = ".false.";
4990+
}
4991+
}
4992+
4993+
#-------------------------------------------------------------------------------
4994+
sub setup_logic_exice_streams {
4995+
#
4996+
# excess ice streams
4997+
# Run after initial conditions found as well as after setup_logic_exice
4998+
#
4999+
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
5000+
my $use_exice = $nl_flags->{'use_excess_ice'};
5001+
my $excess_ice_on_finidat = $nl_flags->{'excess_ice_on_finidat'};
49655002
my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' );
49665003
my $finidat = $nl->get_value('finidat');
49675004
# If coldstart and use_excess_ice is on:
49685005
if ( ( (not defined($use_exice_streams)) && value_is_true($use_exice) ) && string_is_undef_or_empty($finidat) ) {
49695006
$nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.');
49705007
$use_exice_streams = '.true.';
4971-
# if excess ice is turned off
5008+
# If an finidat file was selected and use_excess_ice is on:
5009+
} elsif ( (not defined($use_exice_streams)) && value_is_true($use_exice) && (not value_is_true($excess_ice_on_finidat)) ) {
5010+
$nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.');
5011+
$use_exice_streams = '.true.';
5012+
# if excess ice is turned off
49725013
} elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) {
49735014
$use_exice_streams = '.false.';
49745015
# Checking for cold clm_start_type and not finidat here since finidat can be not set set in branch/hybrid runs and

bld/README

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ CLM build and configure directory and scripts. Scripts to help
44
you prepare to build CLM as a component within CESM, and setup
55
a namelist for it.
66

7+
This is a lower level script called from with CESM/CIME.
8+
79
Important files/directories:
810

9-
--------- Configure and build scripts
10-
--------- (These scripts are also used by the cesm/cime scripts)
11+
--------- Namelist build scripts
1112

1213
config_files/clm_phys_vers.pm ------------- Perl module to handle different CLM versions
13-
config_files/config_definition_ctsm.xml --- XML file defining all CTSM configuration items
14+
config_files/config_definition_ctsm.xml --- XML file defining CTSM configuration items (mainly physics version)
1415

1516
--------- Scripts to build the namelists
16-
--------- (These scripts are also used by the cesm/cime scripts)
1717
build-namelist --- Build the namelists needed
1818

1919

@@ -26,17 +26,17 @@ unit_testers --- Directory of scripts to test scipts in this directory
2626
---------- XML Files describing namelists in namelist_files
2727
namelist_files/namelist_defaults_ctsm.xml --------- List of default values for the ctsm namelist
2828
namelist_files/namelist_defaults_overall.xml ------ List of default values for overall settings
29-
namelist_files/namelist_defaults_usr_files.xml ---- List of default values for the user-files
30-
namelist_files/namelist_definition_ctsm.xml -------- Definition of all namelist items for ctsm
29+
namelist_files/namelist_defaults_usr_files.xml ---- List of default values for the user-files (deprecated)
30+
namelist_files/namelist_definition_ctsm.xml ------- Definition of all namelist items for ctsm
3131
namelist_files/namelist_definition.xsl ------------ Describes how to view the xml file as html
32-
namelist_files/namelist_defaults_drydep.xml ------- List of default values for the dry deposition module.
3332
namelist_files/use_cases -------------------------- Specific configurations that build-namelist uses
3433
namelist_files/use_cases/README ------------------- File explaining the naming convention for use_cases
3534

3635
---------- Driver namelist files, duplicated information from cime/driver/cime_config
3736
namelist_files/namelist_defaults_drv.xml ---------- List of default values for driver namelist defaults
38-
namelist_files/namelist_defaults_drydep.xml ------- List of default values for dry deposition fields
37+
namelist_files/namelist_defaults_drydep.xml ------- List of default values for dry deposition and MEGAN fields
3938
namelist_files/namelist_defaults_fire_emis.xml ---- List of default values for fire emission fields
39+
namelist_files/namelist_defaults_dust_emis.xml ---- List of default values for the dust emissions module.
4040
namelist_files/namelist_definition_drv.xml -------- Definition of all driver namelist items
4141
namelist_files/namelist_definition_drv_flds.xml --- Definition of add driver fieldsnamelist items
4242

0 commit comments

Comments
 (0)