diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index c02e20b678..8960800172 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -1,4 +1,5 @@
# Ran python directory through black python formatter
+d89c86e7776bbf7451860b60038b4725fe7a0560
b429b63824e09f82e95d2982f14311cbbd8e4a37
d229b5c6689efc4c2a6cef077515c4ccd5c18ff6
4cd83cb3ee6d85eb909403487abf5eeaf4d98911
@@ -54,3 +55,6 @@ aa04d1f7d86cc2503b98b7e2b2d84dbfff6c316b
753fda3ff0147837231a73c9c728dd9ce47b5997
f112ba0bbf96a61d5a4d354dc0dcbd8b0c68145c
bd535c710db78420b8e8b9d71d88d8339e899c59
+4b20bbd7003e6f77dab4e3268cc4a43f9b5a3b5d
+cf433215b58ba8776ec5edfb0b0d80c0836ed3a0
+16d57ff37859b34dab005693e3085d64e2bcd95a
diff --git a/.gitmodules b/.gitmodules
index 9aeb7d4de0..0771c90237 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -28,7 +28,7 @@
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
-fxtag = sci.1.80.4_api.37.0.0
+fxtag = sci.1.80.11_api.37.0.0
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NCAR/fates-release
@@ -52,7 +52,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/RTM
[submodule "mosart"]
path = components/mosart
url = https://github.com/ESCOMP/MOSART
-fxtag = mosart1.1.07
+fxtag = mosart1.1.08
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
@@ -68,7 +68,7 @@ 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.16
+fxtag = ccs_config_cesm1.0.20
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
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index cd478587d1..0000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# Contributor Code of Conduct
-_The Contributor Code of Conduct is for participants in our software projects and community._
-
-## Our Pledge
-We, as contributors, creators, stewards, and maintainers (participants), of **Community Terrestrial Systems Model (CTSM)** pledge to make participation in
-our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone.
-All participants are required to abide by this Code of Conduct.
-This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression,
-level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race,
-religion, or sexual orientation, as well as any other characteristic protected under applicable US federal or state law.
-
-## Our Standards
-Examples of behaviors that contribute to a positive environment include:
-
-* All participants are treated with respect and consideration, valuing a diversity of views and opinions
-* Be considerate, respectful, and collaborative
-* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
-* Acknowledging the contributions of others
-* Avoid personal attacks directed toward other participants
-* Be mindful of your surroundings and of your fellow participants
-* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress
-* Respect the rules and policies of the project and venue
-
-Examples of unacceptable behavior include, but are not limited to:
-
-* Harassment, intimidation, or discrimination in any form
-* Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested
-* Unwelcome sexual attention or advances
-* Personal attacks directed at other guests, members, participants, etc.
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Alarming, intimidating, threatening, or hostile comments or conduct
-* Inappropriate use of nudity and/or sexual images
-* Threatening or stalking anyone, including a participant
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Scope
-This Code of Conduct applies to all spaces managed by the Project whether they be physical, online or face-to-face.
-This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages,
-issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the
-community uses for communication.
-In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them.
-Representation of a project may be further defined and clarified by project maintainers.
-
-## Community Responsibilities
-Everyone in the community is empowered to respond to people who are showing unacceptable behavior.
-They can talk to them privately or publicly.
-Anyone requested to stop unacceptable behavior is expected to comply immediately.
-If the behavior continues concerns may be brought to the project administrators or to any other party listed in the
-[Reporting](#reporting) section below.
-
-## Project Administrator Responsibilities
-Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate
-behavior and provide support when people in the community point out inappropriate behavior.
-Project administrator(s) are normally the ones that would be tasked to carry out the actions in the [Consequences](#consequences)
-section below.
-
-Project administrators are also expected to keep this Code of Conduct updated with the main one housed at UCAR, as listed below in
-the [Attribution](#attribution) section.
-
-## Reporting
-Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as
-outlined in the [Consequences](#consequences) section below.
-However, making a report to a project administrator is not considered an 'official report' to UCAR.
-
-Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint
-Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's
-EthicsPoint Hotline](https://www2.fin.ucar.edu/ethics/anonymous-reporting).
-
-Complaints received by UCAR will be handled pursuant to the procedures outlined in UCAR's Harassment Reporting and Complaint
-Procedure.
-Complaints to UCAR will be held as confidential as practicable under the circumstances, and retaliation against a person who
-initiates a complaint or an inquiry about inappropriate behavior will not be tolerated.
-
-Any Contributor can use these reporting methods even if they are not directly affiliated with UCAR.
-The Frequently Asked Questions (FAQ) page for reporting is [here](https://www2.fin.ucar.edu/procedures/hr/reporting-faqs).
-
-## Consequences
-Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the
-circumstances.
-Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and
-other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other
-behaviors that are deemed inappropriate, threatening, offensive, or harmful.
-Project administrators also have the right to report violations to UCAR HR and/or UCAR's Office of Diversity, Equity and Inclusion
-(ODEI), as well as a participant's home institution and/or law enforcement.
-In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure.
-
-## Process for Changes
-All UCAR managed projects are required to adopt this Contributor Code of Conduct.
-Adoption is assumed even if not expressly stated in the repository.
-Projects should fill in sections where prompted with project-specific information, including, project name and adoption date.
-
-Projects that adopt this Code of Conduct need to stay up to date with UCAR's Contributor Code of Conduct, linked with a DOI in the
-[Attribution](#attribution) section below.
-Projects can make limited substantive changes to the Code of Conduct, however, the changes must be limited in scope and may not
-contradict the UCAR Contributor Code of Conduct.
-
-## Attribution
-This Code of Conduct was originally adapted from the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version
-1.4.
-We then aligned it with the UCAR Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of
-Conduct.
-The UCAR Participant Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR.
-The original version of this for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR
-website at https://doi.org/10.5065/6w2c-a132.
-The date that it was adopted by this project was **Feb/13/2018**.
-When responding to complaints, UCAR HR and ODEI will do so based on the latest published version.
-Therefore, any project-specific changes should follow the [Process for Changes](#process-for-changes) section above.
diff --git a/WhatsNewInCTSM5.3.md b/WhatsNewInCTSM5.3.md
index 1fabfd1192..4717deac30 100644
--- a/WhatsNewInCTSM5.3.md
+++ b/WhatsNewInCTSM5.3.md
@@ -1,48 +1,108 @@
-# What's new in CTSM 5.3 (tag `ctsm5.3.0`)
+# What's new in CTSM 5.3 (tag `ctsm5.3.021`)
## Purpose and description of changes since CTSM 5.2 (tag `ctsm5.2.005`)
-- Adds CN Matrix method to speed up spinup for the BGC model.
-- Updates surface datasets.
-- Brings in new Leung 2023 dust emissions.
-- Adds explicit air conditioning for the urban model.
-- Updates crop calendars.
-- Updates fire model with various improvements, including default parameterization against climate reanalysis from CRU-JRA instead of GSWP.
-- FATES compsets can now be run with transient land use.
-
-These changes were needed ahead of the CESM3 capability/functionality "chill". For `clm6_0` physics these options are now turned on by default, in addition to Sturm snow and excess ice.
-
-## Changes to CTSM infrastructure
- - `manage_externals` removed and replaced by `git-fleximod`
- - Ability to handle CAM7 in `LND_TUNING_MODE`
-
-## Changes to CTSM answers
-
- Changes to defaults for `clm6_0` physics:
- - Urban explicit A/C turned on
- - Snow thermal conductivity method is now `Sturm_1997`
- - New initial conditions file for f09 ("1-degree") 1850, with more in progress
- - New crop calendars
- - Dust emissions method is now `Leung_2023`
- - Excess ice is turned on
- - Updates to MEGAN for BVOCs
- - Updates to BGC fire method
-
- Changes for all physics versions:
- - Parameter files updated
- - FATES parameter file updated
- - Glacier region 1 is now undefined
- - Update in FATES transient land use
- - Pass active glacier (CISM) runoff directly to river model (MOSART)
- - Add the option for using Matrix CN method for Carbon/Nitrogen BGC spinup
-
-## New surface datasets
-
-- With new surface datasets the following GLC fields have region "1" set to UNSET: glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior
-- Updates to allow creating transient landuse timeseries files going back to 1700.
-- Fix an important bug on soil fields that was there since `ctsm5.2.0`. This has the side effect of `mksurfdata_esmf` now giving identical answers with a change in number of processors, as it should.
-- Surface datasets now provided for the `ne0np4.POLARCAP.ne30x4` grid.
-- Surface datasets now have their version number embedded to prevent mismatch of surface dataset and CTSM version.
-- Remove the `--hires_pft` option from `mksurfdata_esmf` as we don't have the datasets for it.
-- Remove `VIC` fields from surface datasets.
-- Updates to input datasets in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (crop fire peak month, peatland fraction), and the glacier behavior dataset.
+### New features
+
+* `manage_externals` replaced by [`git-fleximod`](https://github.com/ESMCI/git-fleximod/blob/main/README.md). ([PR \#2559](https://github.com/ESCOMP/CTSM/pull/2559))
+* No longer runs the 0th time step in first segment of startup and hybrid runs; branch and continue runs never had this 0th time step. ([PR \#2084](https://github.com/ESCOMP/CTSM/pull/2084))
+* New CN Matrix method speeds up spinup for the BGC model. ([PR \#640](https://github.com/ESCOMP/CTSM/pull/640); [Liao et al. 2023](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2023MS003625)).
+* New `Leung_2023` dust emissions. ([PR \#1897](https://github.com/ESCOMP/CTSM/pull/1897); [Leung et al 2023](https://doi.org/10.5194/acp-23-6487-2023), [Leung et al. 2024](https://doi.org/10.5194/acp-24-2287-2024))
+* Explicit air conditioning for the urban model. ([PR \#2275](https://github.com/ESCOMP/CTSM/pull/2275); [Li et al. 2024](https://agupubs.onlinelibrary.wiley.com/share/NY4AYPREB8Y8BUDP7DXD?target=10.1029/2023MS004107))
+* FATES compsets can now be run with transient land use; off by default. ([PR \#2507](https://github.com/ESCOMP/CTSM/pull/2507))
+* Ability to handle CAM7 in `LND_TUNING_MODE`. ([PR \#2632](https://github.com/ESCOMP/CTSM/pull/2632))
+
+### Answer changes
+
+Changes to defaults for `clm6_0` physics:
+
+* Urban explicit A/C turned on (links above).
+* Snow thermal conductivity method is now `Sturm1997`. ([PR \#2348](https://github.com/ESCOMP/CTSM/pull/2348); see also [discussion \#1960](https://github.com/ESCOMP/CTSM/discussions/1960))
+* New initial conditions files for f09 ("1-degree" 1850, 2000), f19 (“2-degree” 1850), and ne30 (1850, 1979, 2000) resolutions.
+* New crop calendars. ([PR \#2664](https://github.com/ESCOMP/CTSM/pull/2664); informed by [Rabin et al., 2023](https://gmd.copernicus.org/articles/16/7253/2023/gmd-16-7253-2023.html))
+* Dust emissions method is now `Leung_2023` (links above).
+* Excess ice is turned on. ([PR \#1787](https://github.com/ESCOMP/CTSM/pull/1787))
+* Updates to MEGAN for BVOCs. ([PR \#2588](https://github.com/ESCOMP/CTSM/pull/2588))
+* New BGC fire method `li2024crujra`: Avoid crop fires during growing season; allow lightning ignitions in tropical closed forests; add effect of landscape fragmentation on ignitions and duration; recalibrate against GFED5 burned area and with CRU-JRA climate. ([PR \#2684](https://github.com/ESCOMP/CTSM/pull/2684), [PR \#2711](https://github.com/ESCOMP/CTSM/pull/2711), [PR \#2715](https://github.com/ESCOMP/CTSM/issues/2715))
+
+Changes for all physics versions:
+
+* Parameters updated for CRU-JRA forcing: PPE-based modifications were made to the parameters `leafcn`, `slatop`, `froot_leaf`, `medlynslope`, and `kmax`. Lowers LAI and biomass in boreal and tropical forests, without reducing latent heat in the tropics. Affected PFTs: NET temperate, NET boreal, BET tropical, BDS boreal, C3 arctic grass. ([PR \#2500](https://github.com/ESCOMP/CTSM/pull/2500))
+* FATES parameter file updated (see section below).
+* Pass active glacier (CISM) runoff directly to river model (MOSART) ([MOSART PR \#94](https://github.com/ESCOMP/MOSART/pull/94))
+* New surface datasets and landuse timeseries files (see section below).
+* CNMatrix is new default spinup method (links above).
+
+### Heads up
+
+* Small glacier changes mean that you can’t use a 5.3 surface dataset with pre-5.3 code and vice versa anymore. (Merged with [PR \#2500](https://github.com/ESCOMP/CTSM/pull/2500))
+* Updates the definition of history variable “time” from *end* of `time_bounds` to *middle* of `time_bounds`. ([PR \#2838](https://github.com/ESCOMP/CTSM/pull/2838); see section below)
+* Standardizes history variable attributes and a history dimension name. ([PR \#2052](https://github.com/ESCOMP/CTSM/pull/2052); see section below)
+
+##
+
+## Additional detail
+
+### Changes related to time and history files
+
+(Note that the same information in this section applies to MOSART and RTM.)
+
+Startup and hybrid runs no longer run the 0th time step, consistent with the same change in CAM. (Branch and continue runs never had this 0th time step.) This means you will not get an extraneous initial history file anymore. In some circumstances this may also affect the names of history files.
+
+In most cases, the history `time` variable is now defined as the middle of a history file’s `time_bounds` instead of the end, for consistency with the same change in CAM. The exception is if you specify `hist_avgflag_pertape = 'I'` for that file, in which case it will be treated as an “instantaneous” file. Instantaneous history files (a) have their `time` coordinate set to the end of the last timestep (as did all history files before this tag) and (b) do not include `time_bounds`.
+
+The history dimension name `hist_interval` (of output variable `time_bounds`) is standardized to be `nbnd`. History variables `time_bounds`, `mcdate`, `mcsec`, `mdcur`, and `mscur` are standardized to include the calendar attribute.
+
+### New surface datasets and landuse timeseries files ([PR \#2500](https://github.com/ESCOMP/CTSM/pull/2500))
+
+* Transient landuse timeseries files going back to 1700 now possible (and made for f09).
+* Fix an important bug on soil fields that was there since `ctsm5.2.0`. This has the side effect of `mksurfdata_esmf` now giving identical answers with a change in number of processors, as it should. ([Issue \#2744](https://github.com/ESCOMP/CTSM/issues/2744))
+* Surface datasets now provided for the `ne0np4.POLARCAP.ne30x4` grid. ([PR \#2716](https://github.com/ESCOMP/CTSM/pull/2716), [issue \#2720](https://github.com/ESCOMP/CTSM/issues/2720))
+* Surface datasets now have their version number embedded to prevent mismatch of surface dataset and CTSM version. ([Issue \#2723](https://github.com/ESCOMP/CTSM/issues/2723))
+* Remove outdated hydrology `VIC` (Variable Infiltration Capacity Hydrology model) fields from surface datasets.
+* Updates to input datasets:
+ * PFT/LAI/soil-color raw datasets; now from the TRENDY2024 timeseries that ends in 2023. (Issues [\#2570](https://github.com/ESCOMP/CTSM/issues/2570) and [\#2452](https://github.com/ESCOMP/CTSM/issues/2452))
+ * Two fire datasets: crop fire peak month and peatland fraction. (Issue [\#2618](https://github.com/ESCOMP/CTSM/issues/2618))
+ * Glacier behavior dataset (related to how non-Greenland glaciers are handled). (Issue [\#423](https://github.com/ESCOMP/CTSM/issues/423))
+
+### Changes to FATES parameter file
+
+* [PR \#2507](https://github.com/ESCOMP/CTSM/pull/2507) ([ctsm5.2.013](https://github.com/ESCOMP/CTSM/releases/tag/ctsm5.2.013)) / [FATES PR \#1116](https://github.com/NGEET/fates/pull/1116) ([sci.1.77.1\_api.36.0.0](https://github.com/NGEET/fates/releases/tag/sci.1.77.0_api.36.0.0))
+ * Adds new parameters for new land use harvest mode and land use by PFT capabilities
+* [PR \#2700](https://github.com/ESCOMP/CTSM/pull/2700) ([ctsm5.3.003](https://github.com/ESCOMP/CTSM/releases/tag/ctsm5.3.003)) / [FATES PR \#1255](https://github.com/NGEET/fates/pull/1255) ([sci.1.78.3\_api.36.1.0](https://github.com/NGEET/fates/releases/tag/sci.1.78.3_api.36.1.0))
+ * Adds two arctic shrub PFTs, increasing the number of default PFTs to 14 and update arctic grass parameters ([FATES PR\#1236](https://github.com/NGEET/fates/pull/1236))
+ * Splits `fates_turnover_leaf` parameter into canopy and understory specific turnover rates and provides new values for both ([FATES PR\#1136](https://github.com/NGEET/fates/pull/1136))
+ * Updates grass allometry parameters ([FATES PR\#1206](https://github.com/NGEET/fates/pull/1206))
+ * Changes the prescribe nutrient uptake defaults from 1 to 0 for all PFTs (only relevant to ELM-FATES)
+
+### Changes to rpointer files
+
+The rpointer files are simple text files that CESM uses to keep track of how far simulations have progressed, pointing to the filename of the latest restart file for that component. There is one such file for each component, so for CTSM `I` cases that's `lnd`, `cpl`, and `atm` (and `rof` if it's active). Normally, when the user is just extending the length of simulations, there’s no need to worry about these files.
+
+However, if there was a problem when a simulation shut down, it's possible that different components will have mismatched restarts and rpointer files. In the past, this meant figuring out what restart file should be pointed to in each component rpointer file and correcting it by hand in an editor. There was only the final set of rpointer files that was kept for a case.
+
+Now, with this update, the `lnd`, `cpl`, and `atm` rpointer files have the simulation date in the filenames, so it's easy to spot if the restarts are mismatched for one of the components. Also, since there are matching rpointer files for each time restarts are created, it's now easier to (a) make sure restarts and rpointer files are all correctly matched and (b) for a user to take a set of restarts and matching rpointer files to start up from for any part of an existing simulation. This means you don't have to hand-edit the rpointer files, making sure you don't make a mistake when you do.
+
+Old rpointer filenames:
+
+* `rpointer.atm`
+* `rpointer.cpl`
+* `rpointer.lnd`
+
+New names:
+
+* `rpointer.atm.YYYY-MM-DD-SSSSS`
+* `rpointer.cpl.YYYY-MM-DD-SSSSS`
+* `rpointer.lnd.YYYY-MM-DD-SSSSS`
+
+Where `YYYY-MM-DD-SSSSS` is the year, month, day, and seconds into the day for the simulation timestamp. For example, `rpointer.lnd.2000-01-01-00000` for a rpointer file for starting at midnight (beginning of the day) on January 1st, 2000\.
+
+Note that this is backwards-compatible, so for all the components you can use either the new or old format for the rpointer filenames. Thus, if you are restarting from an existing case before `ctsm5.3.016`, you CAN use the rpointer filenames that don't have the timestamps in the name.
+
+## Simulations supporting this release
+
+- f19 `Clm60Bgc` 16pft: [https://github.com/NCAR/LMWG\_dev/issues/70](https://github.com/NCAR/LMWG_dev/issues/70)
+- f09 with `Clm60BgcCrop`: [https://github.com/NCAR/LMWG\_dev/issues/69](https://github.com/NCAR/LMWG_dev/issues/69)
+- ne30 with `Clm60BgcCrop`: [https://github.com/NCAR/LMWG\_dev/issues/68](https://github.com/NCAR/LMWG_dev/issues/68)
+
+Note: Dust emissions in CTSM 5.3 will be different from the above simulations because of a tuning update that came in after those.
\ No newline at end of file
diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm
index ab0aab0cc5..93004ad1c4 100755
--- a/bld/CLMBuildNamelist.pm
+++ b/bld/CLMBuildNamelist.pm
@@ -2118,17 +2118,21 @@ sub setup_logic_roughness_methods {
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'z0param_method',
- 'phys'=>$nl_flags->{'phys'} );
+ 'phys'=>$nl_flags->{'phys'} , 'use_fates'=>$nl_flags->{'use_fates'});
my $var = remove_leading_and_trailing_quotes( $nl->get_value("z0param_method") );
if ( $var ne "Meier2022" && $var ne "ZengWang2007" ) {
$log->fatal_error("$var is incorrect entry for the namelist variable z0param_method; expected Meier2022 or ZengWang2007");
}
my $phys = $physv->as_string();
- if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) {
- if ( $var eq "Meier2022" ) {
+ if ( $var eq "Meier2022" ) {
+ if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) {
$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");
}
+ # Make sure that fates and meier2022 are not both active due to issue #2932
+ if ( &value_is_true($nl_flags->{'use_fates'}) ) {
+ $log->fatal_error("z0param_method = $var and use_fates currently are not compatible. Please update the z0param_method to ZengWang2007. See issue #2932 for more information.")
+ }
}
}
#-------------------------------------------------------------------------------
diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml
index cee72ca5cf..64e00527fe 100644
--- a/bld/namelist_files/namelist_defaults_ctsm.xml
+++ b/bld/namelist_files/namelist_defaults_ctsm.xml
@@ -540,7 +540,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
ZengWang2007
-Meier2022
+Meier2022
.true.
.false.
diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl
index d42487cfdb..a3630f3286 100755
--- a/bld/unit_testers/build-namelist_test.pl
+++ b/bld/unit_testers/build-namelist_test.pl
@@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile {
#
# Figure out number of tests that will run
#
-my $ntests = 3263;
+my $ntests = 3264;
if ( defined($opts{'compare'}) ) {
- $ntests += 1979;
+ $ntests += 1980;
}
plan( tests=>$ntests );
@@ -1185,6 +1185,10 @@ sub cat_and_create_namelistinfile {
namelst=>"use_hydrstress=.true.",
phys=>"clm5_0",
},
+ "useMeierwithFATES" =>{ options=>"-bgc fates -envxml_dir . -no-megan",
+ namelst=>"z0param_method=Meier2022",
+ phys=>"clm5_0",
+ },
"noanthro_w_crop" =>{ options=>"-envxml_dir . -res 0.9x1.25 -bgc bgc -crop -use_case 1850_noanthro_control",
namelst=>"",
phys=>"clm5_0",
diff --git a/ccs_config b/ccs_config
index a712a92045..77fd32c6c4 160000
--- a/ccs_config
+++ b/ccs_config
@@ -1 +1 @@
-Subproject commit a712a920453dc0cb2831dce576e78c389b567f7e
+Subproject commit 77fd32c6c4b57bb195239753f4c7838f05c1dfe8
diff --git a/cime_config/SystemTests/rxcropmaturity.py b/cime_config/SystemTests/rxcropmaturity.py
index fb254c408f..a0eced83c5 100644
--- a/cime_config/SystemTests/rxcropmaturity.py
+++ b/cime_config/SystemTests/rxcropmaturity.py
@@ -106,7 +106,7 @@ def __init__(self, case):
# Which conda environment should we use?
self._get_conda_env()
- def _run_phase(self, skip_gen=False):
+ def _run_phase(self, skip_gen=False, h1_inst=False):
# Modeling this after the SSP test, we create a clone to be the case whose outputs we don't
# want to be saved as baseline.
@@ -129,7 +129,7 @@ def _run_phase(self, skip_gen=False):
self._set_active_case(case_gddgen)
# Set up stuff that applies to both tests
- self._setup_all()
+ self._setup_all(h1_inst)
# Add stuff specific to GDD-Generating run
logger.info("RXCROPMATURITY log: modify user_nl files: generate GDDs")
@@ -196,7 +196,7 @@ def _run_phase(self, skip_gen=False):
self._set_active_case(case_rxboth)
# Set up stuff that applies to both tests
- self._setup_all()
+ self._setup_all(h1_inst)
# Add stuff specific to Prescribed Calendars run
logger.info("RXCROPMATURITY log: modify user_nl files: Prescribed Calendars")
@@ -264,7 +264,7 @@ def _get_rx_dates(self):
logger.error(error_message)
raise RuntimeError(error_message)
- def _setup_all(self):
+ def _setup_all(self, h1_inst):
logger.info("RXCROPMATURITY log: _setup_all start")
# Get some info
@@ -274,7 +274,7 @@ def _setup_all(self):
# Set sowing dates file (and other crop calendar settings) for all runs
logger.info("RXCROPMATURITY log: modify user_nl files: all tests")
- self._modify_user_nl_allruns()
+ self._modify_user_nl_allruns(h1_inst)
logger.info("RXCROPMATURITY log: _setup_all done")
# Make a surface dataset that has every crop in every gridcell
@@ -399,7 +399,7 @@ def _run_check_rxboth_run(self, skip_gen):
tool_path,
)
- def _modify_user_nl_allruns(self):
+ def _modify_user_nl_allruns(self, h1_inst):
nl_additions = [
"cropcals_rx = .true.",
"cropcals_rx_adapt = .false.",
@@ -417,6 +417,8 @@ def _modify_user_nl_allruns(self):
"hist_type1d_pertape(2) = 'PFTS'",
"hist_dov2xy(2) = .false.",
]
+ if h1_inst:
+ nl_additions.append("hist_avgflag_pertape(2) = 'I'")
self._append_to_user_nl_clm(nl_additions)
def _run_generate_gdds(self, case_gddgen):
diff --git a/cime_config/SystemTests/rxcropmaturityinst.py b/cime_config/SystemTests/rxcropmaturityinst.py
new file mode 100644
index 0000000000..bf8bf7750b
--- /dev/null
+++ b/cime_config/SystemTests/rxcropmaturityinst.py
@@ -0,0 +1,6 @@
+from rxcropmaturity import RXCROPMATURITYSHARED
+
+
+class RXCROPMATURITYINST(RXCROPMATURITYSHARED):
+ def run_phase(self):
+ self._run_phase(h1_inst=True)
diff --git a/cime_config/SystemTests/rxcropmaturityskipgeninst.py b/cime_config/SystemTests/rxcropmaturityskipgeninst.py
new file mode 100644
index 0000000000..4cab9bd7c0
--- /dev/null
+++ b/cime_config/SystemTests/rxcropmaturityskipgeninst.py
@@ -0,0 +1,6 @@
+from rxcropmaturity import RXCROPMATURITYSHARED
+
+
+class RXCROPMATURITYSKIPGENINST(RXCROPMATURITYSHARED):
+ def run_phase(self):
+ self._run_phase(skip_gen=True, h1_inst=True)
diff --git a/cime_config/SystemTests/ssp.py b/cime_config/SystemTests/ssp.py
index bd554aeae9..92cab0a961 100644
--- a/cime_config/SystemTests/ssp.py
+++ b/cime_config/SystemTests/ssp.py
@@ -81,7 +81,7 @@ def run_phase(self):
)
refsec = "00000"
- # obtain rpointer files and necessary restart files from short term archiving directory
+ # obtain necessary restart files from short term archiving directory
rundir = self._case.get_value("RUNDIR")
rest_path = os.path.join(dout_sr, "rest", "{}-{}".format(refdate, refsec))
@@ -96,9 +96,6 @@ def run_phase(self):
else:
os.symlink(item, link_name)
- for item in glob.glob("{}/*rpointer*".format(rest_path)):
- shutil.copy(item, rundir)
-
self._case.set_value("CLM_ACCELERATED_SPINUP", "off")
self._case.set_value("RUN_TYPE", "hybrid")
self._case.set_value("GET_REFCASE", False)
diff --git a/cime_config/SystemTests/sspmatrixcn.py b/cime_config/SystemTests/sspmatrixcn.py
index 29b6dce8e6..98a580a8db 100644
--- a/cime_config/SystemTests/sspmatrixcn.py
+++ b/cime_config/SystemTests/sspmatrixcn.py
@@ -13,6 +13,7 @@
Step 4: matrix Spinup off
"""
import shutil, glob, os, sys
+from datetime import datetime
if __name__ == "__main__":
CIMEROOT = os.environ.get("CIMEROOT")
@@ -24,6 +25,7 @@
else:
from CIME.status import append_testlog
+from CIME.case import Case
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.SystemTests.test_utils import user_nl_utils
@@ -186,6 +188,26 @@ def append_user_nl(self, caseroot, n=0):
caseroot=caseroot, component=self.comp, contents=contents_to_append
)
+ def run_indv(self, nstep, st_archive=True):
+ """
+ Individual run of a given step
+ """
+ suffix = "step{}".format(self.steps[nstep])
+ if isinstance(self._case, Case):
+ super().run_indv(suffix, st_archive=True)
+ else:
+ caseroot = self._case.get_value("CASEROOT")
+ dout_sr = self._case.get_value("DOUT_S_ROOT")
+ rest_r = os.path.join(dout_sr, "rest")
+ nyear = 1851 + nstep
+ rundate = "%s-01-01-00000" % nyear
+ restdir = os.path.join(rest_r, rundate)
+ os.mkdir(restdir)
+ rpoint = os.path.join(restdir, "rpointer.clm." + rundate)
+ os.mknod(rpoint)
+ rpoint = os.path.join(restdir, "rpointer.cpl." + rundate)
+ os.mknod(rpoint)
+
def run_phase(self):
"Run phase"
@@ -225,6 +247,7 @@ def run_phase(self):
self.append_user_nl(clone_path, n)
dout_sr = clone.get_value("DOUT_S_ROOT")
+ ninst = self._case.get_value("NINST")
self._skip_pnl = False
#
@@ -247,14 +270,24 @@ def run_phase(self):
os.makedirs(rundir)
os.symlink(item, linkfile)
- for item in glob.glob("{}/*rpointer*".format(rest_path)):
- shutil.copy(item, rundir)
+ # For a branch the cpl rpointer file needs to be handled
+ if self.runtyp[n] == "branch":
+
+ drvrest = "rpointer.cpl"
+ if ninst > 1:
+ drvrest += "_0001"
+ drvrest += rest_time
+ self._set_drv_restart_pointer(drvrest)
+ try:
+ shutil.copy(drvrest, rundir)
+ except shutil.SameFileError:
+ pass
#
# Run the case (Archiving on)
#
self._case.flush()
- self.run_indv(suffix="step{}".format(self.steps[n]), st_archive=True)
+ self.run_indv(nstep=n, st_archive=True)
#
# Get the reference case from this step for the next step
@@ -267,6 +300,7 @@ def run_phase(self):
)
refsec = "00000"
rest_path = os.path.join(dout_sr, "rest", "{}-{}".format(refdate, refsec))
+ rest_time = "." + refdate + "-" + refsec
#
# Last step in original case
@@ -292,10 +326,22 @@ def run_phase(self):
linkfile = os.path.join(rundir, os.path.basename(item))
if os.path.exists(linkfile):
os.remove(linkfile)
+ expect(True, os.path.exists(item), "expected file does NOT exist = " + item)
os.symlink(item, linkfile)
- for item in glob.glob("{}/*rpointer*".format(rest_path)):
- shutil.copy(item, rundir)
+ # For a branch the cpl rpointer file needs to be handled
+ if self.runtyp[n] == "branch":
+
+ drvrest = "rpointer.cpl"
+ if ninst > 1:
+ drvrest += "_0001"
+ drvrest += rest_time
+
+ self._set_drv_restart_pointer(drvrest)
+ try:
+ shutil.copy(os.path.join(rest_path, drvrest), rundir)
+ except shutil.SameFileError:
+ pass
self.append_user_nl(clone_path, n)
#
@@ -306,66 +352,4 @@ def run_phase(self):
# Run the case (short term archiving is off)
#
self._case.flush()
- self.run_indv(suffix="step{}".format(self.steps[n]), st_archive=False)
-
-
-#
-# Unit testing for above
-#
-import unittest
-from CIME.case import Case
-from CIME.utils import _LessThanFilter
-from argparse import RawTextHelpFormatter
-
-
-class test_ssp_matrixcn(unittest.TestCase):
- def setUp(self):
- self.ssp = SSPMATRIXCN()
-
- def test_logger(self):
- # Test the logger
- stream_handler = logging.StreamHandler(sys.stdout)
- logger.addHandler(stream_handler)
- logger.level = logging.DEBUG
- logger.info("nyr_forcing = {}".format(self.ssp.nyr_forcing))
- for n in range(self.ssp.n_steps()):
- self.ssp.__logger__(n)
- if self.ssp.spin[n] == "sasu":
- logger.info(" SASU spinup is .true.")
- if self.ssp.sasu[n] != -999:
- logger.info(" nyr_sasu = {}".format(self.ssp.sasu[n]))
- if self.ssp.iloop[n] != -999:
- logger.info(" iloop_avg = {}".format(self.ssp.iloop[n]))
-
- logger.info("Total number of years {}".format(self.ssp.total_years()))
- logger.removeHandler(stream_handler)
-
- def test_n_steps(self):
- self.assertTrue(self.ssp.n_steps() == 3)
-
- def test_valid_n(self):
- for n in range(self.ssp.n_steps()):
- self.ssp.check_n(n)
-
- def test_negative_n(self):
- self.assertRaises(SystemExit, self.ssp.check_n, -1)
-
- def test_n_too_big(self):
- self.assertRaises(SystemExit, self.ssp.check_n, self.ssp.n_steps())
-
- def test_append_user_nl_step2(self):
- ufile = "user_nl_clm"
- if not os.path.exists(ufile):
- os.mknod(ufile)
- else:
- expect(0, ufile + " file already exists, not overwritting it")
-
- self.ssp.append_user_nl(caseroot=".", n=2)
- print(ufile + " for step 2")
- log = open(ufile, "r").read()
- print(log)
- os.remove(ufile)
-
-
-if __name__ == "__main__":
- unittest.main()
+ self.run_indv(nstep=n, st_archive=False)
diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml
index 12859b9131..ee80087a08 100644
--- a/cime_config/config_tests.xml
+++ b/cime_config/config_tests.xml
@@ -145,6 +145,16 @@ This defines various CTSM-specific system tests
$STOP_N
+
+ As RXCROPMATURITY but ensure instantaneous h1. Can be removed once instantaneous and other variables are on separate files.
+ 1
+ FALSE
+ FALSE
+ never
+ $STOP_OPTION
+ $STOP_N
+
+
As RXCROPMATURITY but don't actually generate GDDs. Allows short testing with existing GDD inputs.
1
@@ -155,6 +165,16 @@ This defines various CTSM-specific system tests
$STOP_N
+
+ As RXCROPMATURITYSKIPGEN but ensure instantaneous h1. Can be removed once instantaneous and other variables are on separate files.
+ 1
+ FALSE
+ FALSE
+ never
+ $STOP_OPTION
+ $STOP_N
+
+