first commit

This commit is contained in:
baol 2024-05-09 15:14:01 +08:00
commit 0dde616cfb
2205 changed files with 575601 additions and 0 deletions

35
.config_files.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" ?>
<entry_id>
<!-- This is the same as the default entry in
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 CLM.
-->
<entry id="COMP_ROOT_DIR_LND">
<type>char</type>
<default_value>unset</default_value>
<values>
<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/CIME/data/config/xml_schemas/config_compsets.xsd</schema>
</entry>
</entry_id>

7
.lfsconfig Normal file
View File

@ -0,0 +1,7 @@
[lfs]
# We auto-fetch any netCDF files, because they are needed for
# running tests; however, we do NOT auto-fetch other binary
# files, in particular image files that are part of the
# documentation source (these are fetched as part of the
# documentation build process).
fetchinclude = *.nc

7
.zenodo.json Normal file
View File

@ -0,0 +1,7 @@
{
"creators": [
{
"name": "CTSM Development Team"
}
]
}

107
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,107 @@
# 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.

48
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,48 @@
## How to contribute:
We recommend that you first open an issue (https://github.com/escomp/ctsm/issues/) to
discuss the changes or additions that you propose. Through the issue discussion, you can
work with other CTSM developers to think about the design and implementation of the changes
as well as the planning and scheduling for the change to come into CTSM. An alternative is
to contact the key software and science developers via ctsm-software@ucar.edu. Making
contact early in your project will increase the likelihood that your developments can come
into CTSM.
We also recommend that you join the ctsm-dev@ucar.edu google groups in order
to be informed about the science that is happening in CTSM as well as the latest developments and tags.
The ctsm-dev group is here:
https://groups.google.com/a/ucar.edu/forum/#!forum/ctsm-dev
Use the help from the wiki below to setup a fork and personal branch in GitHub to put your developments
on and keep up to date with the master branch of CTSM. Once the changes are sufficiently advanced you
can form a Pull Request on GitHub. Either from your fork on GitHub, or from the main ESCOMP GitHub page
for CTSM (be sure to hit the "compare across forks" link at the top of the page when you first create
the pull request).
https://github.com/ESCOMP/ctsm/pulls
This allows you to show your proposed changes and start getting feedback on them (even if they aren't finished).
This also allows your changes to be planned for and slated for a time to come into CTSM master. In most
cases you won't merge the Pull Request yourself, but a software engineer responsible for CTSM will do
additional testing and bring the changes to CTSM master.
### CTSM Developers Guide:
https://wiki.ucar.edu/display/ccsm/Community+Land+Model+Developers+Guide
## Getting Started:
The following resources give you information on the project and how to get started.
#### CTSM Wiki:
https://github.com/ESCOMP/ctsm/wiki
#### Coding Practices and Style:
Code conventions: https://github.com/ESCOMP/ctsm/wiki/CTSM-coding-guidelines
#### Code of Conduct:
See the `CODE_OF_CONDUCT.md` file for expectations of how to work in the community.

101
Externals.cfg Normal file
View File

@ -0,0 +1,101 @@
[clm]
local_path = .
protocol = externals_only
externals = Externals_CLM.cfg
required = True
[cism]
local_path = components/cism
protocol = git
repo_url = https://github.com/ESCOMP/CISM-wrapper
tag = cismwrap_2_1_99
externals = Externals_CISM.cfg
required = True
[rtm]
local_path = components/rtm
protocol = git
repo_url = https://github.com/ESCOMP/RTM
tag = rtm1_0_79
required = True
[mosart]
local_path = components/mosart
protocol = git
repo_url = https://github.com/ESCOMP/MOSART
tag = mosart1_0_49
required = True
[mizuRoute]
local_path = components/mizuRoute
protocol = git
repo_url = https://github.com/nmizukami/mizuRoute
hash = 34723c2
required = True
[ccs_config]
tag = ccs_config_cesm0.0.92
protocol = git
repo_url = https://github.com/ESMCI/ccs_config_cesm.git
local_path = ccs_config
required = True
[cime]
local_path = cime
protocol = git
repo_url = https://github.com/ESMCI/cime
tag = cime6.0.217_httpsbranch03
required = True
[cmeps]
tag = cmeps0.14.50
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
local_path = components/cmeps
required = True
[cdeps]
tag = cdeps1.0.28
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
required = True
[cpl7]
tag = cpl77.0.7
protocol = git
repo_url = https://github.com/ESCOMP/CESM_CPL7andDataComps
local_path = components/cpl7
required = True
[share]
tag = share1.0.18
protocol = git
repo_url = https://github.com/ESCOMP/CESM_share
local_path = share
required = True
[mct]
tag = MCT_2.11.0
protocol = git
repo_url = https://github.com/MCSclimate/MCT
local_path = libraries/mct
required = True
[parallelio]
tag = pio2_6_2
protocol = git
repo_url = https://github.com/NCAR/ParallelIO
local_path = libraries/parallelio
required = True
[doc-builder]
local_path = doc/doc-builder
protocol = git
repo_url = https://github.com/ESMCI/doc-builder
tag = v1.0.8
required = False
[externals_description]
schema_version = 1.0.0

9
Externals_CLM.cfg Normal file
View File

@ -0,0 +1,9 @@
[fates]
local_path = src/fates
protocol = git
repo_url = https://github.com/NGEET/fates
tag = sci.1.73.0_api.35.0.0
required = True
[externals_description]
schema_version = 1.0.0

34
LICENSE Normal file
View File

@ -0,0 +1,34 @@
Copyright (c) 2005-2018, University Corporation for Atmospheric Research (UCAR)
All rights reserved.
Developed by:
University Corporation for Atmospheric Research - National Center for Atmospheric Research
https://www2.cesm.ucar.edu/working-groups/sewg
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal with the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the documentation
and/or other materials provided with the distribution.
- Neither the names of [Name of Development Group, UCAR],
nor the names of its contributors may be used to endorse or promote
products derived from this Software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

185
README Normal file
View File

@ -0,0 +1,185 @@
$CTSMROOT/README 04/19/2023
Community Terrestrial Systems Model (CTSM) science version 5.2 series -- source code, tools,
offline-build and test scripts. This gives you everything you need
to run CTSM with CESM with the CMEPS driver and CDEPS data models to provide CRU NCEP or GSWP3 forcing data in
place of a modeled atmosphere.
CMEPS is the Community Mediator for Earth Prediction Systems. And CDEPS is the
Community Data Models for Earth Prediction System. They are both NUOPC based models
used to drive the CESM (Community Earth System Model) of which CTSM is a component of.
NUOPC is the National Unified Operational Prediction Capability a standard way of building
coupled model systems. The NUOPC layer is based on the Earth System Modeling Framework (ESMF).
For lists of current bugs (issues) and current development see the CTSM GitHub page:
https://github.com/ESCOMP/CTSM
INFORMATION ON THE CMEPS DRIVER:
https://escomp.github.io/CMEPS
https://earthsystemmodeling.org/nuopc/
IMPORTANT NOTE ON CESM CHECKOUT VERSUS A CTSM CHECKOUT:
If this is the top level directory from making a clone of CTSM the
directory structure is a little bit different than if CTSM is from
a clone of the entire CESM. If this is part of CESM this directory
will be under components/clm alongside other CESM component models.
For a CTSM checkout this will be the top level directory.
Other documentation will refer to $CTSMROOT and it means the directory
that this file is at. CIMEROOT is the directory where "cime" is for
this checkout. For a CESM checkout $CIMEROOT will be the "cime" directory
beneath the top level directory. For a CTSM checkout $CIMEROOT will
be $CTSMROOT/cime.
IMPORTANT NOTE ABOUT (deprecated)
Anything marked with (deprecated) is something is going to be removed in a future update.
Often this means it will be replaced with something else.
General directory structure ($CTSMROOT):
doc --------------- Documentation of CTSM.
bld --------------- build-namelist scripts for CTSM.
src --------------- CTSM Source code.
lilac ------------- Lightweight Infrastructure for Land-Atmosphere Coupling (for coupling to a host atmosphere model)
test -------------- CTSM Testing scripts for CTSM offline tools (deprecated)
tools ------------- CTSM Offline tools to prepare input datasets and process output.
cime_config ------- Configuration files of cime for compsets and CTSM settings
manage_externals -- Script to manage the external source directories (deprecated)
py_env_create ----- Script to setup the python environment for CTSM python tools using conda
python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scirpts
Directory structure only for a CTSM checkout:
components -------- Other active sub-components needed for CTSM to run (river routing and land-ice models)
libraries --------- CESM libraries: MCT (Model Coupling Toolkit) and PIO (deprecated)
share ------------- CESM shared code
ccs_config -------- CIME configure files (for grids, compsets, and machines) for CESM
cime/scripts --------------- cesm/cime driver scripts
components/cmeps -------------------- CESM top level driver (for NUOPC driver [which is the default]) source code.
components/cdeps -------------------- CESM top level data model shared code (for NUOPC driver).
components/cism --------------------- CESM Community land Ice Sheet Model.
components/mosart ------------------- Model for Scale Adaptive River Transport
components/rtm ---------------------- CESM River Transport Model.
components/cpl7 --------------------- CESM top level driver for MCT driver (deprecated will be removed)
Top level documentation ($CTSMROOT):
README ------------------- This file
README.md ---------------- File that displays on github under https::/github.com/ESCOMP/CTSM.git
README.rst --------------- File that displays under the project in github
README_EXTERNALS.rst ----- Information on how to work with manage_externals for CTSM (deprecated)
CODE_OF_CONDUCT.md ------- Code of Conduct for how to work with each other on the CTSM project
Copyright ---------------- CESM Copyright file
doc/UpdateChangeLog.pl --- Script to add documentation on a tag to the
ChangeLog/ChangeSum files
doc/ChangeLog ------------ Documents different CTSM versions
doc/ChangeSum ------------ Summary documentation of different CTSM versions
doc/design --------------- Software Engineering and code design document files
Checklists for standard Software Engineering tasks
./doc/README.CHECKLIST.master_tags
./bld/namelist_files/README.CHECKLIST.interpolating_initial_conditions.md
Documentation of Namelist Items: (view the following in a web browser)
bld/namelist_files/namelist_definition_ctsm.xml --- Definition of all namelist items
bld/namelist_files/namelist_defaults_ctsm.xml ----- Default values
=============================================================================================
Important files in main directories (under $CTSMROOT):
=============================================================================================
Externals.cfg --------------- File for management of the main high level external (deprecated)
Externals_CLM.cfg ----------- File for management of the CTSM specific externals (i.e. FATES)
run_sys_tests --------------- Python script to send the standard CTSM testing off (submits
the create_test test suite for several different compilers on the
machines we do standard CTSM testing on).
parse_cime.cs.status -------- Script to parse test status files cs.status.* created by create_test
(can be used along with run_sys_tests)
doc/Quickstart.GUIDE -------- Quick guide to using NUOPC scripts.
doc/IMPORTANT_NOTES --------- Some important notes about this version of
CTSM, configuration modes and namelist items
that are not validated or functional.
doc/ChangeLog --------------- Detailed list of changes for each model version.
doc/ChangeSum --------------- Summary one-line list of changes for each
model version.
doc/UsersGuide -------------- CTSM Users Guide
doc/IMPORTANT_NOTES --------- Some important notes on caveats for some configurations/namelist items
bld/README ------------------ Description of how to use the build-namelist scripts.
bld/build-namelist ---------- Script to build CTSM namelists.
cime_config/buildnml ------------- Build the CTSM namelist for CIME
cime_config/buildlib ------------- Build the CTSM library
cime_config/config_compsets.xml -- Define CTSM compsets
cime_config/config_component.xml - Define CTSM XML settings
cime_config/config_tests.xml ----- Define CTSM specific tests
cime_config/config_pes.xml ------- Define Processor layouts for various CTSM grids and compsets
cime_config/testdefs ------------- Directory for specification of CTSM testing
cime_config/testdefs/ExpectedTestFails.xml -- List of tests that are expected to fail
cime_config/usermods_dirs -------- Directories of sets of user-modification subdirs
(These are directories that add specific user modifications to
simulations created using "cime/scripts/create_newcase --user-mods-dir".)
tools/mksurfdata_esmf --------- Directory to build program to create surface dataset
at any resolution.
tools/mkprocdata_map ---------- Process history data from unstructed grids to a gridded
format.
tools/mkmapgrids -------------- NCL script to create a SCRIP grid file for a regular lat/lon grid (deprecated)
tools/crop_calendars ---------- Tools to process and process and create crop calendar datasets for CTSM
tools/modify_input_files ------ Script to modify existing CTSM input datasets in standard ways
tools/site_and_regional ------- Scripts to create input datasets for single site and regional
cases, primarily by modifying existing global datasets
tools/contrib ----------------- Miscellansous useful scripts for pre and post processing
as well as case management of CTSM. These scripts are
contributed by users and may not be as well tested or
supported as other tools.
=============================================================================================
Source code directory structure:
=============================================================================================
src/biogeochem ---- Biogeochemisty
src/main ---------- Main control and high level code
src/cpl ----------- Land model high level caps for NUOPC driver (and MCT and LILAC)
src/biogeophys ---- Biogeophysics (Hydrology)
src/dyn_subgrid --- Dynamic land unit change
src/init_interp --- Online interpolation
scr/fates --------- FATES model and sub-directories
Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Experimental Ecosystem Demography model
src/utils --------- Utility codes
src/self_tests ---- Internal testing (unit tests run as a part of a CTSM simulation)
src/unit_test_shr - Unit test shared modules for unit testing
src/unit_test_stubs Unit test stubs that replicate CTSM code simpler
=============================================================================================
QUICKSTART: using the NUOPC driver scripts
=============================================================================================
cd $CIMEROOT/scripts
./create_newcase # get help on how to run create_newcase
./create_newcase --case testI --res f19_g17_gl4 --compset I2000Clm60BgcCrop
# create new "I" case for default machine at 1.9x2.5_gx1v7
# "I2000Clm60BgcCrop" case is clm6_0 physics, CDEPS, and inactive ice/ocn/glc
# and MOSART for river-routing
cd testI
./case.setup # create the $CASE.run file
./case.build # build model and create namelists
./case.submit # submit script
# (NOTE: ./xmlchange RESUBMIT=10 to set RESUBMIT to number
# # of times to automatically resubmit -- 10 in this example)

42
README.CHECKLIST.new_case Normal file
View File

@ -0,0 +1,42 @@
$CTSMROOT/README.CHECKLIST.new_case 03/01/2021
This is a check list of things to do when setting up a new case in order to help ensure everything is correct. There
are lots of tiny details that need to be right and it's easy to get something wrong. So the first screening to make
sure it's right is for you to carefully check through your case and make sure it's right.
The following assumes you have created a new case and are in it's case directory.
General Checklist to always do:
- Make sure CLM_ env settings are correct
(./xmlquery -p CLM)
- Make sure you are using the correct CLM_PHYSICS_VERSION
(./xmlquery -p CLM_PHYSICS_VERSION)
- Make sure you are running the appropriate overall CLM vegetation model.
The "-bgc" option of either Satellite Phenology (sp), or
Full BioGeoChemistry (bgc), or FATES (fates)
(./xmlquery -p CLM_BLDNML_OPTS)
- Also if you are running the bgc model, check to see if you should be running the prognostic crop model
(option -crop in CLM_BLDNML_OPTS)
- Make sure the LND_TUNING_MODE is correct
(./xmlquery LND_TUNING_MODE)
- For an "I compset" make sure you are running over the right forcing years
(usually ./xmlquery -p DATM_YR)
- Again for an "I compset" make sure the DATM streams are operating over the right years
(look at the CaseDocs/datm.streams.xml file)
- First and align year for streams should be the start year of a historical simulation
(./xmlquery RUN_STARTDATE)
(grep stream_year_first CaseDocs/lnd_in; grep model_year_align CaseDocs/lnd_in)
- Last year for streams should be the last year you are going to run to (or beyond it)
(grep stream_year_last CaseDocs/lnd_in)
- Make sure you are starting from appropriate spunup initial conditions
(Check the run-type with: ./xmlquery RUN_TYPE)
(check finidat for a startup or hybrid simulation: grep finidat CaseDocs/lnd_in)
(check nrevsn for a branch simulation: grep nrevsn CaseDocs/lnd_in)
- Run for a month (or some short period) and go over the log files and especially the settings and files read in them.
(For an I case you especially want to look at the lnd.log and atm.log files)
Some other suggestions on things that can be done:
- Compare namelist files to an existing case if you are doing something almost the same as a previous simulation.
- Ask another collaborator to look over your case directory

51
README.NUOPC_driver.md Normal file
View File

@ -0,0 +1,51 @@
# $CTSMROOT/README.NUOPC_driver
CTSM now by default uses the NUOPC based CMEPS driver!
## What's new?
MESH Files:
Mesh files to describe grids are new in both the driver namelist and for example in any
streams files.
Full ESMF Library is used:
The full ESMF Library is used and required to be built in order to run the model.
Single Point cases:
Single point cases can now set their location using PTS_LAT and PTS_LON.
## What's removed?
Domain files are no longer used. And mapping for regriding is created on the fly
rather than using fixed mapping files in almost all cases. Runoff mapping files
still need to be generated offline.
## What files change?
rpointer.drv becomes rpointer.cpl
cpl.log.* files get's split into med.log.* and drv.log.*
user_datm.streams.txt.* file changes goes into the user_nl_datm_streams files
datm.streams.txt.* files are all in one file called datm.streams.xml
## What XML variables change in your case?
DATM_CLMNCEP_YR_* variables change to DATM_YR_*
## New obscure options:
ESMF_AWARE_THREADING --- ESMF is aware of threading (can have differing number of threads in components)
CREATE_ESMF_PET_FILES -- Create output log files from ESMF for each Processor (PET)
ESMF_VERBOSITY_LEVEL --- Verbosity level for ESMF logging
ESMF_PROFILING_LEVEL --- Verbosity level for ESMF profiling
nuopc.runseq is a text file that determines how the driver operates. You can change the operation
by having an updated copy in your case directory.
## What if I want to use the MCT driver?
The MCT driver is now deprecated, and will be removed. So at this point we don't
suggest using it anymore.
For more notes see:
https://docs.google.com/presentation/d/1yjiKSEV53JDAJbYxhpY2T9GTxlWFzQAn

67
README.md Normal file
View File

@ -0,0 +1,67 @@
# CTSM
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3739617.svg)](https://doi.org/10.5281/zenodo.3739617)
## Overview and resources
The Community Terrestrial Systems Model.
This includes the Community Land Model (CLM5.0 and CLM4.5) of the Community Earth System Model.
For documentation, quick start, diagnostics, model output and
references, see
http://www.cesm.ucar.edu/models/cesm2.0/land/
and
https://escomp.github.io/ctsm-docs/
For help with how to work with CTSM in git, see
https://github.com/ESCOMP/CTSM/wiki/Quick-start-to-CTSM-development-with-git
and
https://github.com/ESCOMP/ctsm/wiki/Recommended-git-setup
For support with model use, troubleshooting, etc., please use the [CTSM
forum](https://bb.cgd.ucar.edu/cesm/forums/ctsm-clm-mosart-rtm.134/) or other appropriate forum (e.g., for
infrastructure/porting questions) through the [CESM forums](https://bb.cgd.ucar.edu/cesm/).
To get updates on CTSM tags and important notes on CTSM developments
join our low traffic email list:
https://groups.google.com/a/ucar.edu/forum/#!forum/ctsm-dev
(Send email to ctsm-software@ucar.edu if you have problems with any of this)
## CTSM code management team
CTSM code management is provided primarily by:
Software engineering team:
- [Erik Kluzek](https://github.com/ekluzek)
- [Bill Sacks](https://github.com/billsacks)
- [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:
- [Will Wieder](https://github.com/wwieder)
- [Dave Lawrence](https://github.com/dlawrenncar)
- [Danica Lombardozzi](https://github.com/danicalombardozzi)
- [Keith Oleson](https://github.com/olyson)
- [Sean Swenson](https://github.com/swensosc)
- [Peter Lawrence](https://github.com/lawrencepj1)
- Gordon Bonan
FATES Project:
- https://github.com/NGEET/fates?tab=readme-ov-file
Perturbed Parameter Experiment (PPE) Science team:
- [Katie Dagon] (https://github.com/katiedagon)
- [Daniel Kennedy] (https://github.com/djk2120)
- [Linnea Hawkins] (https://github.com/linniahawkins)

132
README_EXTERNALS.rst Normal file
View File

@ -0,0 +1,132 @@
Obtaining the full model code and associated scripting infrastructure
=====================================================================
[!CAUTION]
This is deprecated and will be replaced with git submodules. See
https://github.com/ESCOMP/CTSM/pull/2443
CTSM is released via GitHub. You will need some familiarity with git in order
to modify the code and commit these changes. However, to simply checkout and run the
code, no git knowledge is required other than what is documented in the following steps.
To obtain the CTSM code you need to do the following:
#. Clone the repository. ::
git clone https://github.com/escomp/ctsm.git my_ctsm_sandbox
This will create a directory ``my_ctsm_sandbox/`` in your current working directory.
#. Run the script **manage_externals/checkout_externals**. ::
./manage_externals/checkout_externals
The **checkout_externals** script is a package manager that will
populate the ctsm directory with the relevant versions of each of the
components along with the CIME infrastructure code.
At this point you have a working version of CTSM.
To see full details of how to set up a case, compile and run, see the CIME documentation at http://esmci.github.io/cime/ .
More details on checkout_externals
----------------------------------
The file **Externals.cfg** in your top-level CTSM directory tells
**checkout_externals** which tag/branch of each component should be
brought in to generate your sandbox. **Externals_CLM.cfg** is used similarly to point to the correct version of FATES (and possibly other CTSM-specific externals in the future); the below instructions referring to **Externals.cfg** also apply to modifying **Externals_CLM.cfg**.
NOTE: checkout_externals will always attempt
to make the working copy exactly match the externals description. If
you manually modify an external without updating Externals.cfg, e.g. switch
to a different tag, then rerunning checkout_externals will switch you
back to the external described in Externals.cfg. See below
documentation `Customizing your CTSM sandbox`_ for more details.
**You need to rerun checkout_externals whenever Externals.cfg has
changed** (unless you have already manually updated the relevant
external(s) to have the correct branch/tag checked out). Common times
when this is needed are:
* After checking out a new CTSM branch/tag
* After merging some other CTSM branch/tag into your currently
checked-out branch
**checkout_externals** must be run from the root of the source
tree. For example, if you cloned CTSM with::
git clone https://github.com/escomp/ctsm.git my_ctsm_sandbox
then you must run **checkout_externals** from
``/path/to/my_ctsm_sandbox``.
To see more details of **checkout_externals**, issue ::
./manage_externals/checkout_externals --help
Customizing your CTSM sandbox
=============================
There are several use cases to consider when you want to customize or modify your CTSM sandbox.
Switching to a different CTSM branch or tag
-------------------------------------------
If you have already checked out a branch or tag and **HAVE NOT MADE ANY
MODIFICATIONS** it is simple to change your sandbox. Say that you
checked out ctsm1.0.0 but really wanted to have ctsm1.1.0;
you would simply do the following::
git checkout ctsm1.1.0
./manage_externals/checkout_externals
You should **not** use this method if you have made any source code
changes, or if you have any ongoing CTSM cases that were created from
this sandbox. In these cases, it is often easiest to do a second **git
clone**.
Pointing to a different version of a component
----------------------------------------------
Each entry in **Externals.cfg** has the following form (we use CIME as an
example below)::
[cime]
local_path = cime
protocol = git
repo_url = https://github.com/CESM-Development/cime
tag = cime5.4.0-alpha.20
required = True
Each entry specifies either a tag, a hash or a branch. To point to a new tag:
#. Modify the relevant entry/entries in **Externals.cfg** (e.g., changing
``cime5.4.0-alpha.20`` to ``cime5.4.0-alpha.21`` above)
#. Checkout the new component(s)::
./manage_externals/checkout_externals
To point to a hash, the process is the same, except also change ``tag = ...`` to ``hash = ...``.
To point to a branch, use ``branch = ...``. Pointing to a branch means that, each time you run ``manage_externals/checkout_externals`` you will get the current latest version of that branch. This can be convenient for in-progress development work, but should not be used when you need a stable version for scientific simulations. There are a number of gotchas with this workflow, so in general you should default to pointing to fixed hashes. (For CTSM master, we require a fixed hash or, usually, a tag.)
Keep in mind that changing individual components from a tag may result
in an invalid model (won't compile, won't run, not scientifically
meaningful) and is unsupported.
Committing your change to Externals.cfg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After making this change, it's a good idea to commit the change in your
local CTSM git repository. First create a branch in your local
repository, then commit it. (Unlike with subversion, branches are stored
locally unless you explicitly push them up to GitHub. Feel free to
create whatever local branches you'd like.) For example::
git checkout -b my_ctsm_branch
git add Externals.cfg
git commit -m "Update CIME to cime5.4.0-alpha.20"

5411
bld/CLMBuildNamelist.pm Normal file

File diff suppressed because it is too large Load Diff

47
bld/README Normal file
View File

@ -0,0 +1,47 @@
$CTSMROOT/bld/README Jun/08/2018
CLM build and configure directory and scripts. Scripts to help
you prepare to build CLM as a component within CESM, and setup
a namelist for it.
Important files/directories:
--------- Configure and build scripts
--------- (These scripts are also used by the cesm/cime scripts)
config_files/clm_phys_vers.pm ------------- Perl module to handle different CLM versions
config_files/config_definition_ctsm.xml --- XML file defining all CTSM configuration items
--------- Scripts to build the namelists
--------- (These scripts are also used by the cesm/cime scripts)
build-namelist --- Build the namelists needed
env_run.xml --- Sample case runtime environment variables, so build-namelist can run outside of a case directory.
--------- Test scripts directory
unit_testers --- Directory of scripts to test scipts in this directory
(most notably build-namelist)
---------- XML Files describing namelists in namelist_files
namelist_files/namelist_defaults_ctsm.xml --------- List of default values for the ctsm namelist
namelist_files/namelist_defaults_overall.xml ------ List of default values for overall settings
namelist_files/namelist_defaults_usr_files.xml ---- List of default values for the user-files
namelist_files/namelist_definition_ctsm.xml -------- Definition of all namelist items for ctsm
namelist_files/namelist_definition.xsl ------------ Describes how to view the xml file as html
namelist_files/namelist_defaults_drydep.xml ------- List of default values for the dry deposition module.
namelist_files/use_cases -------------------------- Specific configurations that build-namelist uses
namelist_files/use_cases/README ------------------- File explaining the naming convention for use_cases
---------- Driver namelist files, duplicated information from cime/driver/cime_config
namelist_files/namelist_defaults_drv.xml ---------- List of default values for driver namelist defaults
namelist_files/namelist_defaults_drydep.xml ------- List of default values for dry deposition fields
namelist_files/namelist_defaults_fire_emis.xml ---- List of default values for fire emission fields
namelist_files/namelist_definition_drv.xml -------- Definition of all driver namelist items
namelist_files/namelist_definition_drv_flds.xml --- Definition of add driver fieldsnamelist items
---------- XML helper files
namelist_files/LogMessages.pm ---- Perl module to handle log output
namelist_files/history_fields.xsl - Style sheet for history fields as created by script that lists all of the
history fields from the source files (../src/main/findHistFields.pl)

23
bld/build-namelist Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env perl
#-----------------------------------------------------------------------------------------------
#
# clm build-namelist driver
#
# Placing all of build-namelist into CLMBuildNamelist.pm means we can unit test the module.
#
require 5;
use strict;
BEGIN {
# ensure that the cesm create_X scripts can find CLMBuildNamelist.pm
use File::Basename qw(dirname);
use Cwd qw(abs_path);
my $dirname = dirname(abs_path($0));
my @dirs = ($dirname, );
unshift @INC, @dirs;
}
use CLMBuildNamelist qw(main);
CLMBuildNamelist::main();

View File

@ -0,0 +1,108 @@
package config_files::clm_phys_vers;
my $pkg_nm = 'config_files::clm_phys_vers';
#-----------------------------------------------------------------------------------------------
#
# SYNOPSIS
#
# require config_files::clm_phys_vers;
#
# my $phys = config_files::clm_phys_vers->new("clm5_0");
# print $phys->as_string();
#
# DESCRIPTION
#
# Enter the physics version as a string, with a list of valid versions, and have the ability to convert it to
# different formats.
#
# COLLABORATORS: None
#
#-----------------------------------------------------------------------------------------------
#
# Date Author Modification
# 03/06/2014 Erik Kluzek creation
#
#--------------------------------------------------------------------------------------------
use strict;
use bigint;
#use warnings;
#use diagnostics;
my @version_strings = ("clm4_5", "clm5_0", "clm5_1", "clm6_0");
#-------------------------------------------------------------------------------
sub new {
# Constructor, enter version string as argument
my $class = shift;
my $vers_string = shift;
my $nm = "$class\:\:new";
my $self = {};
bless($self, $class);
$self->__validate_vers__( $vers_string );
$self->{'vers_string'} = $vers_string;
return( $self );
}
#-------------------------------------------------------------------------------
sub __validate_vers__ {
# Make sure the version string is a valid one
my $class = shift;
my $vers_string = shift;
my $found = undef;
foreach my $i (0..$#version_strings) {
if ( $vers_string eq $version_strings[$i] ) {
$found = 1;
last;
}
}
if ( ! defined($found) ) {
die "NOT a valid CLM version: $vers_string\n";
}
}
#-------------------------------------------------------------------------------
sub as_string {
# Return the physics version as a string
my $self = shift;
my $phys = $self->{'vers_string'};
return( $phys );
}
#-----------------------------------------------------------------------------------------------
# Unit testing of above
#-----------------------------------------------------------------------------------------------
if ( ! defined(caller) && $#ARGV == -1 ) {
package phys_vers_unit_tester;
require Test::More;
Test::More->import( );
plan( tests=>3 );
sub testit {
print "unit tester\n";
my %lastv;
my @vers_list = ( "clm4_5", "clm5_0", "clm5_1", "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");
print "$vers: string: ".$phys->as_string()."\n";
}
}
}
#-----------------------------------------------------------------------------------------------
# Determine if you should run the unit test or if this is being called from a require statement
#-----------------------------------------------------------------------------------------------
if ( defined(caller) ) {
1 # to make use or require happy
} elsif ( $#ARGV == -1 ) {
&phys_vers_unit_tester::testit();
}

View File

@ -0,0 +1,72 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="config_definition">
<head>
<title>CLM Configuration Definition</title>
</head>
<body>
<h2>CLM Configuration Definition</h2>
<table border="1" cellpadding="10">
<caption><font size="larger"><bold>CLM Physics Configurations</bold></font></caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Value</th>
<th>Description</th>
</tr>
<tr>
<th>Valid Values</th>
</tr>
<xsl:apply-templates select="entry[@category='physics']"/>
</table>
<table border="1" cellpadding="10">
<caption><font size="larger"><bold>CLM Biogeochemistry Configurations</bold></font></caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Value</th>
<th>Description</th>
</tr>
<tr>
<th>Valid Value</th>
</tr>
<xsl:apply-templates select="entry[@category='bgc']"/>
</table>
<table border="1" cellpadding="10">
<caption><font size="larger"><bold>Configuration Directories</bold></font></caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Value</th>
<th>Description</th>
</tr>
<tr>
<th>Valid Value</th>
</tr>
<xsl:apply-templates select="entry[@category='directories']"/>
</table>
</body>
</xsl:template>
<xsl:template match="entry">
<tr>
<td rowspan="2"><font color="#ff0000"><xsl:value-of select="@id"/></font></td>
<td rowspan="2"><xsl:value-of select="@value"/></td>
<td><xsl:apply-templates/></td>
</tr>
<tr>
<td><b>Valid values: </b> <xsl:value-of select="@valid_values"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,45 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="config_definition.xsl" ?>
<config_definition>
<entry id="phys"
valid_values="clm4_5,clm5_0,clm5_1,clm6_0"
value="clm4_5"
category="physics">
Specifies either clm4_5, clm5_0, clm5_1 (deprecated), or clm6_0 physics
</entry>
<entry id="clm_root"
value=""
category="directories">
Root directory of CLM source distribution (directory above CLM configure).
</entry>
<entry id="comp_intf"
valid_values="ESMF,MCT,cpl_\$COMP"
value="MCT"
category="directories">
Component framework interface to use
(Model Coupling Toolkit, or Earth System Modeling Framework)
</entry>
<entry id="usr_src"
value=""
list="1"
category="directories">
User source directories to prepend to the filepath. Multiple directories
are specified as a comma separated list with no embedded white space.
Normally this is SourceMods/src.clm in your case.
</entry>
<entry id="cppdefs"
value=""
category="physics">
User specified CPP defines to append to Makefile defaults.
Note: It's recommended to use configure options to set standard CPP values rather
than defining them here.
</entry>
</config_definition>

14
bld/env_run.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<config_definition>
<!--
Sample env_run.xml file that allows build-namelist to be run for testing in this directory.
-->
<entry id="DIN_LOC_ROOT" value="MYDINLOCROOT" />
<entry id="GLC_TWO_WAY_COUPLING" value="FALSE" />
<entry id="NEONSITE" value="" />
</config_definition>

View File

@ -0,0 +1,244 @@
package namelist_files::LogMessages;
my $pkg_nm = 'namelist_files::LogMessages';
#-----------------------------------------------------------------------------------------------
#
# SYNOPSIS
#
# require namelist_files::LogMessages;
#
# my %opts;
# my $log = namelist_files::LogMessages->new("ProgName", \%opts);
# $log->message("message to print");
# $log->verbose_message("message to print only if verbose mode is on");
# $log->warning("Warning message");
# $log->exit_message("clean exit");
# $log->fatal_error("die with fatal error");
# $log->final_exit("Final message to send (and exit");
#
#
# DESCRIPTION
#
# Handles log messages for perl. Sets up log messages according to verbose
# or silent setting. It also handles warnings printing them, but on finalization
# aborting unless ignore_warnings was set.
#
# COLLABORATORS: None
#
#-----------------------------------------------------------------------------------------------
#
# Date Author Modification
# 10/06/2017 Erik Kluzek creation
#
#--------------------------------------------------------------------------------------------
use strict;
#use warnings;
#use diagnostics;
#-------------------------------------------------------------------------------
sub new {
my $class = shift;
my $ProgName = shift;
my %opts = %{shift()};
my $nm = "$class\:\:new";
my $self = {};
bless($self, $class);
$self->{'nwarns'} = 0;
$self->{'verbosity'} = 1;
$self->{'NO_EXIT'} = $opts{'NO_EXIT'};
$self->{'ProgName'} = $ProgName;
$self->{'ignore_warnings'} = $opts{'ignore_warnings'};
$self->__set_print_level( \%opts );
return( $self );
}
#-------------------------------------------------------------------------------
sub __set_print_level {
my $self = shift;
# Define print levels:
# 0 - only issue fatal error messages
# 1 - only informs what files are created (default)
# 2 - verbose
my %opts = %{shift()};
if ( $opts{'silent'} && $opts{'verbose'} ) {
$self->fatal_error( "Can not set both the -silent and the -verbose options -- set one or the other" );
}
my $verbosity = 1;
if ($opts{'silent'}) { $verbosity = 0; }
if ($opts{'verbose'}) { $verbosity = 2; }
$self->{'verbosity'} = $verbosity;
$self->{'print_verbose'} = 2;
}
#-------------------------------------------------------------------------------
sub message {
my $self = shift;
my ($message) = @_;
if ($self->{'verbosity'} > 0) {
print "$message\n";
}
}
#-------------------------------------------------------------------------------
sub verbose_message {
my $self = shift;
my ($message) = @_;
if ($self->{'verbosity'} >= $self->{'print_verbose'}) {
print "$message\n";
}
}
#-------------------------------------------------------------------------------
sub nwarns {
my $self = shift;
return( $self->{'nwarns'} );
}
#-------------------------------------------------------------------------------
sub final_exit {
my $self = shift;
my ($message) = @_;
if ( $self->{'nwarns'} > 0 ) {
$self->message( "\n\nYou ran with the -ignore_warnings options and allowed $self->{'nwarns'} to go past\n" );
}
$self->verbose_message( $message );
if ( $self->{'NO_EXIT'} ) {
die
} else {
exit;
}
}
#-------------------------------------------------------------------------------
# Some simple subroutines to do a clean exit, print warning, or a fatal error
sub exit_message {
my $self = shift;
my ($message) = @_;
print "$self->{ProgName} : $message\n";
if ( $self->{'NO_EXIT'} ) {
die
} else {
exit;
}
}
#-------------------------------------------------------------------------------
sub warning {
my $self = shift;
my $message = shift;
$self->{'nwarns'} = $self->{'nwarns'} + 1;
my $func_name = (caller(1))[3];
if ( $self->{'ignore_warnings'} ) {
print "Warning : $self->{ProgName}::${func_name}() : $message\n\n";
} else {
die "Warning : $self->{ProgName}::${func_name}() : $message\n" .
" -- Add -ignore_warnings option to CLM_BLDNML_OPTS to ignore this warning\n\n";
}
}
#-------------------------------------------------------------------------------
sub fatal_error {
my $self = shift;
my ($message) = @_;
my $func_name = (caller(1))[3];
die "ERROR : $self->{ProgName}::${func_name}() : $message\n";
}
#-------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
# Unit testing of above
#-----------------------------------------------------------------------------------------------
if ( ! defined(caller) && $#ARGV == -1 ) {
package LogMessage_unit_tester;
require Test::More;
Test::More->import( );
plan( tests=>11 );
sub testit {
print "unit tester\n";
my %opts;
my $message;
# Standard verbose level, test all methods
$opts{'NO_EXIT'} = 1;
my $log = namelist_files::LogMessages->new("ProgName", \%opts);
isa_ok($log, "namelist_files::LogMessages", "Created LogMessages object");
$log->message("message to print");
$log->verbose_message("YOU SHOULD NOT SEE THIS MESSAGE BECAUSE IT IS VERBOSE AND VERBOSE NOT ON");
$message = "Warning message";
is ( $log->nwarns(), 0, "Make sure have zero warnings" );
eval{ $log->warning($message); };
like( $@, qr/$message/, "check that a warning dies without ignore_warnings option" );
is ( $log->nwarns(), 1, "Make sure have one warning" );
$message = "die with fatal error";
eval{ $log->fatal_error($message); };
like( $@, qr/$message/, "check that a fatal_error dies" );
$message = "exit with exit message";
eval{ $log->exit_message($message); };
like( $@, qr/Died/, "check that a exit_message exits" );
$message = "Final message to send";
eval{ $log->final_exit($message); };
like( $@, qr/Died/, "check that a final exits" );
# Test ignore_warnings option and verbose mode
$opts{'ignore_warnings'} = 1;
$opts{'verbose'} = 1;
$opts{'NO_EXIT'} = 1;
$log = namelist_files::LogMessages->new("ProgName", \%opts);
isa_ok($log, "namelist_files::LogMessages", "Created LogMessages object");
$log->verbose_message("message to print only if verbose mode is on");
$log->warning("Warning message");
$log->warning("Warning message2");
$log->warning("Warning message3");
$log->warning("Warning message4");
$log->warning("Warning message5");
is ( $log->nwarns(), 5, "Make sure have five warnings" );
eval{ $log->final_exit($message); };
print "content: $@\n";
like( $@, qr/Died/, "check that a final_exit with warning exits" );
# silent mode
$opts{'ignore_warnings'} = 0;
$opts{'verbose'} = 0;
$opts{'silent'} = 1;
$opts{'NO_EXIT'} = 1;
$log = namelist_files::LogMessages->new("ProgName", \%opts);
$log->message("YOU SHOULD NOT SEE THIS MESSAGE BECAUSE SILENT MODE IS ON");
$log->verbose_message("YOU SHOULD NOT SEE THIS VERBOSE MESSAGE BECAUSE SILENT MODE IS ON");
# Should die with error if both silent and verbose mode is on
$opts{'ignore_warnings'} = 0;
$opts{'verbose'} = 1;
$opts{'silent'} = 1;
$opts{'NO_EXIT'} = 1;
eval{ $log = namelist_files::LogMessages->new("ProgName", \%opts); };
print "content: $@\n";
like( $@, qr/ERROR : /, "check that died if both verbose and silent mode is on" );
print "\nSuccessfully ran all tests\n";
}
}
#-----------------------------------------------------------------------------------------------
# Determine if you should run the unit test or if this is being called from a require statement
#-----------------------------------------------------------------------------------------------
if ( defined(caller) ) {
1 # to make use or require happy
} elsif ( $#ARGV == -1 ) {
&LogMessage_unit_tester::testit();
}

View File

@ -0,0 +1,58 @@
# Steps for interpolating out-of-the-box initial conditions
These are the steps that should be taken when interpolating (via
`init_interp`) out-of-the-box initial conditions files. This is often done
so that we'll have out-of-the-box initial conditions files that are
compatible with the current memory allocation, etc. (thus not requiring
`init_interp` to be run all the time).
Do the following for each initial conditions file you want to
interpolate:
1. From the latest master tag, create and run a test using the
appropriate compset and resolution for this initial conditions
file. Note that there may be other options (like carbon isotopes)
that also need to be turned on. While doing this, generate
baselines. e.g., run
`SMS_Ld1.f09_g17.I1850Clm50Sp.cheyenne_intel.clm-default` or
`SMS_Ld1.f09_g17.I1850Clm50BgcCrop.cheyenne_intel.clm-ciso`, with
baseline generation.
- Confirm that the test points to the desired, original finidat file,
and that `use_init_interp` is .true. by default.
2. Rename the `finidat_interp_dest.nc` file that was generated by this
test, giving it a name that matches the original initial conditions
file, but with a new date stamp. Move this file into place
(`$CESMDATAROOT/inputdata/lnd/clm2/initdata_map/`).
3. Add global metadata to the new file, mentioning the original file,
the test used to generate this new file, the tag used to run this
test, and a summary of what is different on this new version. For
example:
```
ncatted -h -a Notes_190111,global,c,c,'Interpolated from clmi.I1850Clm50BgcCrop.1366-01-01.0.9x1.25_gx1v6_simyr1850_c171213.nc. This is the finidat_interp_dest.nc file from SMS_Ln1.f09_g17.I1850Clm50BgcCrop.cheyenne_intel, run from ctsm1.0.dev022. Updates from the previous file are: (1) uses gx1v7 rather than gx1v6; (2) many inactive points are absent.'
```
4. Using `ncdump -h`, diff the headers of the new and old files, and
make sure that there are no unexpected differences. Especially look
for missing fields on the new file, which could indicate, for
example, that carbon isotopes were turned on in the original run but
not in your new run.
5. Update `namelist_defaults_ctsm.xml` to point to the new file.
- Be sure to change any attributes in both the `finidat` entry and
the `init_interp_attributes` entry for this file. In particular, if
the old file had the attribute `use_init_interp=".true."`, this
should now be removed.
6. Rerun the one-day test for which you generated baselines, comparing
against these baselines. Check the following:
- `use_init_interp` should be .false.
- The test should use the new `finidat` file
- The test should pass and be bit-for-bit with the baseline

View File

@ -0,0 +1,46 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="history_fields">
<head>
<title>CLM History Fields</title>
</head>
<body>
<hr/>
<h2>Definition of CLM history variables</h2>
<p>Included in the table are the following pieces of information:</p>
<ul>
<li>Variable name.</li>
<li>Long name description.</li>
<li>units</li>
</ul>
<table border="1" cellpadding="10">
<caption>CLM History Fields</caption>
<tr>
<th>Name</th>
<th>Long-name</th>
<th>Units</th>
</tr>
<xsl:for-each select="*">
<xsl:sort select="@name"/>
<tr>
<td><font color="#ff0000"><xsl:value-of select="@name"/></font></td>
<td><xsl:value-of select="@long_name"/></td>
<td><xsl:value-of select="@units"/></td>
</tr>
</xsl:for-each>
</table>
<hr/>
</body>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,173 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<title>CLM Namelist Defaults</title>
</head>
<body>
<h2>Default Values for Namelist Variables</h2>
<p>Included in the table are the following pieces of information:</p>
<h3>Table headers include:</h3>
<ul>
<li>Name of variable</li>
<li>Horizontal grid resolution</li>
<li>Land ocean mask type</li>
<li>Simulation year</li>
<li>Simulation year range (for transient datasets)</li>
</ul>
<h3>Miscellaneous items include:</h3>
<ol>
<li>Biogeochemistry (BGC) type (none, CN, CNDV)</li>
<li>Initial condition date (ymd - year month day)</li>
<li>Initial condition time of day (tod) (sec)</li>
<li>Maximum number of Plant Function Types (maxpft)</li>
<li>Number of glacier multiple elevation classes (glc_nec)</li>
<li>Site specific point name (sitespf_pt)</li>
<li>Crop model (crop)</li>
<li>Data model forcing source (forcing)</li>
<li>Representative concentration pathway for future scenarios (SSP-rcp)</li>
<li>New good wood harvest (newwoodharv)</li>
<li>CN Spin-up mode (spinup)</li>
<li>Type of file (type)</li>
<li>Grid mapping to (to_hgrid)</li>
<li>Land-mask mapping to (to_lmask)</li>
<li>High resolution file? (hires)</li>
</ol>
<table border="1" cellpadding="10">
<caption>Namelist Defaults</caption>
<tr>
<th rowspan="2">Name</th>
<th>Horz. Grid</th>
<th>Mask</th>
<th>Sim year</th>
<th>Sim year range</th>
<th>Miscellaneous</th>
</tr>
<tr>
<th colspan="5">Default Value for this Configuration</th>
</tr>
<xsl:for-each select="namelist_defaults/*">
<xsl:sort select="name()"/>
<tr>
<td rowspan="2"><font color="#ff0000">
<xsl:value-of select="name()"/>
</font></td>
<td>
<xsl:choose>
<xsl:when test="string-length(@hgrid)>0">
<xsl:value-of select="@hgrid"/>
</xsl:when>
<xsl:when test="string-length(@frm_hgrid)>0">
<xsl:value-of select="@frm_hgrid"/>
</xsl:when>
<xsl:otherwise>
All res
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="string-length(@mask)>0">
<xsl:value-of select="@mask"/>
</xsl:when>
<xsl:when test="string-length(@lmask)>0">
<xsl:value-of select="@lmask"/>
</xsl:when>
<xsl:when test="string-length(@frm_lmask)>0">
<xsl:value-of select="@frm_lmask"/>
</xsl:when>
<xsl:when test="name()='mksrf_fvegtyp'">
MODIS
</xsl:when>
<xsl:otherwise>
All masks
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="string-length(@sim_year)>0">
<xsl:value-of select="@sim_year"/>
</xsl:when>
<xsl:otherwise>
All yrs
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="string-length(@sim_year_range)>0">
<xsl:value-of select="@sim_year_range"/>
</xsl:when>
<xsl:otherwise>
All sim-yr-rng
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:if test="string-length(@bgc)>0">
bgc=<xsl:value-of select="@bgc"/>
</xsl:if>
<xsl:if test="string-length(@ic_ymd)>0">
ymd=<xsl:value-of select="@ic_ymd"/>
</xsl:if>
<xsl:if test="string-length(@ic_tod)>0">
tod=<xsl:value-of select="@ic_tod"/>
</xsl:if>
<xsl:if test="string-length(@maxpft)>0">
maxpft=<xsl:value-of select="@maxpft"/>
</xsl:if>
<xsl:if test="string-length(@glc_nec)>0">
glc_nec=<xsl:value-of select="@glc_nec"/>
</xsl:if>
<xsl:if test="string-length(@sitespf_pt)>0">
sitespf_pt=<xsl:value-of select="@sitespf_pt"/>
</xsl:if>
<xsl:if test="string-length(@datm_presaero)>0">
datm_presaero=<xsl:value-of select="@datm_presaero"/>
</xsl:if>
<xsl:if test="string-length(@crop)>0">
crop=<xsl:value-of select="@crop"/>
</xsl:if>
<xsl:if test="string-length(@spinup)>0">
spinup=<xsl:value-of select="@spinup"/>
</xsl:if>
<xsl:if test="string-length(@source)>0">
forcing=<xsl:value-of select="@source"/>
</xsl:if>
<xsl:if test="string-length(@rcp)>0">
rcp=<xsl:value-of select="@rcp"/>
</xsl:if>
<xsl:if test="string-length(@ngwh)>0">
newwoodharv=<xsl:value-of select="@ngwh"/>
</xsl:if>
<xsl:if test="string-length(@type)>0">
type=<xsl:value-of select="@type"/>
</xsl:if>
<xsl:if test="string-length(@to_hgrid)>0">
to_hgrid=<xsl:value-of select="@to_hgrid"/>
</xsl:if>
<xsl:if test="string-length(@to_lmask)>0">
to_lmask=<xsl:value-of select="@to_lmask"/>
</xsl:if>
<xsl:if test="string-length(@hires)>0">
hires=<xsl:value-of select="@hires"/>
</xsl:if>
</td>
</tr>
<tr>
<td colspan="5"><b>Value: </b><xsl:value-of select="." /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_defaults.xsl"?>
<namelist_defaults>
<drv_flds_in_files>Buildconf/camconf/drv_flds_in,Buildconf/clmconf/drv_flds_in</drv_flds_in_files>
</namelist_defaults>

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_defaults.xsl"?>
<namelist_defaults>
<!--
Values to use by default for creation of CLM model driver namelists.
The element names are the same as the corresponding namelist
variables. Values that depend on the model configuration use
attributes to express the dependency. The recognized attributes
are: RESOLUTION, defaults, mask, ic_ymd, ic_tod, sim_year and all configuration
attributes from the config_cache.xml file (with keys converted to upper-case).
-->
<!-- Defaults for drydep_inparm namelist -->
<drydep_list>'O3','NO2','HNO3','NO','HO2NO2','CH3OOH','CH2O','CO','H2O2','CH3COOOH','PAN','MPAN','C2H5OOH','ONIT','POOH','C3H7OOH','ROOH','CH3COCHO','CH3COCH3','Pb','ONITR','MACROOH','XOOH','ISOPOOH','CH3OH','C2H5OH','CH3CHO','GLYALD','HYAC','HYDRALD','ALKOOH','MEKOOH','TOLOOH','TERPOOH','CH3COOH','CB1','CB2','OC1','OC2','SOA','SO2','SO4','NH3','NH4NO3'
</drydep_list>
<!-- effective Henry's coef data for wet and dry deposition -->
<dep_data_file>atm/cam/chem/trop_mozart/dvel/dep_data_c201019.nc</dep_data_file>
<!-- Defaults for megan_emis_nl -->
<megan_specifier>'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a', 'CH3OH = methanol', 'C2H5OH = ethanol', 'CH2O = formaldehyde', 'CH3CHO = acetaldehyde', 'CH3COOH = acetic_acid', 'CH3COCH3 = acetone'</megan_specifier>
<megan_factors_file phys="clm6_0" >atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc</megan_factors_file>
<megan_factors_file phys="clm5_1" >atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc</megan_factors_file>
<megan_factors_file phys="clm5_0" >atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc</megan_factors_file>
<megan_factors_file phys="clm4_5" >atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc</megan_factors_file>
</namelist_defaults>

View File

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_defaults.xsl"?>
<namelist_defaults>
<!--
Values to use by default for creation of CLM model driver namelists.
The element names are the same as the corresponding namelist
variables. Values that depend on the model configuration use
attributes to express the dependency. The recognized attributes
are: RESOLUTION, defaults, mask, ic_ymd, ic_tod, sim_year and all configuration
attributes from the config_cache.xml file (with keys converted to upper-case).
-->
<!-- Defaults for fire_emis_nl namelist -->
<fire_emis_specifier>'bc_a1 = BC','pom_a1 = 1.4*OC','SO2 = SO2'</fire_emis_specifier>
<fire_emis_factors_file>lnd/clm2/firedata/fire_emis_factors_c140116.nc</fire_emis_factors_file>
</namelist_defaults>

View File

@ -0,0 +1,125 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_defaults.xsl"?>
<namelist_defaults>
<!--
Values to use by default for creation of CLM model namelists.
These are overall settings used as defaults for the model
configuration of all namelists. None of these are items
in a namelist, but they are default values that will help
determine default values for namelists.
-->
<!--
Default CLM start-type
NOTE: For clm_start_type of "startup" these need to be carefully coordinated with
the settings for use_init_interp, init_interp_attributes and finidat in
namelist_defaults_ctsm.xml.
-->
<clm_start_type >arb_ic</clm_start_type>
<clm_start_type bgc_spinup="on" >cold</clm_start_type>
<clm_start_type use_cndv=".true." >cold</clm_start_type>
<clm_start_type use_fates=".true.">cold</clm_start_type>
<clm_start_type sim_year="1850" >startup</clm_start_type>
<clm_start_type sim_year="2000" >startup</clm_start_type>
<!-- CAM4 and CAM5 tuning are all cold starts -->
<clm_start_type phys="clm4_5" lnd_tuning_mode="clm4_5_cam5.0" >cold</clm_start_type>
<clm_start_type phys="clm4_5" lnd_tuning_mode="clm4_5_cam4.0" >cold</clm_start_type>
<clm_start_type phys="clm5_0" lnd_tuning_mode="clm5_0_cam5.0" >cold</clm_start_type>
<clm_start_type phys="clm5_0" lnd_tuning_mode="clm5_0_cam4.0" >cold</clm_start_type>
<clm_start_type phys="clm5_1" lnd_tuning_mode="clm5_1_cam5.0" >cold</clm_start_type>
<clm_start_type phys="clm5_1" lnd_tuning_mode="clm5_1_cam4.0" >cold</clm_start_type>
<clm_start_type phys="clm6_0" lnd_tuning_mode="clm6_0_cam5.0" >cold</clm_start_type>
<clm_start_type phys="clm6_0" lnd_tuning_mode="clm6_0_cam4.0" >cold</clm_start_type>
<clm_start_type sim_year_range="1850-2100">arb_ic</clm_start_type>
<!-- For transient cases, turn on demand to set flanduse_timeseries -->
<clm_demand sim_year_range="1850-2100" neon=".true." >null</clm_demand> <!-- NEON sites don't have transient PFT datasets yet -->
<clm_demand sim_year_range="constant" >null</clm_demand>
<clm_demand sim_year_range="1850-2000" >flanduse_timeseries</clm_demand>
<clm_demand sim_year_range="1850-2100" >flanduse_timeseries</clm_demand>
<!-- Default location of {csmdata} -->
<csmdata>/fs/cgd/csm/inputdata</csmdata>
<!-- Default resolution -->
<res sitespf_pt="none" >1.9x2.5</res>
<res sitespf_pt="1x1_brazil" >1x1_brazil</res>
<res sitespf_pt="5x5_amazon" >5x5_amazon</res>
<res sitespf_pt="1x1_vancouverCAN" >1x1_vancouverCAN</res>
<res sitespf_pt="1x1_mexicocityMEX" >1x1_mexicocityMEX</res>
<res sitespf_pt="1x1_asphaltjungleNJ">1x1_asphaltjungleNJ</res>
<res sitespf_pt="1x1_urbanc_alpha" >1x1_urbanc_alpha</res>
<res sitespf_pt="1x1_numaIA" >1x1_numaIA</res>
<res sitespf_pt="1x1_smallvilleIA" >1x1_smallvilleIA</res>
<!-- Default simulation year -->
<sim_year>2000</sim_year>
<!-- Default simulation year range -->
<sim_year_range>constant</sim_year_range>
<!-- Check resolution and land/mask in the local resolution list before continuing - normally turned off -->
<chk_res>0</chk_res>
<!-- Add note to namelist files documenting the options given to build-namelist -->
<note mode="clm_stndln" >1</note>
<note mode="ext_cesm" >0</note>
<!-- Default Shared Socioeconomic Pathway and representative concentration pathway for future scenarios -->
<ssp_rcp>hist</ssp_rcp>
<!-- Default land/ocean mask type -->
<mask hgrid="0.23x0.31" >gx1v6</mask>
<mask hgrid="0.47x0.63" >gx1v6</mask>
<mask hgrid="0.9x1.25" >gx1v7</mask>
<mask hgrid="1.9x2.5" >gx1v7</mask>
<mask hgrid="2.5x3.33" >gx3v7</mask>
<mask hgrid="4x5" >gx3v7</mask>
<mask hgrid="10x15" >gx3v7</mask>
<mask hgrid="360x720cru" >cruncep</mask>
<mask hgrid="128x256" >gx1v7</mask>
<mask hgrid="64x128" >gx1v7</mask>
<mask hgrid="48x96" >gx3v7</mask>
<mask hgrid="32x64" >gx3v7</mask>
<mask hgrid="8x16" >gx3v7</mask>
<mask hgrid="94x192" >T62</mask>
<mask hgrid="ne120" >gx1v6</mask>
<mask hgrid="ne240" >gx1v6</mask>
<mask hgrid="ne30" >gx1v6</mask>
<mask hgrid="0.125nldas2" >nldas2</mask>
<mask hgrid="5x5_amazon" >navy</mask>
<mask hgrid="1x1_vancouverCAN" >navy</mask>
<mask hgrid="1x1_mexicocityMEX" >navy</mask>
<mask hgrid="1x1_asphaltjungleNJ" >navy</mask>
<mask hgrid="1x1_brazil" >navy</mask>
<mask hgrid="1x1_urbanc_alpha" >test</mask>
<mask hgrid="1x1_numaIA" >navy</mask>
<mask hgrid="1x1_smallvilleIA" >test</mask>
<mask >gx1v7</mask>
<!-- Default glacier model options -->
<glc_dyntopo >.false.</glc_dyntopo>
<glc_nec glc_nec="0" >0</glc_nec>
<glc_nec glc_nec="1" >1</glc_nec>
<glc_nec glc_nec="3" >3</glc_nec>
<glc_nec glc_nec="5" >5</glc_nec>
<glc_nec glc_nec="10">10</glc_nec>
<glc_nec glc_nec="36">36</glc_nec>
</namelist_defaults>

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_defaults.xsl"?>
<namelist_defaults>
<!--
User defined filenames to use in conjuction with the "clm_usr_name" option
to build-namelist to specify user created files that will be searched for
in place of the standard files, or to give different resolutions, or
The element names are the same as the corresponding namelist filename
variables (only files can be set here). Values that depend on the model
configuration use attributes to express the dependency. The recognized attributes
are: clm_usr_name, mask, sim_year, and sim_year_range and all configuration
attributes from the config_cache.xml file (with keys converted to upper-case).
In addition variable names expressed as ${variable_name} will be expanded
provided they are in the valid list expressed above.
-->
<!-- Initial file (relative to ${csmdata}) -->
<finidat >lnd/clm2/initdata/clmi.${clm_usr_name}_${mask}_simyr${sim_year}.nc</finidat>
<!-- Surface dataset (relative to ${csmdata}) -->
<fsurdat phys="clm4_0">lnd/clm2/surfdata/surfdata_${clm_usr_name}_simyr${sim_year}.nc</fsurdat>
<fsurdat phys="clm4_5">lnd/clm2/surfdata_map/surfdata_${clm_usr_name}_simyr${sim_year}.nc</fsurdat>
<!-- Dynamic PFT surface dataset (relative to ${csmdata}) -->
<flanduse_timeseries sim_year_range="constant" ssp_rcp="hist">null</flanduse_timeseries>
<flanduse_timeseries ssp_rcp="hist">lnd/clm2/surfdata/landuse.timeseries_${clm_usr_name}_simyr${sim_year_range}.nc</flanduse_timeseries>
<flanduse_timeseries sim_year_range="1850-2000" ssp_rcp="hist">lnd/clm2/surfdata/landuse.timeseries_${clm_usr_name}_simyr1849-2006.nc</flanduse_timeseries>
<flanduse_timeseries >lnd/clm2/surfdata/landuse.timeseries_${ssp_rcp}_${clm_usr_name}_simyr${sim_year_range}.nc</flanduse_timeseries>
<flanduse_timeseries sim_year_range="1850-2000" >lnd/clm2/surfdata/landuse.timeseries_${ssp_rcp}_${clm_usr_name}_simyr1849-2006.nc</flanduse_timeseries>
</namelist_defaults>

View File

@ -0,0 +1,340 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="namelist_definition">
<head>
<title>CLM Namelist Definition</title>
</head>
<body>
<p>
</p>
<hr/>
<p>
</p>
<h1>Definition of CLM namelist variables</h1>
<p>We list all of the relevant namelist variables for CLM I cases. This includes
CLM Namelist items as well as CLM build-namelist settings and namelist settings
for CLM offline tools.</p>
<hr/>
<h2>Definition of CLM namelist variables</h2>
<p>Note, these all would go into the user_nl_clm file
before configure):</p>
<p>Included in the table are the following pieces of information:</p>
<ul>
<li>Variable name.</li>
<li>Variable type (<code>char</code>, <code>integer</code>,
<code>real</code>, or <code>logical</code>). The type
<code>char</code> has the length appended
following an asterisk, e.g., <code>char*256</code>. Variables that are
arrays have their dimension specifier appended inside parentheses. For
example <code>char*1(6)</code> denotes a array of six
<code>char*1</code> values.
</li>
<li>Variable description (includes information on defaults).</li>
<li>Valid values (if restricted).</li>
</ul>
<table border="1" cellpadding="10">
<caption>CLM Namelist Physics Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_physics']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Lake Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_lake']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Biogeochemistry (BGC) Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='bgc']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Biogeochemistry Namelist Nitrogen Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_nitrogen']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Methane Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_methane']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Vertical CN Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_vertcn']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Carbon Isotope Model Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_isotope']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Datasets</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description
</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='datasets']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist History output settings</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='history']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Restart settings</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_restart']"/>
</table>
<table border="1" cellpadding="10">
<caption>CLM Namelist Performance Tuning</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='clm_performance']"/>
</table>
<p>
</p>
<hr/>
<p>
</p>
<h2>Command Line Options to CLM Build-namelist</h2>
<p>Variables that are entered as options to build-namelist (but NOT used by
namelists in code). Most of these are options that could be added to
CLM_BLDNML_OPTS. Included in the table are the following pieces
of information:</p>
<ul>
<li>Variable name.</li>
<li>Type.</li>
<li>Valid values.</li>
<li>Variable description.</li>
</ul>
<table border="1" cellpadding="10">
<caption>CLM Namelist Default Settings</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values, if restricted at all</th>
</tr>
<xsl:apply-templates select="entry[@category='default_settings']"/>
</table>
<p>
</p>
<hr/>
<p>
</p>
<h2>Command Line Options to CLM Build-namelist</h2>
<p>Variables that are entered as options to build-namelist (but NOT used by
namelists in code). Most of these are options that could be added to
CLM_BLDNML_OPTS. Included in the table are the following pieces
of information:</p>
<ul>
<li>Variable name.</li>
<li>Type.</li>
<li>Valid values.</li>
<li>Variable description.</li>
</ul>
<table border="1" cellpadding="10">
<caption>CLM Namelist Default Settings</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values, if restricted at all</th>
</tr>
<xsl:apply-templates select="entry[@category='default_settings']"/>
</table>
<p>
</p>
<hr/>
<p>
</p>
<h2>Namelist items for CLM Tools</h2>
<p>These are namelist items that appear in the CLM Tools under components/clm/tools.
</p>
<table border="1" cellpadding="10">
<caption>CLM mkgriddata</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='mkgriddata']"/>
</table>
<table border="1" cellpadding="10">
<table border="1" cellpadding="10">
<caption>CLM mkgriddata</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='mkgriddata']"/>
</table>
<table border="1" cellpadding="10">
<caption>Miscellaneous CLM tools</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='tools']"/>
</table>
<hr/>
<h2>Namelist items for Driver MEGAN Physics</h2>
<table border="1" cellpadding="10">
<caption>Driver Physics</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values</th>
</tr>
<xsl:apply-templates select="entry[@category='drv_physics']"/>
</table>
<h2>Namelist items for Driver Dry Deposition</h2>
<table border="1" cellpadding="10">
<caption>Driver Dry-Deposition Namelist Options</caption>
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Type</th>
<th>Description</th>
</tr>
<tr>
<th colspan="1">Valid values, if restricted at all</th>
</tr>
<xsl:apply-templates select="entry[@category='dry-deposition']"/>
</table>
<hr/>
</body>
</xsl:template>
<xsl:template match="entry">
<tr>
<td rowspan="2"><font color="#ff0000"><xsl:value-of select="@id"/></font></td>
<td rowspan="2"><xsl:value-of select="@type"/></td>
<td><xsl:apply-templates/></td>
</tr>
<tr>
<td colspan="1"><xsl:if test="string-length(@valid_values)>0"><b>Valid Values: </b>
<xsl:value-of select="@valid_values"/></xsl:if></td>
</tr>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<namelist_definition>
<version>1.0</version>
<!-- The following entries are being used by CLM's build-namelist,
which has not been converted to parse the version 2.0 schema for
a namelist_definition.xml file
-->
<entry id="start_type" type="char*64" category="expdef" group="seq_infodata_inparm" valid_values="startup,branch,continue"> </entry>
<entry id="start_ymd" type="integer" category="time" group="seq_timemgr_inparm"> </entry>
<entry id="glc_nec" type="integer" category="seq_flds" group="seq_cplflds_inparm"> </entry>
</namelist_definition>

View File

@ -0,0 +1,126 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="namelist_definition.xsl"?>
<namelist_definition version="1.0">
<entry id="drv_flds_in_files"
type="char*256(10)"
category="drv_physics"
group="default_settings"
valid_values="" >
List of files to merge together that contains drv_flds_in namelists
The paths are relative to the case directory. drv_flds_in include the namelists that
the driver reads and gives information on additional fields to be passed to different
components that need to look at the same data.
</entry>
<!-- ======================================================================================== -->
<!-- MEGAN VOC emissions namelist options -->
<!-- ======================================================================================== -->
<entry id="megan_factors_file"
type="char*256"
input_pathname="abs"
category="drv_physics"
group="megan_emis_nl"
valid_values="" >
File containing MEGAN emissions factors. Includes the list of MEGAN compounds that can be
used in the Comp_Name variable on the file.
</entry>
<entry id="megan_specifier"
type="char*1024(100)"
category="drv_physics"
group="megan_emis_nl"
valid_values="" >
MEGAN specifier. This is in the form of: Chem-compound = megan_compound(s)
where megan_compound(s) can be the sum of megan compounds with a "+" between them.
In each equation, the item to the left of the equal sign is a CAM chemistry compound, the
items to the right are compounds known to the MEGAN model (single or combinations).
For example: megan_specifier = 'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a'
</entry>
<entry id="megan_mapped_emisfctrs"
type="logical"
category="drv_physics"
group="megan_emis_nl" >
MEGAN mapped isoprene emissions factors switch
If TRUE then use mapped MEGAN emissions factors for isoprene.
</entry>
<entry id="megan_cmpds"
type="char*32(150)"
category="drv_physics"
group="drv_physics"
valid_values=
"isoprene,myrcene,sabinene,limonene,carene_3,ocimene_t_b,pinene_b,pinene_a,2met_styrene,cymene_p,cymene_o,phellandrene_a,thujene_a,terpinene_a,terpinene_g,terpinolene,phellandrene_b,camphene,bornene,fenchene_a,ocimene_al,ocimene_c_b,tricyclene,estragole,camphor,fenchone,piperitone,thujone_a,thujone_b,cineole_1_8,borneol,linalool,terpineol_4,terpineol_a,linalool_OXD_c,linalool_OXD_t,ionone_b,bornyl_ACT,farnescene_a,caryophyllene_b,acoradiene,aromadendrene,bergamotene_a,bergamotene_b,bisabolene_a,bisabolene_b,bourbonene_b,cadinene_d,cadinene_g,cedrene_a,copaene_a,cubebene_a,cubebene_b,elemene_b,farnescene_b,germacrene_B,germacrene_D,gurjunene_b,humulene_a,humulene_g,isolongifolene,longifolene,longipinene,muurolene_a,muurolene_g,selinene_b,selinene_d,nerolidol_c,nerolidol_t,cedrol,MBO_2m3e2ol,methanol,acetone,methane,ammonia,nitrous_OXD,nitric_OXD,acetaldehyde,ethanol,formic_acid,formaldehyde,acetic_acid,MBO_3m2e1ol,MBO_3m3e1ol,benzaldehyde,butanone_2,decanal,dodecene_1,geranyl_acetone,heptanal,heptane,hexane,met_benzoate,met_heptenone,neryl_acetone,nonanal,nonenal,octanal,octanol,octenol_1e3ol,oxopentanal,pentane,phenyl_CCO,pyruvic_acid,terpinyl_ACT_a,tetradecene_1,toluene,carbon_monoxide,butene,ethane,ethene,hydrogen_cyanide,propane,propene,carbon_2s,carbonyl_s,diallyl_2s,2met_2s,2met_s,met_chloride,met_bromide,met_iodide,hydrogen_s,met_mercaptan,met_propenyl_2s,PPPP_2s,2met_nonatriene,met_salicylate,indole,jasmone,met_jasmonate,3met_3DCTT,hexanal,hexanol_1,hexenal_c3,hexenal_t2,hexenol_c3,hexenyl_ACT_c3,homosalate,Ehsalate,pentanal,heptanone,anisole,verbenene,benzyl-acetate,myrtenal,benzyl-alcohol,meta-cymenene,ipsenol,Napthalene">
List of possible MEGAN compounds to use
(the list used by the simulation is on the megan_factors_file as the Comp_Name)
</entry>
<!-- ======================================================================================== -->
<!-- drydep Namelists -->
<!-- ======================================================================================== -->
<entry id="drydep_list"
type="char*32(300)"
category="dry-deposition"
group="drydep_inparm"
valid_values="">
List of species that undergo dry deposition.
</entry>
<entry id="dep_data_file"
type="char*500"
input_pathname="abs"
category="dry_deposition"
group="drydep_inparm"
valid_values="" >
Full pathname of file containing gas phase deposition data including effective
Henry's law coefficients.
</entry>
<!-- ======================================================================================== -->
<!-- Fire emissions fluxes -->
<!-- ======================================================================================== -->
<entry id="fire_emis_factors_file"
type="char*256"
input_pathname="abs"
category="Fire_emissions"
group="fire_emis_nl"
valid_values="" >
File containing fire emissions factors.
Default: none
</entry>
<entry id="fire_emis_specifier"
type="char*1024(100)"
category="Fire_emissions"
group="fire_emis_nl"
valid_values="" >
Fire emissions specifier.
Default: none
</entry>
<entry id="fire_emis_elevated"
type="logical"
category="Fire_emissions"
group="fire_emis_nl"
valid_values="" >
If true fire emissions are input into atmosphere as elevated forcings.
Otherwise they are treated as surface emissions.
Default: TRUE
</entry>
<!-- ======================================================================================== -->
<!-- CARMA fields -->
<!-- ======================================================================================== -->
<entry id="carma_fields" type="char*256" category="carma"
group="carma_inparm" valid_values="" >
List of fluxes needed by the CARMA model, from CLM to CAM.
</entry>
</namelist_definition>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP1-1.9 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP1-1.9 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP1-1.9</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP1-2.6 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP1-2.6 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP1-2.6</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP2-4.5 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP2-4.5 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP2-4.5</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP3-7.0 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP3-7.0 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP3-7.0</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP4-3.4 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP4-3.4 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP4-3.4</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP4-6.0 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP4-6.0 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP4-6.0</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP5-3.4 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP5-3.4 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP5-3.4</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP5-8.5 scenario</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to current day with historical data, and then to 2100 with the CMIP6 SSP5-8.5 scenario</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>1850</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<ssp_rcp>SSP5-8.5</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,54 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc>Conditions to simulate 1850 land-use</use_case_desc>
<sim_year>1850</sim_year>
<sim_year_range>constant</sim_year_range>
<irrigate use_crop=".true." phys="clm5_1">.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" >.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" >.false.</irrigate>
<stream_year_first_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_1" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_1" use_cn=".true." >1850</stream_year_last_ndep>
<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >1850</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >1850</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_1" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_1" cnfireson=".true." >1850</stream_year_last_popdens>
<stream_year_first_urbantv phys="clm4_5" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm4_5" >1850</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_0" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >1850</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_1" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" >1850</stream_year_last_urbantv>
<stream_fldfilename_ndep phys="clm5_1" use_cn=".true."
>lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc</stream_fldfilename_ndep>
<stream_fldfilename_ndep phys="clm5_0" use_cn=".true."
>lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc</stream_fldfilename_ndep>
<stream_fldfilename_ndep phys="clm4_5" use_cn=".true."
>lnd/clm2/ndepdata/fndep_clm_WACCM6_CMIP6piControl001_y21-50avg_1850monthly_0.95x1.25_c180802.nc</stream_fldfilename_ndep>
<ndep_taxmode phys="clm5_0" use_cn=".true." >cycle</ndep_taxmode>
<ndep_taxmode phys="clm5_1" use_cn=".true." >cycle</ndep_taxmode>
</namelist_defaults>

View File

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc>Simulate current conditions without ANY anthropogenic influnces</use_case_desc>
<sim_year>PtVg</sim_year>
<sim_year_range>constant</sim_year_range>
<irrigate>.false.</irrigate>
<stream_year_first_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_1" use_cn=".true.">1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_1" use_cn=".true.">1850</stream_year_last_ndep>
<ndep_taxmode phys="clm5_0" use_cn=".true." >cycle</ndep_taxmode>
<ndep_taxmode phys="clm5_1" use_cn=".true." >cycle</ndep_taxmode>
<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >1925</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >1925</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_1" cnfireson=".true.">1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_1" cnfireson=".true.">1925</stream_year_last_popdens>
<!-- zero population density file -->
<stream_fldfilename_popdens hgrid="0.5x0.5" use_cn=".true."
>lnd/clm2/firedata/clmforc.no_anthro_zero_hdm_1x1_simyr1925_181113.nc</stream_fldfilename_popdens>
<stream_meshfile_popdens hgrid="0.5x0.5" use_cn=".true.">none</stream_meshfile_popdens>
<popdensmapalgo use_cn=".true.">nn</popdensmapalgo>
<stream_year_first_urbantv phys="clm5_1" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" >1850</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_0" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >1850</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm4_5" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm4_5" >1850</stream_year_last_urbantv>
<!-- Turn calculation of human stress indices all the way off to save some CPU -->
<calc_human_stress_indices >NONE</calc_human_stress_indices>
<!-- Turn off URBAN heating and A/C, and turn off harvesting of forests -->
<urban_hac >OFF</urban_hac>
<do_harvest >.false.</do_harvest>
<!-- Set contants having to do with fire due to human influences to zero (human ignition counts, and crop fires -->
<pot_hmn_ign_counts_alpha use_cn=".true.">0.0</pot_hmn_ign_counts_alpha>
<cropfire_a1 use_cn=".true.">0.0</cropfire_a1>
</namelist_defaults>

View File

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc>Conditions to simulate 2000 land-use</use_case_desc>
<sim_year>2000</sim_year>
<sim_year_range>constant</sim_year_range>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false." >.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" >.false.</irrigate>
<stream_year_first_ndep phys="clm4_5" use_cn=".true." >2000</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >2000</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_0" use_cn=".true." >2000</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >2000</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_1" use_cn=".true.">2000</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_1" use_cn=".true.">2000</stream_year_last_ndep>
<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >2000</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >2000</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >2000</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >2000</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_1" cnfireson=".true.">2000</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_1" cnfireson=".true.">2000</stream_year_last_popdens>
<stream_year_first_urbantv phys="clm4_5" >2000</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm4_5" >2000</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_0" >2000</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >2000</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_1" >2000</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" >2000</stream_year_last_urbantv>
</namelist_defaults>

View File

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc>Conditions to simulate 2010 land-use</use_case_desc>
<sim_year>2000</sim_year>
<sim_year_range>constant</sim_year_range>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" >.false.</irrigate>
<stream_year_first_ndep phys="clm4_0" bgc="cn" >2010</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_0" bgc="cn" >2010</stream_year_last_ndep>
<stream_year_first_ndep phys="clm4_0" bgc="cndv" >2010</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_0" bgc="cndv" >2010</stream_year_last_ndep>
<stream_year_first_ndep phys="clm4_5" use_cn=".true." >2010</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >2010</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_0" use_cn=".true." >2010</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >2010</stream_year_last_ndep>
<stream_year_first_ndep phys="clm5_1" use_cn=".true." >2010</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_1" use_cn=".true." >2010</stream_year_last_ndep>
<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >2010</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >2010</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >2010</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >2010</stream_year_last_popdens>
<stream_year_first_popdens phys="clm5_1" cnfireson=".true." >2010</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_1" cnfireson=".true." >2010</stream_year_last_popdens>
<stream_year_first_urbantv phys="clm5_1" >2010</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" >2010</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm5_0" >2010</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >2010</stream_year_last_urbantv>
<stream_year_first_urbantv phys="clm4_5" >2010</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm4_5" >2010</stream_year_last_urbantv>
</namelist_defaults>

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<!-- This use-case is mainly in use for NEON sites -->
<namelist_defaults>
<use_case_desc use_cn=".true.">Simulate transient Nitrogen-deposition, aerosol deposition, urban, and fire related (pop-density, lightning) changes from 2018 to current day with a mix of historical data, and future scenario data</use_case_desc>
<use_case_desc use_cn=".false." use_fates=".true.">Simulate transient Nitrogen-deposition, aerosol deposition, urban, and fire related (pop-density, lightning) changes from 2018 to current day with a mix of historical data, and future scenario data</use_case_desc>
<use_case_desc use_cn=".false." use_fates=".false.">Simulate transient urban and aerosol deposition changes from 2018 to current day with a mix of historical data, and future scenario data</use_case_desc>
<!-- Have a minimal list of things set here, sim_year, sim_year_range, and ssp_rcp, other things should be dependent on these and
set in a namelist_defaults xml file -->
<sim_year>2018</sim_year>
<sim_year_range>1850-2100</sim_year_range>
<!-- Use future data as needed from the SSP3-7.0 scenario-->
<ssp_rcp>SSP3-7.0</ssp_rcp>
<stream_year_first_ndep use_cn=".true." >2018</stream_year_first_ndep>
<stream_year_last_ndep use_cn=".true." >2022</stream_year_last_ndep>
<model_year_align_ndep use_cn=".true." >2018</model_year_align_ndep>
<stream_year_first_popdens cnfireson=".true." >2018</stream_year_first_popdens>
<stream_year_last_popdens cnfireson=".true." >2022</stream_year_last_popdens>
<model_year_align_popdens cnfireson=".true." >2018</model_year_align_popdens>
<stream_year_first_urbantv >2018</stream_year_first_urbantv>
<stream_year_last_urbantv >2022</stream_year_last_urbantv>
<model_year_align_urbantv >2018</model_year_align_urbantv>
</namelist_defaults>

View File

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!-- This use-case is mainly in use for NEON sites -->
<namelist_defaults>
<use_case_desc>Conditions to simulate 2018 land-use</use_case_desc>
<sim_year>2018</sim_year>
<sim_year_range>constant</sim_year_range>
<!-- Use future data as needed from the SSP3-7.0 scenario-->
<ssp_rcp>SSP3-7.0</ssp_rcp>
</namelist_defaults>

View File

@ -0,0 +1,63 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc >Simulate transient land-use, and aerosol deposition changes from 1850 to 2015</use_case_desc>
<use_case_desc bgc="cn" >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to 2015</use_case_desc>
<use_case_desc use_cn=".true." >Simulate transient land-use, aerosol deposition, and Nitrogen deposition changes from 1850 to 2015</use_case_desc>
<sim_year>1850</sim_year>
<sim_year_range>1850-2000</sim_year_range>
<clm_start_type>arb_ic</clm_start_type>
<!-- For now use cycle for transient cases until CDEPS issue 201 is resolved
<ndep_taxmode use_cn=".true." >limit</ndep_taxmode>
-->
<clm_demand >flanduse_timeseries</clm_demand>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false." >.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" >.false.</irrigate>
<stream_year_first_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >2015</stream_year_last_ndep>
<model_year_align_ndep phys="clm4_5" use_cn=".true." >1850</model_year_align_ndep>
<stream_year_first_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >2015</stream_year_last_ndep>
<model_year_align_ndep phys="clm5_0" use_cn=".true." >1850</model_year_align_ndep>
<stream_year_first_ndep phys="clm5_1" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_1" use_cn=".true." >2015</stream_year_last_ndep>
<model_year_align_ndep phys="clm5_1" use_cn=".true." >1850</model_year_align_ndep>
<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >2016</stream_year_last_popdens>
<model_year_align_popdens phys="clm4_5" cnfireson=".true." >1850</model_year_align_popdens>
<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >2016</stream_year_last_popdens>
<model_year_align_popdens phys="clm5_0" cnfireson=".true." >1850</model_year_align_popdens>
<stream_year_first_popdens phys="clm5_1" cnfireson=".true." >1850</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_1" cnfireson=".true." >2016</stream_year_last_popdens>
<model_year_align_popdens phys="clm5_1" cnfireson=".true." >1850</model_year_align_popdens>
<stream_year_first_urbantv phys="clm4_5" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm4_5" >2106</stream_year_last_urbantv>
<model_year_align_urbantv phys="clm4_5" >1850</model_year_align_urbantv>
<stream_year_first_urbantv phys="clm5_0" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >2106</stream_year_last_urbantv>
<model_year_align_urbantv phys="clm5_0" >1850</model_year_align_urbantv>
<stream_year_first_urbantv phys="clm5_1" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_1" >2106</stream_year_last_urbantv>
<model_year_align_urbantv phys="clm5_1" >1850</model_year_align_urbantv>
</namelist_defaults>

View File

@ -0,0 +1,42 @@
$CTSMROOT/namelist_files/use_cases/README Jun/08/2018
Naming Convention for CLM use-cases
The build-namelist script checks for conformance with these conventions and won't work for names that
don't follow the convention.
Ending suffix requires one of these endings: _transient, _control or _pd
Transient cases:
yyyy-yyyy_$ssp_rcp$desc_transient (for example 1850-2100_SSP5-8.5_transient)
or
20thC$desc_transient (means nominal 1850-2000 although some datasets are 1850-2005)
or
yyyy-PD_$desc_transient (means nominal year yyyy through present day (PD) (with the year for PD advancing)
Control cases:
yyyy$desc_control
Present day options (uses default present-day simulation year -- which right now is 2000):
$desc_pd
Where
yyyy = Simulation year (such as 1850 or 2000).
yyyy-yyyy = Range of simulation years to run over (i.e.. 1850-2000).
yyyy-PD = Range of simulation years to run over until present day (i.e.. 2018-2024).
$ssp_rcp = Shared Socieconomic Pathway (SSP) Representative concentration pathway (RCP) description string
for future scenarios:
SSP#-#.# (for example: SSP5-8.5, SSP1-2.6, SSP4-6.0
[can be blank for historical cases].
$desc = Description of anything else -- alpha-numeric.
Should start with an underscore ("_") if not by itself
(for _transient and _control).

View File

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<namelist_defaults>
<use_case_desc>Standard Urban Point Namelist Settings</use_case_desc>
<hist_empty_htapes>.true.</hist_empty_htapes>
<hist_dov2xy>.true., .false., .true.</hist_dov2xy>
<hist_fincl1>'TBUILD','BUILDHEAT','TRAFFICFLUX','WASTEHEAT','SWup','LWup','Rnet','Qh','Qle','Qstor','Qtau','Qanth','Wind','Qair','Tair','PSurf','Rainf','SWdown','LWdown','COSZEN'</hist_fincl1>
<hist_fincl2>'TG','TBOT','FIRE','FIRA','FLDS','FSDS','FSR','FSA','FGEV','FSH','FGR','TSOI','ERRSOI','BUILDHEAT','SABV','SABG','FSDSVD','FSDSND','FSDSVI','FSDSNI','FSRVD','FSRND','FSRVI','FSRNI','TSA','FCTR','FCEV','QBOT','Q2M','H2OSOI','H2OSNO','SOILLIQ','SOILICE','SWup','LWup','Rnet','Qh','Qle','Qstor','Qtau','Qanth','Wind','Qair','Tair','PSurf','Rainf','SWdown','LWdown','SoilAlpha_U','ZWT'
</hist_fincl2>
<hist_fincl3>'SWup','LWup','Rnet','Qh','Qle','Qstor','Qtau','Qanth','Wind','Qair','Tair','PSurf','Rainf','SWdown','LWdown','FSA','FIRA','TG','COSZEN','SoilAlpha_U','TBUILD','BUILDHEAT'
</hist_fincl3>
<urban_hac>'OFF'</urban_hac>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_1" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".false.">.true.</irrigate>
<irrigate use_crop=".true." phys="clm5_0" use_cndv=".true." >.false.</irrigate>
<irrigate use_crop=".true." phys="clm4_5" >.false.</irrigate>
</namelist_defaults>

View File

@ -0,0 +1,218 @@
###############################################################################
#
# Module: NMLTest::CompFiles
#
# Created by Erik Kluzek NCAR
#
# This is a tester built on top of Test::More to compare namelist files
# (or really any ASCII text files). There is a mechanism for telling the
# test object that you should (or should NOT) expect the comparison to be
# exact or not.
#
###############################################################################
package NMLTest::CompFiles;
use strict;
use Test::More;
use IO::File;
=head1 NAME
NMLTest::CompFiles - A comparision tester for namelist (or ASCII text) files
=head1 SYNOPSIS
=head1 DESCRIPTION
=cut
sub new {
my $self = {};
my $class = shift;
my $dir = shift;
my @files = @_;
my $nm = ref($self)."\:\:new";
my %diffref = { };
$self->{'diffref'} = \%diffref;
if ( ! -d "$dir" ) {
die "ERROR::($nm) Input directory ($dir) does NOT exist!\n";
}
$self->{'dir'} = $dir;
$self->{'files'} = \@_;
bless( $self, $class );
}
sub checkfilesexist {
#
# Check that files exist
#
my $self = shift;
my $type = shift;
my $mode = shift;
my $nm = ref($self)."\:\:checkfilesexist";
my $filesref = $self->{'files'};
my $confdir = $self->{'dir'};
foreach my $file ( @$filesref ) {
my $exists = ( -f "$confdir/$file" );
ok( $exists, "$type $mode: $file file exists" );
if ( $exists ) {
$self->dodiffonfile( $file, $type, $mode );
} else {
$self->doNOTdodiffonfile( $file, $type, $mode );
}
}
}
sub comparefiles {
#
# Compare the resultant files to the default versions
#
my $self = shift;
my $type = shift;
my $comp_mode = shift;
my $compdir = shift;
my $nm = ref($self)."\:\:comparefiles";
$type =~ s#[ '"&/]#+#g;
$comp_mode =~ s#[ '"&/]#+#g;
my $confdir = $self->{'dir'};
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
$type = "default";
}
my $compare = "compare to previous tag";
if ( ! defined($compdir) ) {
$compdir = ".";
$compare = undef;
}
if ( ! -d "$compdir" ) {
die "ERROR($nm):: Compare directory $compdir does NOT exist!\n";
}
print "Compare files for $type type MODE=$comp_mode $compare\n";
my $diffstat;
my %diffhas = %$diffref;
my $same = "file the same as expected";
my $diff = "file different as expected";
my $filesref = $self->{'files'};
foreach my $file ( @$filesref ) {
if ( ! -f "$compdir/${file}.$comp_mode.${type}" ) {
print "WARNING($nm):: File $compdir/${file}.$comp_mode.${type} does NOT exist!\n";
fail( "compare file $file DNE for $comp_mode and $type" );
} else {
if ( ! exists($diffhas{$comp_mode}{$type}{$file}) ) {
die "ERROR($nm):: difference is NOT setup for $comp_mode ${type} $file!\n";
}
system( "diff $confdir/${file} $compdir/${file}.$comp_mode.${type} > /dev/null" );
$diffstat = $?;
if ( $diffhas{$comp_mode}{$type}{$file} ) {
ok( ! $diffstat, "$file $same for $comp_mode" );
} else {
ok( $diffstat, "$file different as expected for $comp_mode" );
}
}
}
}
sub copyfiles {
#
# Copy the namelist files to default names for comparisions
#
my $self = shift;
my $type = shift;
my $mode = shift;
my $nm = ref($self)."\:\:copyfiles";
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
my $filesref = $self->{'files'};
my $confdir = $self->{'dir'};
foreach my $file ( @$filesref ) {
system( "/bin/cp $confdir/$file ${file}.${mode}.${type}" );
$$diffref{${mode}}{${type}}{$file} = 1;
}
print "$type namelists for $mode\n";
foreach my $file ( @$filesref ) {
system( "/bin/cat $file.${mode}.${type}" );
}
}
sub shownmldiff {
#
# Show the differences in the namelists
#
my $self = shift;
my $type = shift;
my $comp_mode = shift;
my $nm = ref($self)."\:\:shownmldiff";
$type =~ s#[ '"&/]#+#g;
$comp_mode =~ s#[ '"&/]#+#g;
my $filesref = $self->{'files'};
my $confdir = $self->{'dir'};
foreach my $file ( @$filesref ) {
my $file1 = "$confdir/$file";
if ( ! -f "$file1" ) {
print "$file1 does NOT exist\n";
return;
}
my $file2 = "${file}.${comp_mode}.${type}";
if ( ! -f "$file2" ) {
print "$file2 does NOT exist\n";
return;
}
print "Diff in in $file to $type $comp_mode version";
system( "diff $file1 $file2" );
}
}
sub dodiffonfile {
#
# Set it so that it does do a difference on the given input file
#
my $self = shift;
my $file = shift;
my $type = shift;
my $mode = shift;
my $nm = ref($self)."\:\:dodiffonfile";
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
$type = "default";
}
$$diffref{$mode}{$type}{$file} = 1;
}
sub doNOTdodiffonfile {
#
# Set it so that it does NOT do a difference on the given input file
#
my $self = shift;
my $file = shift;
my $type = shift;
my $mode = shift;
my $nm = ref($self)."\:\:doNOTdodiffonfile";
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
$type = "default";
}
$$diffref{$mode}{$type}{$file} = 0;
}
#-----------------------------------------------------------------------------------------------
1 # to make use or require happy

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
&clm_inparm
fsurdat = "$DIN_LOC_ROOT/lnd/clm2/PTCLMmydatafiles/1x1pt_US-UMB/surfdata_1x1pt_US-UMB_simyr2000_clm4_5_c131122.nc"
/

View File

@ -0,0 +1,45 @@
<?xml version= "1.0"?>
<expectedFails>
<namelistTest>
<yellowstone>
<INTEL>
<compare>
</compare>
<generate>
</generate>
</INTEL>
</yellowstone>
<goldbach>
<INTEL>
<compare>
</compare>
<generate>
</generate>
</INTEL>
</goldbach>
</namelistTest>
<tools_test_driver>
<yellowstone>
<INTEL>
</INTEL>
</yellowstone>
<goldbach>
<INTEL>
<entry testId="sm684" failType="FAIL">goldbach not recognized</entry>
<entry testId="smf84" failType="FAIL">goldbach not recognized</entry>
<entry testId="smfc4" failType="FAIL">goldbach not recognized</entry>
</INTEL>
</goldbach>
</tools_test_driver>
<unit_tests>
<yellowstone>
<INTEL>
<entry failType="CFAIL">Internal compiler error</entry>
</INTEL>
</yellowstone>
</unit_tests>
</expectedFails>

View File

@ -0,0 +1,668 @@
=head1 expectedFail.pm
Documentation for expectedFail.pm
=head1 Overview
The module expectedFail.pm supplies the capability of checking if a failed test is expected to fail.
It is called directly from either test_driver.sh (for batch and interactive tests) or build-namelist_test.pl.
Future plans involve integrating this module into cesm tests.
=head1 Use Case
This is a new feature being added to the existing CLM test infrastructure. The use case would roughly be
along the lines of:
1) Run the test suite (CLM batch,interactive or namelist)
2) Search for test failures
a) Fix failed tests
b) -or- Add new xFail entries to XML file if a test is supposed to fail (eg. due to some missing resolution).
3) Check for new tests that now pass. This is for modifying the ChangeLog.
4) Update XML file by either adding new entries or removing old ones.
5) update the ChangeLog to reflect important changes in test behavior (Tests that now pass that failed before, tests that
are now xFail, etc...
=head2 Public methods
There are two public methods needed. The "new" ctor and one of the parseOutput* methods.
Everything else is private.
xFail::expectedFail->new
parseOutput
parseOutputCLM
=head2 Private methods
sub _searchExpectedFail
sub _readXml
sub _testNowPassing
sub _printOutput
sub _getTestType
sub _getMachInfo
=cut
package xFail::expectedFail;
our $VERSION = '1.00';
use Cwd;
use strict;
use Getopt::Long;
use English;
use Scalar::Util qw(looks_like_number);
my @testList={};
my $DEBUG=0;
my $pass=" PASS";
my $fail=" FAIL";
my $xfail="xFAIL";
##############################################################################
#
##############################################################################
=head1 CTOR
Constructor for the class. Reads in three arguments:
_callingName -> name of the script creating the new object
_compareGenerate -> compare or generate option
_totTests -> total number of tests to run
Calls _readXml which reads the file expectedClmTestFails.xml and stores it memory
for later searches.
returns: new object ($self)
=cut
##############################################################################
#
##############################################################################
sub new {
my ($class_name) = @_;
my $self = {
_className => shift,
_callingName => shift,
_compareGenerate => shift,
_totTests => shift,
_foundList => undef,
_numericalTestId => undef
};
if ($DEBUG) {
print "$self->{_callingName}\n";
print "$self->{_compareGenerate}\n";
}
bless ($self, $class_name);
$self->{_numericalTestId}=0;
$self->{_created} = 1;
$self->_readXml();
return $self;
}
##############################################################################
#
##############################################################################
=head1 parseOutput
parseOutput parsese the output from the build-namelist_test.pl script. It is similar
to, but not interchangable with parseOutputCLM.
The only argument is that of the reference variable that contains the information dumped
by Test::More.
returns: nothing
=cut
##############################################################################
#
##############################################################################
sub parseOutput
{
my $report;
my $testId;
my @testName={};
my $testReason;
my ($self, $output) = @_ ;
#_#===========================================
#_# keep this in for logging
#_#===========================================
print ("captured output is :: \n $output \n");
#_# split the output from Test::More output on newline
my @refList = split('\n', $output);
#_# process any buffered output which happens when a subroutine from build-namelist_test.pl
#_# itself calls some testing routines
foreach my $refSplit (@refList) {
#_# always look at the last element of refSplit since that will have the info. from the
#_# last test run
my @outArr=split(/ /,$refSplit);
if ($DEBUG) {
print ("\nxFail::expectedFail::parseOutput @outArr[0] \n");
print ("xFail::expectedFail::parseOutput @outArr[1] \n");
print ("xFail::expectedFail::parseOutput @outArr[2] \n");
print ("xFail::expectedFail::parseOutput @outArr[3] \n");
print ("xFail::expectedFail::parseOutput @outArr[4] \n");
}
my $size = @outArr-1;
#_# first case, we have a passed (ok) test
if (@outArr[0] eq "ok") {
$self->{_numericalTestId}++;
$report=$pass;
$testId=@outArr[1];
@testName=@outArr[3..$size];
$testReason="";
my ($retVal,$xFailText)=$self->_searchExpectedFail($testId);
my $testReason=$self->_testNowPassing($testId,$retVal,$xFailText);
if($DEBUG){
print("$testReason \n");
}
$self->_printOutput($report,$testId,$testReason,@testName);
#_# deal with the case of a failed (not ok) test
} elsif (@outArr[0] eq "not") {
$self->{_numericalTestId}++;
$testId=@outArr[2];
my ($retVal,$xFailText)=$self->_searchExpectedFail($testId);
if ($DEBUG) {
print ("xFail::expectedFail::parseOutput Id $retVal,$xFailText \n");
}
@testName=@outArr[4..$size];
if ($retVal eq "TRUE"){
#_# found an expected FAIL (xFAIL)
$report=$xfail;
$testReason= "<Note: $xFailText>";
} else {
#_# print a regular FAIL
$report=$fail;
$testReason="";
}
$self->_printOutput($report,$testId,$testReason,@testName);
} else {
#_# skipping line. Trying to parse error code from Test::More
}
}
#_# this resets the reference that points to $output (\$captOut) on the caller side
@_[1]="";
}
##############################################################################
#
##############################################################################
=head1 parseOutputCLM
parseOutputCLM parsese the output from the test_driver.sh script. It is similar
to, but not interchangable with parseOutput.
parseOutputCLM takes one arguments:
$statFoo-> the name of the td.<pid>.status file
returns: nothing
=cut
##############################################################################
#
##############################################################################
sub parseOutputCLM
{
my $report;
my $testId;
my @testName={};
my $testReason;
my ($self, $statFoo) = @_ ;
open(FOO, "< $statFoo"); # open for input
open(FOO_OUT, "> $statFoo.xFail"); # open for input
my(@reportLines);
while (<FOO>) {
my($line) = $_;
my @outArr=split(/ /,$line);
if (looks_like_number(@outArr[0])) {
$self->{_numericalTestId}++;
my $num=sprintf("%03d", $self->{_numericalTestId});
my $totNum=sprintf("%03d", $self->{_totTests});
#_# last element has the pass/fail info.
chomp(@outArr[-1]);
my $repPass=substr(@outArr[-1], -4, 4);
if ($DEBUG) {
print ("xFail::expectedFail::parseOutput @outArr[0] \n");
print ("xFail::expectedFail::parseOutput @outArr[1] \n");
print ("xFail::expectedFail::parseOutput @outArr[2] \n");
print ("xFail::expectedFail::parseOutput @outArr[3] \n");
print ("xFail::expectedFail::parseOutput @outArr[4] \n");
print ("xFail::expectedFail::parseOutput @outArr[5] \n");
print ("xFail::expectedFail::parseOutput @outArr[6] \n");
print ("xFail::expectedFail::parseOutput @outArr[-1] \n");
print ("xFail::expectedFail::parseOutput $repPass \n");
}
my $size = @outArr-1;
if ($DEBUG) {
print ("size of line $size \n");
}
my $endOfDesc=$size-1;
if ($repPass eq "PASS") {
$report=$pass;
$testId=@outArr[1];
@testName=@outArr[2..$endOfDesc];
my ($retVal,$xFailText)=$self->_searchExpectedFail($testId);
my $testReason=$self->_testNowPassing($testId,$retVal,$xFailText);
#_# print out the test results
print FOO_OUT ("$num/$totNum <$report> <Test Id: $testId> <Desc: @testName> $testReason \n");
} else {
$testId=@outArr[1];
my ($retVal,$xFailText)=$self->_searchExpectedFail($testId);
if ($DEBUG) {
print ("xFail::expectedFail::parseOutput Id $retVal,$xFailText \n");
}
@testName=@outArr[2..$endOfDesc];
if ($retVal eq "TRUE"){
#_# found an expected FAIL (xFAIL)
$report=$xfail;
$testReason= "<Note: $xFailText>";
} else {
#_# print a regular FAIL
$report=$fail;
$testReason="";
}
#_# print out the test results
print FOO_OUT ("$num/$totNum <$report> <Test Id: $testId> <Desc: @testName> $testReason \n");
}
} else {
print FOO_OUT $line;
}
}
close(FOO);
close(FOO_OUT);
}
##############################################################################
#
##############################################################################
=head1 _searchExpectedFail
searches the list of expected fails for a match with testId.
_searchExpectedFail takes one arguments:
$testId-> the test id (numerical or string) that we want to search for
returns: $retVal (TRUE or FALSE) if id was found
$text text from XML file
=cut
##############################################################################
#
##############################################################################
sub _searchExpectedFail
{
my ( $self,$testId) = @_;
#search through list for test ID
my $retVal="FALSE";
if ($DEBUG) {
print ("here 2 Id $self->{_foundList} \n");
}
if ($self->{_foundList} eq "FALSE"){
if ($DEBUG) {
print ("returning early Id \n");
}
return $retVal;
}
my $failType;
my $text;
foreach my $tL (@testList) {
my %tAtts = $tL->get_attributes();
my $tid=$tAtts{'testId'};
if ($DEBUG) {
print ("_seachExpectedFail Id $tid $testId \n");
}
if ($tid eq $testId) {
if ($DEBUG) {
print ("here Id \n");
}
#~# found the test we're looking for
$text=$tL->get_text();
$failType=$tAtts{'failType'};
if ($failType eq "xFail"){
$retVal="TRUE";
}
}
}
return ($retVal,$text);
}
##############################################################################
#
##############################################################################
=head1 _readXml
reads the xml file for a particular machine, compiler, test type and (compare
| generate) setup and saves it in memory for searching by _searchExpectedFail.
_readXml takes no arguments
returns: nothing
=cut
##############################################################################
#
##############################################################################
sub _readXml
{
my ( $self ) = @_;
#Figure out where configure directory is and where can use the XML/Lite module from
my $ProgName;
($ProgName = $PROGRAM_NAME) =~ s!(.*)/!!; # name of program
my $ProgDir = $1; # name of directory where program lives
my $cwd = getcwd(); # current working directory
my $cfgdir;
if ($ProgDir) { $cfgdir = $ProgDir; }
else { $cfgdir = $cwd; }
#-----------------------------------------------------------------------------------------------
# Add $cfgdir to the list of paths that Perl searches for modules
my @dirs = ( $cfgdir, "$cfgdir/perl5lib",
"$cfgdir/../../cime/utils/perl5lib",
"$cfgdir/../../../../cime/utils/perl5lib"
);
unshift @INC, @dirs;
my $result = eval "require XML::Lite";
if ( ! defined($result) ) {
die <<"EOF";
** Cannot find perl module \"XML/Lite.pm\" from directories: @dirs **
EOF
}
#-----------------------------------------------------------------------------------------------
my ($machine,$compiler)=_getMachInfo();
my $testType=$self->_getTestType($self->{_callingName});
my $xmlFile=undef;
if ($testType eq "clmInteractive" || $testType eq "clmBatch") {
$xmlFile = "$cfgdir/expectedClmTestFails.xml";
} elsif ($testType eq "namelistTest") {
$xmlFile = "xFail/expectedClmTestFails.xml";
} else {
$xmlFile = "xFail/expectedClmTestFails.xml";
}
my $xml = XML::Lite->new($xmlFile);
my $root = $xml->root_element();
if ($DEBUG) {
print "_readXml $self->{_callingName}\n";
print "_readXml $self->{_compareGenerate}\n";
print "_readXml $xmlFile \n";
print ("_readXml Debug testType $testType \n");
print ("_readXml Debug machine $machine \n");
print ("_readXml Debug compiler $compiler \n");
}
# Check for valid root node
my $name = $root->get_name();
$name eq "expectedFails" or die
"readExpectedFail.pm::_readXml :: $xmlFile is not a file that contains expected test failures\n";
my @e = $xml->elements_by_name($testType);
$self->{_foundList}="FALSE";
### populate list of tests for a specfic test type, machine and compiler
### there's got to be a better way to write this
while ( my $e = shift @e ) {
my @mChildren = $e->get_children();
foreach my $mChild (@mChildren) {
my $mName=$mChild->get_name();
if ($mName eq $machine){
my @cChildren = $mChild->get_children();
foreach my $cChild (@cChildren) {
my $cName=$cChild->get_name();
if ($cName eq $compiler) {
my @cgChildren=$cChild->get_children();
foreach my $cgChild (@cgChildren) {
my $cgName=$cgChild->get_name();
if($cgName eq $self->{_compareGenerate}){
@testList=$cgChild->get_children();
$self->{_foundList}="TRUE";
last;
}
}
}
}
}
}
}
if ($DEBUG) {
print ("here 1 $self->{_foundList} \n");
}
}
##############################################################################
#
##############################################################################
=head1 _testNowPassing
reads the xml file for a particular machine, compiler, test type and (compare
| generate) setup and saves it in memory for searching by _searchExpectedFail.
_testNowPassing takes three arguments:
$id - test id to print out
$retVal - TRUE or FALSE. Was the id found in the expected fail list
$xmlText - text from the XML notes section of the file. (Currently not used,
may be used in future).
returns: a text string
=cut
##############################################################################
#
##############################################################################
sub _testNowPassing
{
my ($self, $id, $retVal, $xmlText) = @_ ;
my $text=undef;
if ($retVal eq "TRUE") {
#_# found a test that passes now, but is listed as an xFail
$text = "<NOTE: $id is a new PASS; was xFAIL>\n";
} else {
#_# this test passes and was not previously listed as an xFail
#_# noOp
}
return $text;
}
##############################################################################
#
##############################################################################
=head1 _printOutput
method that prints output for status files.
_printOutput takes four arguments:
$report - PASS,FAIL,xFAIL
$testId - test id to print out
$testReason - for xFAIL and new PASSES, additional reporting
@testName - test description from original test
returns: a text string
=cut
##############################################################################
#
##############################################################################
sub _printOutput
{
my ($self, $report, $testId, $testReason, @testName) = @_ ;
#_# print out the test results
my $num=sprintf("%03d", $self->{_numericalTestId});
my $totNum=sprintf("%03d", $self->{_totTests});
print ("$num/$totNum <$report> <Test Id: $testId> <Desc: @testName> $testReason \n");
}
##############################################################################
#
##############################################################################
=head1 _getTestType
method that takes the name of the calling script and returns the type of
test. Used for searching the expected fail list.
_getTestType takes four arguments:
$name - name of calling script
returns: $type, the type of test
=cut
##############################################################################
#
##############################################################################
sub _getTestType
{
my ($self, $name) = @_ ;
if($DEBUG){
print ("_getTestType $name");
}
my %testTypes = (
"build-namelist_test.pl" => "namelistTest",
"test_driver.sh-i" => "clmInteractive",
"test_driver.sh" => "clmBatch",
"clm-cesm.sh" => "cesm"
);
my $type = $testTypes {lc $name} || "unknown";
return $type;
}
##############################################################################
#
##############################################################################
=head1 _getMachInfo
method that figures out on what platform this is running and returns a 2 digit
machine identifier and the compiler. This will eventually contain multiple
compiler for various machines.
_getMachInfo takes no arguments
returns: $mach - the machine I'm running on
$comp - the compiler being used
=cut
##############################################################################
#
##############################################################################
sub _getMachInfo
{
my $name=`uname -n`;
$name = substr($name, 0, 2);
my %machNames = (
"ys" => "yellowstone",
"fr" => "frankfurt"
);
my %compNames = (
"ys" => "INTEL",
"fr" => "INTEL"
);
my $mach = $machNames {lc $name} || "unknown";
my $comp = $compNames {lc $name} || "unknown";
return ($mach,$comp);
}
# A Perl module must end with a true value or else it is considered not to
# have loaded. By convention this value is usually 1 though it can be
# any true value. A module can end with false to indicate failure but
# this is rarely used and it would instead die() (exit with an error).
1;

View File

@ -0,0 +1,128 @@
#!/usr/bin/env perl
#-# =========================================================================================
=head1 wrapClmTest.pl
=head1 Overview
This is a wrapper script that is called from test_driver.sh for either interactive or batch
tests. It calls the CTOR for the xFail::expectedFail.pm module and also parses the td*.status
file to create a new file with xFails listed.
It takes the following arguments:
numberOfTests -> number of tests from test_driver.sh
statusFile -> name of the td.<pid>.status file
callingScript -> name of script calling this. For test_driver.sh it may be one of:
1) test_driver.sh-i for interactive tests
2) test_driver.sh for batch tests
=head1 Notes
This script may be run standalone which is useful for testing purposes.
=cut
#-# =========================================================================================
use strict;
use Getopt::Long;
use English;
use Cwd;
use Scalar::Util qw(looks_like_number);
my $DEBUG=0;
sub usage {
die <<EOF;
SYNOPSIS
wrapClmTests [options]
Usually called from test_driver.sh. Scans the td.*.status file and checks for expected test failures.
OPTIONS
-help [or -h] Print usage to STDOUT.
-numberOfTests "numberOfTests"
-statusFile "statusFile" Name of status file
-callingScript "callingScript" Name of calling script
EOF
}
#
# Process command-line options.
#
my %opts = ( help => 0,
numberOfTests => undef,
statusFile => undef,
callingScript => undef,
);
GetOptions(
"h|help" => \$opts{'help'},
"numberOfTests=s" => \$opts{'numberOfTests'},
"statusFile=s" => \$opts{'statusFile'},
"callingScript=s" => \$opts{'callingScript'},
) or usage();
# Give usage message.
usage() if $opts{'help'};
my $statFoo = undef;
my $nTests = undef;
my $script= undef;
if (defined($opts{'statusFile'})) {
$statFoo = $opts{'statusFile'};
}
if (defined($opts{'numberOfTests'})) {
$nTests = $opts{'numberOfTests'};
}
if (defined($opts{'callingScript'})) {
$script = $opts{'callingScript'};
}
my ( $self ) = @_;
#Figure out where configure directory is and where can use the XML/Lite module from
my $ProgName;
($ProgName = $PROGRAM_NAME) =~ s!(.*)/!!; # name of program
my $ProgDir = $1; # name of directory where program lives
my $cwd = getcwd(); # current working directory
my $cfgdir;
if ($ProgDir) { $cfgdir = $ProgDir; }
else { $cfgdir = $cwd; }
#-----------------------------------------------------------------------------------------------
# Add $cfgdir to the list of paths that Perl searches for modules
#-----------------------------------------------------------------------------------------------
my @dirs = ( $cfgdir,
"$cfgdir/../",
"$cfgdir/../../../../../cime/utils/perl5lib");
unshift @INC, @dirs;
my $result = eval "require expectedFail";
if ( ! defined($result) ) {
die <<"EOF";
** Cannot find perl module \"xFail/expectedFail.pm\" from directories: @dirs **
EOF
}
#_# ====================================
#_# setup work complete. Now parse file
#_# ====================================
if ($DEBUG) {
print (" wrapClmTests.pl:: calling script $script \n");
print (" wrapClmTests.pl:: number of tests $nTests \n");
print (" wrapClmTests.pl:: processing $statFoo \n");
}
#_# compGen not used for CLM batch or interactive tests, but we use "compare" as the default in this case
my $compGen="compare";
my $xFail = xFail::expectedFail->new($script,$compGen,$nTests);
$xFail->parseOutputCLM($statFoo);
exit(0);

View File

View File

@ -0,0 +1,94 @@
"""
CTSM-specific test that first runs the fsurdat_modifier tool and then ensures
that the CTSM does not fail using the just-generated modified fsurdat file
"""
import os
import re
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
# For calling fsurdat_modifier
from argparse import Namespace
_CTSM_PYTHON = os.path.join(
os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir, "python"
)
sys.path.insert(1, _CTSM_PYTHON)
logger = logging.getLogger(__name__)
class FSURDATMODIFYCTSM(SystemTestsCommon):
def __init__(self, case):
"""
initialize an object interface to the SMS system test
"""
SystemTestsCommon.__init__(self, case)
if not os.path.exists(
os.path.join(self._get_caseroot(), "done_FSURDATMODIFYCTSM_setup.txt")
):
# Create out-of-the-box lnd_in to obtain fsurdat_in
case.create_namelists(component="lnd")
# If fsurdat_in does not exist, download it from the server
case.check_all_input_data()
lnd_in_path = os.path.join(self._get_caseroot(), "CaseDocs/lnd_in")
with open(lnd_in_path, "r") as lnd_in:
for line in lnd_in:
fsurdat_in = re.match(r" *fsurdat *= *'(.*)'", line)
if fsurdat_in:
self._fsurdat_in = fsurdat_in.group(1)
break
self._fsurdat_out = os.path.join(self._get_caseroot(), "fsurdat.nc")
self._ctsm_root = self._case.get_value("COMP_ROOT_DIR_LND")
self._cfg_file_path = os.path.join(self._get_caseroot(), "modify_fsurdat.cfg")
logger.info(" create config file to modify")
self._create_config_file()
logger.info(" run modify_fsurdat")
self._run_modify_fsurdat()
logger.info(" modify user_nl files")
self._modify_user_nl()
with open("done_FSURDATMODIFYCTSM_setup.txt", "w") as fp:
pass
def _create_config_file(self):
cfg_template_path = os.path.join(
self._ctsm_root, "tools/modify_input_files/modify_fsurdat_template.cfg"
)
with open(self._cfg_file_path, "w") as cfg_out:
with open(cfg_template_path, "r") as cfg_in:
for line in cfg_in:
if re.match(r" *fsurdat_in *=", line):
line = "fsurdat_in = {}".format(self._fsurdat_in)
elif re.match(r" *fsurdat_out *=", line):
line = "fsurdat_out = {}".format(self._fsurdat_out)
elif re.match(r" *idealized *=", line):
line = "idealized = True"
cfg_out.write(line)
def _run_modify_fsurdat(self):
fsurdat_modifier_args = Namespace(
cfg_path=self._cfg_file_path,
debug=False,
fsurdat_in="UNSET",
fsurdat_out="UNSET",
overwrite=False,
silent=False,
verbose=False,
)
from ctsm.modify_input_files.fsurdat_modifier import fsurdat_modifier
fsurdat_modifier(fsurdat_modifier_args)
def _modify_user_nl(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="fsurdat = '{}'".format(self._fsurdat_out),
)

View File

@ -0,0 +1,24 @@
"""
Implementation of the CTSM FUNIT test.
This "system" test runs CTSM's Fortran unit tests. We're abusing the system test
infrastructure to run these, so that a run of the test suite can result in the unit tests
being run as well.
Grid and compset are irrelevant for this test type.
"""
import os
from CIME.SystemTests.funit import FUNIT
from CIME.XML.standard_module_setup import *
logger = logging.getLogger(__name__)
class FUNITCTSM(FUNIT):
def __init__(self, case):
FUNIT.__init__(self, case)
def get_test_spec_dir(self):
lnd_root = self._case.get_value("COMP_ROOT_DIR_LND")
return os.path.join(lnd_root, "src")

View File

@ -0,0 +1,41 @@
"""
Implementation of the CIME LCISO (Land Carbon Isotope) test.
This is a CTSM specific test:
Verifies turning on carbon isotopes doesn't change answers
(1) do a run with Carbon isotopes off (suffix base)
(2) add C13 and C14 carbon isotopes on with their time-series (suffix cisoallon)
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LCISO(SystemTestsCompareTwo):
def __init__(self, case):
self.comp = case.get_value("COMP_LND")
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="cisoallon",
run_one_description="carbon isotopes off",
run_two_description="c13 and c14 isotopes on as well as C isotope time series",
ignore_fieldlist_diffs=True,
)
def _case_one_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(), component=self.comp, contents="use_c13=F, use_c14=F"
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component=self.comp,
contents="use_c13=.true.,use_c14=.true.,use_c13_timeseries=.true.,use_c14_bombspike=.true.",
)

View File

@ -0,0 +1,47 @@
"""
Implementation of the CIME LGRAIN2 (Land 2-grain-pool) test.
This is a CTSM specific test: Verifies that we can allocate and use a second grain pool,
and that answers are identical to a run with a single grain pool. This is useful until we
have tests that include AgSys, which will exercise this capability more completely.
(1) do a run with a second grain pool
(2) do a standard run only a single grain pool
The reason for having the second grain pool in the first case (rather than the other way
around) is that this results in having a few extra fields present in the baselines.
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LGRAIN2(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="grain1",
run_one_description="use a second grain pool",
run_two_description="use a single grain pool",
ignore_fieldlist_diffs=True,
)
def _case_one_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="for_testing_use_second_grain_pool=.true.",
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="for_testing_use_second_grain_pool=.false.",
)

View File

@ -0,0 +1,58 @@
"""Implementation of the CIME LII test.
This is a CLM specific test:
Verifies that interpolation of initial conditions onto an identical
configuration gives identical results:
(1) do a run with use_init_interp true (suffix base)
(2) do a run with use_init_interp false (suffix no_interp)
It is more intuitive to think of the no_interp test as the "base". However, we
do the use_init_interp=true test first to facilitate updating initial conditions
whenever this is necessary, as documented below.
The LII test needs to point to an initial conditions file that is compatible
with the given model configuration. Thus, the pointed-to initial conditions file
needs to be updated whenever surface datasets are changed, or the land-mask is
changed, or an imporant change is made to model physics (for example where new
fields are added to the restart file). The procedure for updating the initial
conditions files used by the LII test is as follows:
(1) Run the LII test; the 'base' case should run to completion even if the
no_interp test fails.
(2) Copy the finidat_interp_dest.nc file from the 'base' case to the inputdata
space. Rename this to be similar to the name of the file pointed to in this
test's user_nl_ctsm file, but with a new creation date.
(3) Update this test's user_nl_ctsm file (in the appropriate testmods directory, or in
namelist_defaults if the test is using an out-of-the-box initial conditions file and it is
acceptable to update that file) to point to the new finidat file.
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LII(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="no_interp",
run_one_description="use_init_interp set to true",
run_two_description="use_init_interp set to false",
)
def _case_one_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(), component="clm", contents="use_init_interp = .true."
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(), component="clm", contents="use_init_interp = .false."
)

View File

@ -0,0 +1,72 @@
"""Implementation of the LII2FINIDATAREAS test.
This is similar to the LII test, but tests init_interp with mode
'use_finidat_areas'.
As with the standard LII test, this must be used in a configuration for which we have a
compatible out-of-the-box finidat file (so that the run with use_init_interp =
.false. runs successfully).
It may not be totally necessary to have a system test covering this
init_interp_method: between unit tests and inline checks, we have quite
a bit of testing of this code. It's important to have at least one LII
test to make sure we're interpolating all the fields we're supposed to
interpolate, but we don't necessarily need a LII test with this mode of
operation as long as we have one with the general mode of operation.
However, this test is a good check that every point has a unique type
(because this mode of operation will fail if that's not the case); this
is something needed even for the 'general' init_interp method to work
correctly, but the 'general' mode won't catch problems in this regard.
One other reason why this test is useful is to cover the threading
directives in the set_single_match routine, since those aren't covered
by unit tests. So this test mod should be used in a test with threading.
To update the initial conditions (finidat) file for this test:
(1) Run the test; the 'base' case should run to completion even if the
no_interp test fails. (If the 'base' case fails, you may need to retry
with init_interp_method='general'.)
(2) Copy the finidat_interp_dest.nc file from the 'base' case to the inputdata
space. Rename this to be similar to the out-of-the-box finidat file
currently used by this test, but with a new creation date.
(3) Update namelist defaults to point to the new finidat file. If
updating the out-of-the-box file is not desired, then you could instead
point to this new finidat file with a user_nl_ctsm file in this testmod.
"""
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
# We can import lii directly because the SystemTests directory has been
# added to sys.path.
#
# A cleaner and more general way to accomplish this would be: In cime:
# Rather than adding the SystemTests directory to sys.path and then
# importing an individual module from there: instead, allow each
# component to have a COMPNAME_pylib directory within its cime_config,
# and then have cime add each component's cime_config directory to
# sys.path and then do something like:
# import_module("COMPNAME_pylib.SystemTests.TESTNAME"). Then, for
# example, ctsm could access its own modules via "import
# ctsm_pylib.foo", or (in this case) "from ctsm_pylib.SystemTests.lii
# import LII".
from lii import LII
logger = logging.getLogger(__name__)
class LII2FINIDATAREAS(LII):
def __init__(self, case):
super(LII2FINIDATAREAS, self).__init__(case)
def _case_one_setup(self):
super(LII2FINIDATAREAS, self)._case_one_setup()
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="init_interp_method = 'use_finidat_areas'",
)

View File

@ -0,0 +1,438 @@
"""Implementation of the CIME LILACSMOKE (LILAC smoke) test.
This is a CTSM-specific test. It tests the building and running of CTSM via LILAC. Compset
is ignored, but grid is important. Also, it's important that this test use the nuopc
driver, both for the sake of the build and for extracting some runtime settings. This test
should also use the lilac testmod (or a testmod that derives from it) in order to
establish the user_nl_ctsm file correctly.
Important directories under CASEROOT are:
- lilac_build: this contains the build and the runtime inputs for the lilac run
- lilac_atm_driver: this contains the build of the test driver as well as the run
directory in which the test is actually run
Note that namelists for this test are generated in the build phase; they are NOT
regenerated when the test is submitted / run. This means that, if you have made any
changes that will impact namelists, you will need to rebuild this test.
Note that this test is tied to a specific resolution (10x15) and has a hard-coded domain
file for this resolution: see the setting of lnd_domain_file below.
"""
import glob
import os
import shutil
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.utils import run_cmd, run_cmd_no_fail, symlink_force, new_lid, safe_copy, append_testlog
from CIME.build import post_build
from CIME.test_status import (
NAMELIST_PHASE,
GENERATE_PHASE,
BASELINE_PHASE,
TEST_PASS_STATUS,
TEST_FAIL_STATUS,
)
from CIME.XML.standard_module_setup import *
logger = logging.getLogger(__name__)
_LILAC_RUNTIME_FILES = ["lnd_in", "lnd_modelio.nml", "lilac_in"]
class LILACSMOKE(SystemTestsCommon):
def __init__(self, case):
SystemTestsCommon.__init__(self, case)
def build_phase(self, sharedlib_only=False, model_only=False):
if not sharedlib_only:
lndroot = self._case.get_value("COMP_ROOT_DIR_LND")
exeroot = self._case.get_value("EXEROOT")
build_dir = self._lilac_build_dir()
script_path = os.path.abspath(os.path.join(lndroot, "lilac", "build_ctsm"))
# We only run the initial build command if the build_dir doesn't exist
# yet. This is to support rebuilding the test case. (The first time through,
# the build_dir won't exist yet; subsequent times, it will already exist, so
# we skip to the rebuild command.)
if not os.path.isdir(build_dir):
machine = self._case.get_value("MACH")
compiler = self._case.get_value("COMPILER")
debug = self._case.get_value("DEBUG")
# It would be possible to do this testing via the python interface rather
# than through a separate subprocess. However, we do it through a
# subprocess in order to test the full build_ctsm script, including
# command-line parsing.
cmd = "{script_path} {build_dir} --machine {machine} --compiler {compiler}".format(
script_path=script_path, build_dir=build_dir, machine=machine, compiler=compiler
)
# It isn't straightforward to determine if pnetcdf is available on a
# machine. To keep things simple, always run without pnetcdf.
cmd += " --no-pnetcdf"
if debug:
cmd += " --build-debug"
self._run_build_cmd(cmd, exeroot, "build_ctsm.bldlog")
# We call the build script with --rebuild even for an initial build. This is
# so we make sure to test the code path for --rebuild. (This is also needed if
# the user rebuilds the test case, in which case this will be the only command
# run, since the build_dir will already exist.)
cmd = "{script_path} {build_dir} --rebuild".format(
script_path=script_path, build_dir=build_dir
)
self._run_build_cmd(cmd, exeroot, "rebuild_ctsm.bldlog")
self._build_atm_driver()
self._create_link_to_atm_driver()
self._create_runtime_inputs()
self._setup_atm_driver_rundir()
self._cmpgen_namelists()
# Setting logs=[] implies that we don't bother gzipping any of the build log
# files; that seems fine for these purposes (and it keeps the above code
# simpler).
post_build(self._case, logs=[], build_complete=True)
def _build_atm_driver(self):
caseroot = self._case.get_value("CASEROOT")
lndroot = self._case.get_value("COMP_ROOT_DIR_LND")
blddir = os.path.join(caseroot, "lilac_atm_driver", "bld")
if not os.path.exists(blddir):
os.makedirs(blddir)
symlink_force(
os.path.join(lndroot, "lilac", "atm_driver", "Makefile"),
os.path.join(blddir, "Makefile"),
)
symlink_force(
os.path.join(lndroot, "lilac", "atm_driver", "atm_driver.F90"),
os.path.join(blddir, "atm_driver.F90"),
)
symlink_force(
os.path.join(self._lilac_build_dir(), "case", "Macros.make"),
os.path.join(blddir, "Macros.make"),
)
makevars = "COMPILER={compiler} DEBUG={debug} CTSM_MKFILE={ctsm_mkfile}".format(
compiler=self._case.get_value("COMPILER"),
debug=str(self._case.get_value("DEBUG")).upper(),
ctsm_mkfile=os.path.join(self._lilac_build_dir(), "ctsm.mk"),
)
makecmd = "make {makevars} atm_driver".format(makevars=makevars)
# Normally the user will source either ctsm_build_environment.sh or
# ctsm_build_environment.csh before building the atmosphere model. In the context
# of this test case, case.load_env does the equivalent.
self._case.load_env()
self._run_build_cmd(makecmd, blddir, "atm_driver.bldlog")
def _create_link_to_atm_driver(self):
caseroot = self._case.get_value("CASEROOT")
run_exe = (self._case.get_value("run_exe")).strip()
# Make a symlink to the atm_driver executable so that the case's run command finds
# it in the expected location
symlink_force(os.path.join(caseroot, "lilac_atm_driver", "bld", "atm_driver.exe"), run_exe)
def _create_runtime_inputs(self):
caseroot = self._case.get_value("CASEROOT")
runtime_inputs = self._runtime_inputs_dir()
# NOTE: *** this test is currently tied to this single 10x15 grid resolution ***
lnd_grid = self._case.get_value("LND_GRID")
expect(
lnd_grid == "10x15", "this test is currently tied to this single 10x15 grid resolution"
)
lnd_domain_file = os.path.join(
self._case.get_value("DIN_LOC_ROOT"),
"share",
"domains",
"domain.lnd.fv10x15_gx3v7.180321.nc",
)
# Cheat a bit here: Get the fsurdat file from the already-generated lnd_in file in
# the host test case - i.e., from the standard cime-based preview_namelists. But
# this isn't really a morally-objectionable cheat, because in the real workflow,
# we expect the user to identify fsurdat manually; in this testing situation, we
# need to come up with some way to replace this manual identification, so cheating
# feels acceptable.
self._case.create_namelists(component="lnd")
fsurdat = self._extract_var_from_namelist(
nl_filename=os.path.join(caseroot, "CaseDocs", "lnd_in"), varname="fsurdat"
)
self._fill_in_variables_in_file(
filepath=os.path.join(runtime_inputs, "ctsm.cfg"),
replacements={"lnd_domain_file": lnd_domain_file, "fsurdat": fsurdat},
)
# The user_nl_ctsm in the case directory is set up based on the standard testmods
# mechanism. We use that one in place of the standard user_nl_ctsm, since the one
# in the case directory may contain test-specific modifications.
shutil.copyfile(
src=os.path.join(caseroot, "user_nl_ctsm"),
dst=os.path.join(runtime_inputs, "user_nl_ctsm"),
)
script_to_run = os.path.join(runtime_inputs, "make_runtime_inputs")
self._run_build_cmd(
"{} --rundir {}".format(script_to_run, runtime_inputs),
runtime_inputs,
"make_runtime_inputs.log",
)
# In lilac_in, we intentionally use the land mesh file for both atm_mesh_filename
# and lnd_mesh_filename
lnd_mesh = self._case.get_value("LND_DOMAIN_MESH")
casename = self._case.get_value("CASE")
self._fill_in_variables_in_file(
filepath=os.path.join(runtime_inputs, "lilac_in"),
replacements={
"caseid": casename,
"atm_mesh_filename": lnd_mesh,
"lnd_mesh_filename": lnd_mesh,
"lilac_histfreq_option": "ndays",
},
placeholders={"caseid": "ctsm_lilac", "lilac_histfreq_option": "never"},
)
# We run download_input_data partly because it may be needed and partly to test
# this script.
script_to_run = os.path.join(runtime_inputs, "download_input_data")
self._run_build_cmd(
"{} --rundir {}".format(script_to_run, runtime_inputs),
runtime_inputs,
"download_input_data.log",
)
def _setup_atm_driver_rundir(self):
"""Set up the directory from which we will actually do the run"""
lndroot = self._case.get_value("COMP_ROOT_DIR_LND")
rundir = self._atm_driver_rundir()
if not os.path.exists(rundir):
os.makedirs(rundir)
shutil.copyfile(
src=os.path.join(lndroot, "lilac", "atm_driver", "atm_driver_in"),
dst=os.path.join(rundir, "atm_driver_in"),
)
# As elsewhere: assume the land variables also apply to the atmosphere
lnd_mesh = self._case.get_value("LND_DOMAIN_MESH")
lnd_nx = self._case.get_value("LND_NX")
lnd_ny = self._case.get_value("LND_NY")
expect(
self._case.get_value("STOP_OPTION") == "ndays",
"LILAC testing currently assumes STOP_OPTION of ndays, not {}".format(
self._case.get_value("STOP_OPTION")
),
)
stop_n = self._case.get_value("STOP_N")
casename = self._case.get_value("CASE")
self._fill_in_variables_in_file(
filepath=os.path.join(rundir, "atm_driver_in"),
replacements={
"caseid": casename,
"atm_mesh_file": lnd_mesh,
"atm_global_nx": str(lnd_nx),
"atm_global_ny": str(lnd_ny),
"atm_stop_day": str(stop_n + 1),
"atm_ndays_all_segs": str(stop_n),
},
)
for file_to_link in _LILAC_RUNTIME_FILES:
symlink_force(
os.path.join(self._runtime_inputs_dir(), file_to_link),
os.path.join(rundir, file_to_link),
)
init_generated_files_dir = os.path.join(rundir, "init_generated_files")
if not os.path.exists(init_generated_files_dir):
os.mkdir(init_generated_files_dir)
def _cmpgen_namelists(self):
"""Redoes the namelist comparison & generation with appropriate namelists
The standard namelist comparison & generation is done with the CaseDocs directory
from the test case. That isn't appropriate here, because those namelists aren't
actually used in this test. Instead, we want to compare & generate the namelists
used by the atm_driver-lilac-ctsm execution. Here, we do some file copies and then
re-call the namelist comparison & generation script in order to accomplish
this. This will overwrite the namelists generated earlier in the test, and will
also replace the results of the NLCOMP phase.
Note that we expect a failure in the NLCOMP phase that is run earlier in the test,
because that one will have compared the test's standard CaseDocs with the files
generated from here - and those two sets of namelists can be quite different.
"""
caseroot = self._case.get_value("CASEROOT")
casedocs = os.path.join(caseroot, "CaseDocs")
if os.path.exists(casedocs):
shutil.rmtree(casedocs)
os.makedirs(casedocs)
# case_cmpgen_namelists uses the existence of drv_in to decide whether namelists
# need to be regenerated. We do NOT want it to regenerate namelists, so we give it
# the file it wants.
with open(os.path.join(casedocs, "drv_in"), "a") as drv_in:
pass
for onefile in _LILAC_RUNTIME_FILES + ["atm_driver_in"]:
safe_copy(
os.path.join(self._atm_driver_rundir(), onefile), os.path.join(casedocs, onefile)
)
success = self._case.case_cmpgen_namelists()
# The setting of the NLCOMP phase status in case_cmpgen_namelists doesn't work
# here (probably because the test object has a saved version of the test status
# and so, when it goes to write the status of the build phase, it ends up
# overwriting whatever was set by case_cmpgen_namelists). So we need to set it
# here.
with self._test_status:
self._test_status.set_status(
NAMELIST_PHASE,
TEST_PASS_STATUS if success else TEST_FAIL_STATUS,
comments="(used lilac namelists)",
)
def _extract_var_from_namelist(self, nl_filename, varname):
"""Tries to find a variable named varname in the given file; returns its value
If not found, aborts
"""
with open(nl_filename) as nl_file:
for line in nl_file:
match = re.search(r'^ *{} *= *[\'"]([^\'"]+)'.format(varname), line)
if match:
return match.group(1)
expect(False, "{} not found in {}".format(varname, nl_filename))
def _fill_in_variables_in_file(self, filepath, replacements, placeholders=None):
"""For the given file, make the given replacements
replacements should be a dictionary mapping variable names to their values
If placeholders is given, it should be a dictionary mapping some subset of
variable names to their placeholders. Anything not given here uses a placeholder
of 'FILL_THIS_IN'.
"""
if placeholders is None:
placeholders = {}
orig_filepath = "{}.orig".format(filepath)
if not os.path.exists(orig_filepath):
shutil.copyfile(src=filepath, dst=orig_filepath)
os.remove(filepath)
counts = dict.fromkeys(replacements, 0)
with open(orig_filepath) as orig_file:
with open(filepath, "w") as new_file:
for orig_line in orig_file:
line = orig_line
for varname in replacements:
if varname in placeholders:
this_placeholder = placeholders[varname]
else:
this_placeholder = "FILL_THIS_IN"
line, replacement_done = self._fill_in_variable(
line=line,
varname=varname,
value=replacements[varname],
placeholder=this_placeholder,
)
if replacement_done:
counts[varname] += 1
break
new_file.write(line)
for varname in counts:
expect(
counts[varname] > 0,
"Did not find any instances of <{}> to replace in {}".format(varname, filepath),
)
def _fill_in_variable(self, line, varname, value, placeholder):
"""Fill in a placeholder variable in a config or namelist file
Returns a tuple: (newline, replacement_done)
- newline is the line with the given placeholder replaced with the given value if this
line is for varname; otherwise returns line unchanged
- replacement_done is True if the replacement was done, otherwise False
"""
if re.search(r"^ *{} *=".format(varname), line):
expect(
placeholder in line,
"Placeholder to replace ({}) not found in <{}>".format(placeholder, line.strip()),
)
newline = line.replace(placeholder, value)
replacement_done = True
else:
newline = line
replacement_done = False
return (newline, replacement_done)
def _lilac_build_dir(self):
return os.path.join(self._case.get_value("CASEROOT"), "lilac_build")
def _runtime_inputs_dir(self):
return os.path.join(self._lilac_build_dir(), "runtime_inputs")
def _atm_driver_rundir(self):
return os.path.join(self._case.get_value("CASEROOT"), "lilac_atm_driver", "run")
@staticmethod
def _run_build_cmd(cmd, exeroot, logfile):
"""
Runs the given build command, with output to the given logfile
Args:
cmd: str (command to run)
exeroot: str (path to exeroot)
logfile: str (path to logfile)
"""
append_testlog(cmd)
run_cmd_no_fail(cmd, arg_stdout=logfile, combine_output=True, from_dir=exeroot)
with open(os.path.join(exeroot, logfile)) as lf:
append_testlog(lf.read())
def run_phase(self):
# This mimics a bit of what's done in the typical case.run. Note that
# case.get_mpirun_cmd creates a command that runs the executable given by
# case.run_exe. So it's important that (elsewhere in this test script) we create a
# link pointing from that to the atm_driver.exe executable.
lid = new_lid()
os.environ["OMP_NUM_THREADS"] = str(self._case.thread_count)
cmd = self._case.get_mpirun_cmd(allow_unresolved_envvars=False)
run_cmd_no_fail(cmd, from_dir=self._atm_driver_rundir())
self._link_to_output_files()
def _link_to_output_files(self):
"""Make links to the output files so that they appear in the directory expected by the test case
Note: We do the run from a different directory in order to ensure that the run
isn't using any of the files that are staged by the test case in the standard run
directory. But then we need to create these links afterwards for the sake of
baseline generation / comparison.
"""
casename = self._case.get_value("CASE")
rundir = self._case.get_value("RUNDIR")
pattern = "{}*.nc".format(casename)
# First remove any old files from the run directory
old_files = glob.glob(os.path.join(rundir, pattern))
for one_file in old_files:
os.remove(one_file)
# Now link to new files
output_files = glob.glob(os.path.join(self._atm_driver_rundir(), pattern))
for one_file in output_files:
file_basename = os.path.basename(one_file)
symlink_force(one_file, os.path.join(rundir, file_basename))

View File

@ -0,0 +1,75 @@
"""
Implementation of the CIME LREPRSTRUCT (Land Reproductive Structure) test.
This is a CTSM specific test: Verifies that we can allocate and use a crop reproductive
structure pool, and that answers are identical to a run with a single reproductive grain
pool. This is useful until we have tests that include AgSys, which will exercise this
capability more completely.
(1) do a run with a second grain pool and two reproductive structure pools, with all
allocation going to the second reproductive structure pool
(2) do a standard run only a single grain pool, but with no crop seed replenishment
The reason for having the new reproductive structure pools in the first case (rather than
the other way around) is that this results in having a few extra fields present in the
baselines.
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LREPRSTRUCT(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="grain1",
run_one_description="use a reproductive structure pool",
run_two_description="use a single grain pool",
ignore_fieldlist_diffs=True,
)
def _case_one_setup(self):
# We don't really need a second grain pool for this test, but we might as well do
# this to further exercise the looping over different reproductive components.
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="for_testing_use_second_grain_pool=.true.",
)
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="for_testing_use_repr_structure_pool=.true.",
)
# Replace any GRAIN outputs with the same outputs for REPRODUCTIVE1 and REPRODUCTIVE2
user_nl_clm_path = os.path.join(self._get_caseroot(), "user_nl_clm")
with open(user_nl_clm_path) as f:
user_nl_clm_text = f.read()
for grain_output in re.findall("GRAIN\w*", user_nl_clm_text):
user_nl_clm_text = user_nl_clm_text.replace(
grain_output,
grain_output.replace("GRAIN", "REPRODUCTIVE1")
+ "', '"
+ grain_output.replace("GRAIN", "REPRODUCTIVE2"),
)
with open(user_nl_clm_path, "w") as f:
f.write(user_nl_clm_text)
def _case_two_setup(self):
# This is needed in the nearly-standard case to prevent grain from being used to
# replenish crop seed deficits, thus making grain act like the reproductive
# structure pools. (It wouldn't hurt to do this in case one as well, but it
# shouldn't be needed there, since we shouldn't have any grain there anyway.)
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="for_testing_no_crop_seed_replenishment=.true.",
)

View File

@ -0,0 +1,43 @@
"""
Implementation of the CIME LVG (Land Virtual Glacier) test.
This is a CLM specific test:
Verifies that adding virtual glacier columns doesn't change answers
(1) do a run with the standard set of virtual columns (suffix base)
(2) add virtual columns over Antarctica (suffix more_virtual)
This will only pass if there are no column or patch-level outputs in CLM's
history files.
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LVG(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="more_virtual",
run_one_description="standard set of virtual columns",
run_two_description="add virtual columns over Antarctica",
)
def _case_one_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'multiple'",
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'virtual'",
)

View File

@ -0,0 +1,50 @@
"""
Implementation of the CIME LWISO (Land Water Isotope) test.
This is a CTSM specific test:
Verifies turning on water isotopes doesn't change answers
(1) do a run with water isotopes on
(2) do a run with water isotopes off
The reason for having water isotopes on in the first case (rather than the other way
around) is that this results in having water isotope quantities present in the baselines.
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class LWISO(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="nowiso",
run_one_description="water isotopes on",
run_two_description="water isotopes off",
ignore_fieldlist_diffs=True,
)
def _case_one_setup(self):
# BUG(wjs, 2019-07-30, ESCOMP/ctsm#495) We currently can't turn on actual water
# isotopes in a multi-timestep test, so we're setting
# enable_water_tracer_consistency_checks rather than enable_water_isotopes;
# eventually, though, we should change this to the latter. (See
# <https://github.com/ESCOMP/ctsm/issues/495#issuecomment-516619853>.)
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="enable_water_tracer_consistency_checks=.true.",
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="enable_water_tracer_consistency_checks=.false.",
)

View File

@ -0,0 +1,156 @@
"""
This test passes if mksurfdata_esmf generates an fsurdat (surface dataset)
and the CTSM completes a simulation with this fsurdat file.
We test res = '10x15' because it uses a lower-res topography file instead of
the 1-km topography raw dataset. The 1-km file causes the test to run out of
memory on cheyenne.
Currently casper complains that `git -C` is not a valid option.
I added -C to the `git describe` in gen_mksurfdata_namelist for this
system test to work.
"""
import os
import sys
import subprocess
from datetime import datetime
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class MKSURFDATAESMF(SystemTestsCommon):
def __init__(self, case):
"""
initialize an object interface to the SMS system test
"""
SystemTestsCommon.__init__(self, case)
# Paths and strings needed throughout
ctsm_root = self._case.get_value("COMP_ROOT_DIR_LND")
self._tool_path = os.path.join(ctsm_root, "tools/mksurfdata_esmf")
self._tool_bld = os.path.join(self._get_caseroot(), "tool_bld")
time_stamp = datetime.today().strftime("%y%m%d")
self._res = "10x15" # see important comment in script's docstring
self._model_yr = "1850"
self._jobscript = os.path.join(
self._get_caseroot(), "mksurfdataesmf_test_jobscript_single.sh"
)
self._fsurdat_namelist = os.path.join(
self._get_caseroot(),
f"surfdata_{self._res}_hist_{self._model_yr}_78pfts_c{time_stamp}.namelist",
)
self._fsurdat_nc = os.path.join(
self._get_caseroot(),
f"surfdata_{self._res}_hist_{self._model_yr}_78pfts_c{time_stamp}.nc",
)
self._TestStatus_log_path = os.path.join(self._get_caseroot(), "TestStatus.log")
def build_phase(self, sharedlib_only=False, model_only=False):
"""
Build executable that will generate fsurdat
Generate namelist for generating fsurdat
Generate jobscript that runs executable
Modify user_nl_clm to point to the generated fsurdat
"""
# build_phase gets called twice:
# - once with sharedlib_only = True and
# - once with model_only = True
# Call the following steps only once during the test but do not skip
# if the test stops and gets restarted.
if sharedlib_only:
# Paths and strings
build_script_path = os.path.join(self._tool_path, "gen_mksurfdata_build")
nml_script_path = os.path.join(self._tool_path, "gen_mksurfdata_namelist")
gen_jobscript_path = os.path.join(self._tool_path, "gen_mksurfdata_jobscript_single")
gen_mksurfdata_namelist = f"{nml_script_path} --res {self._res} --start-year {self._model_yr} --end-year {self._model_yr}"
if not os.path.exists(nml_script_path):
sys.exit(f"ERROR The build naemlist script {nml_script_path} does NOT exist")
if not os.path.exists(gen_jobscript_path):
sys.exit(f"ERROR The jobscript script {gen_jobscript_path} does NOT exist")
gen_mksurfdata_jobscript = (
f"{gen_jobscript_path} --number-of-nodes 1 --tasks-per-node 64 --namelist-file "
+ f"{self._fsurdat_namelist} --bld-path {self._tool_bld} --jobscript-file {self._jobscript}"
)
if not os.path.exists(build_script_path):
sys.exit(f"ERROR The build script {build_script_path} does NOT exist")
# Rm tool_bld and build executable that will generate fsurdat
try:
subprocess.check_call(f"rm -rf {self._tool_bld}", shell=True)
except subprocess.CalledProcessError as e:
sys.exit(
f"{e} ERROR REMOVING {self._tool_bld}. DETAILS IN {self._TestStatus_log_path}"
)
try:
subprocess.check_call(f"{build_script_path} --blddir {self._tool_bld}", shell=True)
except subprocess.CalledProcessError as e:
print(f"build directory = {self._tool_bld}\n")
sys.exit(
f"{e} ERROR RUNNING {build_script_path} DETAILS IN {self._TestStatus_log_path}"
)
# Generate namelist for generating fsurdat (rm namelist if exists)
if os.path.exists(self._fsurdat_namelist):
os.remove(self._fsurdat_namelist)
try:
subprocess.check_call(gen_mksurfdata_namelist, shell=True)
except subprocess.CalledProcessError as e:
sys.exit(
f"{e} ERROR RUNNING {gen_mksurfdata_namelist}. DETAILS IN {self._TestStatus_log_path}"
)
# Generate jobscript that will run the executable
if os.path.exists(self._jobscript):
os.remove(self._jobscript)
try:
subprocess.check_call(gen_mksurfdata_jobscript, shell=True)
except subprocess.CalledProcessError as e:
sys.exit(
f"{e} ERROR RUNNING {gen_mksurfdata_jobscript}. DETAILS IN {self._TestStatus_log_path}"
)
# Change self._jobscript to an executable file
subprocess.check_call(f"chmod a+x {self._jobscript}", shell=True)
# Call this step only once even if the test stops and gets restarted.
if not os.path.exists(os.path.join(self._get_caseroot(), "done_MKSURFDATAESMF_setup.txt")):
# Modify user_nl_clm to point to the generated fsurdat
self._modify_user_nl()
with open("done_MKSURFDATAESMF_setup.txt", "w") as fp:
pass
self.build_indv(sharedlib_only=sharedlib_only, model_only=model_only)
def run_phase(self):
"""
Run executable to generate fsurdat
Submit CTSM run that uses fsurdat just generated
"""
# Run executable to generate fsurdat (rm fsurdat if exists)
if os.path.exists(self._fsurdat_nc):
os.remove(self._fsurdat_nc)
try:
subprocess.check_call(self._jobscript, shell=True)
except subprocess.CalledProcessError as e:
sys.exit(f"{e} ERROR RUNNING {self._jobscript}; details in {self._TestStatus_log_path}")
# Submit CTSM run that uses fsurdat just generated
self.run_indv()
def _modify_user_nl(self):
"""
Modify user_nl_clm to point to the generated fsurdat
"""
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="fsurdat = '{}'".format(self._fsurdat_nc)
+ "\n"
+ "convert_ocean_to_land = .true.",
)

View File

@ -0,0 +1,444 @@
"""
CTSM-specific test that first performs a GDD-generating run, then calls
Python code to generate the maturity requirement file. This is then used
in a sowing+maturity forced run, which finally is tested to ensure
correct behavior.
Currently only supports 0.9x1.25, 1.9x2.5, and 10x15 resolutions. Eventually,
this test should be able to generate its own files at whatever resolution it's
called at. Well, really, the ultimate goal would be to give CLM the files
at the original resolution (for GGCMI phase 3, 0.5°) and have the stream
code do the interpolation. However, that wouldn't act on harvest dates
(which are needed for generate_gdds.py). I could have Python interpolate
those, but this would cause a potential inconsistency.
"""
import os
import re
import systemtest_utils as stu
import subprocess
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
import shutil, glob
logger = logging.getLogger(__name__)
class RXCROPMATURITY(SystemTestsCommon):
def __init__(self, case):
# initialize an object interface to the SMS system test
SystemTestsCommon.__init__(self, case)
# Ensure run length is at least 5 years. Minimum to produce one complete growing season (i.e., two complete calendar years) actually 4 years, but that only gets you 1 season usable for GDD generation, so you can't check for season-to-season consistency.
stop_n = self._case.get_value("STOP_N")
stop_option = self._case.get_value("STOP_OPTION")
stop_n_orig = stop_n
stop_option_orig = stop_option
if "nsecond" in stop_option:
stop_n /= 60
stop_option = "nminutes"
if "nminute" in stop_option:
stop_n /= 60
stop_option = "nhours"
if "nhour" in stop_option:
stop_n /= 24
stop_option = "ndays"
if "nday" in stop_option:
stop_n /= 365
stop_option = "nyears"
if "nmonth" in stop_option:
stop_n /= 12
stop_option = "nyears"
error_message = None
if "nyear" not in stop_option:
error_message = (
f"STOP_OPTION ({stop_option_orig}) must be nsecond(s), nminute(s), "
+ "nhour(s), nday(s), nmonth(s), or nyear(s)"
)
elif stop_n < 5:
error_message = (
"RXCROPMATURITY must be run for at least 5 years; you requested "
+ f"{stop_n_orig} {stop_option_orig[1:]}"
)
if error_message is not None:
logger.error(error_message)
raise RuntimeError(error_message)
# Get the number of complete years that will be run
self._run_Nyears = int(stop_n)
# Only allow RXCROPMATURITY to be called with test cropMonthOutput
casebaseid = self._case.get_value("CASEBASEID")
if casebaseid.split("-")[-1] != "cropMonthOutput":
error_message = (
"Only call RXCROPMATURITY with test cropMonthOutput "
+ "to avoid potentially huge sets of daily outputs."
)
logger.error(error_message)
raise RuntimeError(error_message)
# Get files with prescribed sowing and harvest dates
self._get_rx_dates()
# Which conda environment should we use?
self._get_conda_env()
def run_phase(self):
# 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.
# -------------------------------------------------------------------
# (1) Set up GDD-generating run
# -------------------------------------------------------------------
# Create clone to be GDD-Generating case
logger.info("RXCROPMATURITY log: cloning setup")
case_rxboth = self._case
caseroot = self._case.get_value("CASEROOT")
clone_path = f"{caseroot}.gddgen"
self._path_gddgen = clone_path
if os.path.exists(self._path_gddgen):
shutil.rmtree(self._path_gddgen)
logger.info("RXCROPMATURITY log: cloning")
case_gddgen = self._case.create_clone(clone_path, keepexe=True)
logger.info("RXCROPMATURITY log: done cloning")
os.chdir(self._path_gddgen)
self._set_active_case(case_gddgen)
# Set up stuff that applies to both tests
self._setup_all()
# Add stuff specific to GDD-Generating run
logger.info("RXCROPMATURITY log: modify user_nl files: generate GDDs")
self._append_to_user_nl_clm(
[
"generate_crop_gdds = .true.",
"use_mxmat = .false.",
" ",
"! (h2) Daily outputs for GDD generation and figure-making",
"hist_fincl3 = 'GDDACCUM', 'GDDHARV'",
"hist_nhtfrq(3) = -24",
"hist_mfilt(3) = 365",
"hist_type1d_pertape(3) = 'PFTS'",
"hist_dov2xy(3) = .false.",
]
)
# If flanduse_timeseries is defined, we need to make a static version for this test. This
# should have every crop in most of the world.
self._get_flanduse_timeseries_in(case_gddgen)
if self._flanduse_timeseries_in is not None:
# Download files from the server, if needed
case_gddgen.check_all_input_data()
# Make custom version of surface file
logger.info("RXCROPMATURITY log: run fsurdat_modifier")
self._run_fsurdat_modifier()
# -------------------------------------------------------------------
# (2) Perform GDD-generating run and generate prescribed GDDs file
# -------------------------------------------------------------------
logger.info("RXCROPMATURITY log: Start GDD-Generating run")
# As per SSP test:
# "No history files expected, set suffix=None to avoid compare error"
# We *do* expect history files here, but anyway. This works.
self._skip_pnl = False
self.run_indv(suffix=None, st_archive=True)
self._run_generate_gdds(case_gddgen)
# -------------------------------------------------------------------
# (3) Set up and perform Prescribed Calendars run
# -------------------------------------------------------------------
os.chdir(caseroot)
self._set_active_case(case_rxboth)
# Set up stuff that applies to both tests
self._setup_all()
# Add stuff specific to Prescribed Calendars run
logger.info("RXCROPMATURITY log: modify user_nl files: Prescribed Calendars")
self._append_to_user_nl_clm(
[
"generate_crop_gdds = .false.",
f"stream_fldFileName_cultivar_gdds = '{self._gdds_file}'",
]
)
self.run_indv()
# -------------------------------------------------------------------
# (4) Check Prescribed Calendars run
# -------------------------------------------------------------------
logger.info("RXCROPMATURITY log: output check: Prescribed Calendars")
self._run_check_rxboth_run()
# Get sowing and harvest dates for this resolution.
def _get_rx_dates(self):
# Eventually, I want to remove these hard-coded resolutions so that this test can generate
# its own sowing and harvest date files at whatever resolution is requested.
lnd_grid = self._case.get_value("LND_GRID")
input_data_root = self._case.get_value("DIN_LOC_ROOT")
processed_crop_dates_dir = f"{input_data_root}/lnd/clm2/cropdata/calendars/processed"
if lnd_grid == "10x15":
self._sdatefile = os.path.join(
processed_crop_dates_dir,
"sdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f10_f10_mg37.2000-2000.20230330_165301.nc",
)
self._hdatefile = os.path.join(
processed_crop_dates_dir,
"hdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f10_f10_mg37.2000-2000.20230330_165301.nc",
)
elif lnd_grid == "1.9x2.5":
self._sdatefile = os.path.join(
processed_crop_dates_dir,
"sdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f19_g17.2000-2000.20230102_175625.nc",
)
self._hdatefile = os.path.join(
processed_crop_dates_dir,
"hdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f19_g17.2000-2000.20230102_175625.nc",
)
elif lnd_grid == "0.9x1.25":
self._sdatefile = os.path.join(
processed_crop_dates_dir,
"sdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f09_g17.2000-2000.20230520_134417.nc",
)
self._hdatefile = os.path.join(
processed_crop_dates_dir,
"hdates_ggcmi_crop_calendar_phase3_v1.01_nninterp-f09_g17.2000-2000.20230520_134418.nc",
)
else:
error_message = "ERROR: RXCROPMATURITY currently only supports 0.9x1.25, 1.9x2.5, and 10x15 resolutions"
logger.error(error_message)
raise RuntimeError(error_message)
# Ensure files exist
error_message = None
if not os.path.exists(self._sdatefile):
error_message = f"ERROR: Sowing date file not found: {self._sdatefile}"
elif not os.path.exists(self._hdatefile):
error_message = f"ERROR: Harvest date file not found: {self._sdatefile}"
if error_message is not None:
logger.error(error_message)
raise RuntimeError(error_message)
def _setup_all(self):
logger.info("RXCROPMATURITY log: _setup_all start")
# Get some info
self._ctsm_root = self._case.get_value("COMP_ROOT_DIR_LND")
run_startdate = self._case.get_value("RUN_STARTDATE")
self._run_startyear = int(run_startdate.split("-")[0])
# 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()
logger.info("RXCROPMATURITY log: _setup_all done")
# Make a surface dataset that has every crop in every gridcell
def _run_fsurdat_modifier(self):
# fsurdat should be defined. Where is it?
self._fsurdat_in = None
with open(self._lnd_in_path, "r") as lnd_in:
for line in lnd_in:
fsurdat_in = re.match(r" *fsurdat *= *'(.*)'", line)
if fsurdat_in:
self._fsurdat_in = fsurdat_in.group(1)
break
if self._fsurdat_in is None:
error_message = "fsurdat not defined"
logger.error(error_message)
raise RuntimeError(error_message)
# Where we will save the fsurdat version for this test
path, ext = os.path.splitext(self._fsurdat_in)
dir_in, filename_in_noext = os.path.split(path)
self._fsurdat_out = os.path.join(
self._path_gddgen, f"{filename_in_noext}.all_crops_everywhere{ext}"
)
# Make fsurdat for this test, if not already done
if not os.path.exists(self._fsurdat_out):
tool_path = os.path.join(
self._ctsm_root,
"tools",
"modify_input_files",
"fsurdat_modifier",
)
# Create configuration file for fsurdat_modifier
self._cfg_path = os.path.join(
self._path_gddgen,
"modify_fsurdat_allcropseverywhere.cfg",
)
self._create_config_file_evenlysplitcrop()
command = f"python3 {tool_path} {self._cfg_path} "
stu.run_python_script(
self._get_caseroot(),
self._this_conda_env,
command,
tool_path,
)
# Modify namelist
logger.info("RXCROPMATURITY log: modify user_nl files: new fsurdat")
self._append_to_user_nl_clm(
[
"fsurdat = '{}'".format(self._fsurdat_out),
"do_transient_crops = .false.",
"flanduse_timeseries = ''",
"use_init_interp = .true.",
]
)
def _create_config_file_evenlysplitcrop(self):
"""
Open the new and the template .cfg files
Loop line by line through the template .cfg file
When string matches, replace that line's content
"""
cfg_template_path = os.path.join(
self._ctsm_root, "tools/modify_input_files/modify_fsurdat_template.cfg"
)
with open(self._cfg_path, "w", encoding="utf-8") as cfg_out:
# Copy template, replacing some lines
with open(cfg_template_path, "r", encoding="utf-8") as cfg_in:
for line in cfg_in:
if re.match(r" *evenly_split_cropland *=", line):
line = f"evenly_split_cropland = True"
elif re.match(r" *fsurdat_in *=", line):
line = f"fsurdat_in = {self._fsurdat_in}"
elif re.match(r" *fsurdat_out *=", line):
line = f"fsurdat_out = {self._fsurdat_out}"
elif re.match(r" *process_subgrid_section *=", line):
line = f"process_subgrid_section = True"
cfg_out.write(line)
# Add new lines
cfg_out.write("\n")
cfg_out.write("[modify_fsurdat_subgrid_fractions]\n")
cfg_out.write("PCT_CROP = 100.0\n")
cfg_out.write("PCT_NATVEG = 0.0\n")
cfg_out.write("PCT_GLACIER = 0.0\n")
cfg_out.write("PCT_WETLAND = 0.0\n")
cfg_out.write("PCT_LAKE = 0.0\n")
cfg_out.write("PCT_OCEAN = 0.0\n")
cfg_out.write("PCT_URBAN = 0.0 0.0 0.0\n")
def _run_check_rxboth_run(self):
output_dir = os.path.join(self._get_caseroot(), "run")
first_usable_year = self._run_startyear + 2
last_usable_year = self._run_startyear + self._run_Nyears - 2
tool_path = os.path.join(
self._ctsm_root, "python", "ctsm", "crop_calendars", "check_rxboth_run.py"
)
command = (
f"python3 {tool_path} "
+ f"--directory {output_dir} "
+ f"-y1 {first_usable_year} "
+ f"-yN {last_usable_year} "
+ f"--rx-sdates-file {self._sdatefile} "
+ f"--rx-gdds-file {self._gdds_file} "
)
stu.run_python_script(
self._get_caseroot(),
self._this_conda_env,
command,
tool_path,
)
def _modify_user_nl_allruns(self):
nl_additions = [
"stream_meshfile_cropcal = '{}'".format(self._case.get_value("LND_DOMAIN_MESH")),
"stream_fldFileName_swindow_start = '{}'".format(self._sdatefile),
"stream_fldFileName_swindow_end = '{}'".format(self._sdatefile),
"stream_year_first_cropcal = 2000",
"stream_year_last_cropcal = 2000",
"model_year_align_cropcal = 2000",
" ",
"! (h1) Annual outputs on sowing or harvest axis",
"hist_fincl2 = 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV'",
"hist_nhtfrq(2) = 17520",
"hist_mfilt(2) = 999",
"hist_type1d_pertape(2) = 'PFTS'",
"hist_dov2xy(2) = .false.",
]
self._append_to_user_nl_clm(nl_additions)
def _run_generate_gdds(self, case_gddgen):
self._generate_gdds_dir = os.path.join(self._path_gddgen, "generate_gdds_out")
os.makedirs(self._generate_gdds_dir)
# Get arguments to generate_gdds.py
dout_sr = case_gddgen.get_value("DOUT_S_ROOT")
input_dir = os.path.join(dout_sr, "lnd", "hist")
first_season = self._run_startyear + 2
last_season = self._run_startyear + self._run_Nyears - 2
sdates_file = self._sdatefile
hdates_file = self._hdatefile
# It'd be much nicer to call generate_gdds.main(), but I can't import generate_gdds.
tool_path = os.path.join(
self._ctsm_root, "python", "ctsm", "crop_calendars", "generate_gdds.py"
)
command = " ".join(
[
f"python3 {tool_path}",
f"--input-dir {input_dir}",
f"--first-season {first_season}",
f"--last-season {last_season}",
f"--sdates-file {sdates_file}",
f"--hdates-file {hdates_file}",
f"--output-dir generate_gdds_out",
f"--skip-crops miscanthus,irrigated_miscanthus",
]
)
stu.run_python_script(
self._get_caseroot(),
self._this_conda_env,
command,
tool_path,
)
# Where were the prescribed maturity requirements saved?
generated_gdd_files = glob.glob(os.path.join(self._generate_gdds_dir, "gdds_*.nc"))
if len(generated_gdd_files) != 1:
error_message = f"ERROR: Expected one matching prescribed maturity requirements file; found {len(generated_gdd_files)}: {generated_gdd_files}"
logger.error(error_message)
raise RuntimeError(error_message)
self._gdds_file = generated_gdd_files[0]
def _get_conda_env(self):
conda_setup_commands = stu.cmds_to_setup_conda(self._get_caseroot())
# If npl conda environment is available, use that (It has dask, which
# enables chunking, which makes reading daily 1-degree netCDF files
# much more efficient.
if "npl " in os.popen(conda_setup_commands + "conda env list").read():
self._this_conda_env = "npl"
else:
self._this_conda_env = "ctsm_pylib"
def _append_to_user_nl_clm(self, additions):
caseroot = self._get_caseroot()
append_to_user_nl_files(caseroot=caseroot, component="clm", contents=additions)
# Is flanduse_timeseries defined? If so, where is it?
def _get_flanduse_timeseries_in(self, case):
case.create_namelists(component="lnd")
self._lnd_in_path = os.path.join(self._path_gddgen, "CaseDocs", "lnd_in")
self._flanduse_timeseries_in = None
with open(self._lnd_in_path, "r") as lnd_in:
for line in lnd_in:
flanduse_timeseries_in = re.match(r" *flanduse_timeseries *= *'(.*)'", line)
if flanduse_timeseries_in:
self._flanduse_timeseries_in = flanduse_timeseries_in.group(1)
break

View File

@ -0,0 +1,43 @@
"""
Implementation of the CIME SOILSTRUCTUD test.
This is a CLM specific test:
Verifies that a simulation that points to user_nl_ctsm containing
soil_layerstruct_userdefined_nlevsoi = 4
soil_layerstruct_userdefined = 0.1d0,0.3d0,0.6d0,1.0d0,1.0d0
gives bfb same results as one that points to user_nl_ctsm containing
soil_layerstruct_predefined = '4SL_2m'
"""
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files
logger = logging.getLogger(__name__)
class SOILSTRUCTUD(SystemTestsCompareTwo):
def __init__(self, case):
SystemTestsCompareTwo.__init__(
self,
case,
separate_builds=False,
run_two_suffix="4SL_2m",
run_one_description="soil_layerstruct_userdefined",
run_two_description="soil_layerstruct_predefined",
)
def _case_one_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="soil_layerstruct_userdefined_nlevsoi = 4,soil_layerstruct_userdefined = 0.1d0,0.3d0,0.6d0,1.0d0,1.0d0",
)
def _case_two_setup(self):
append_to_user_nl_files(
caseroot=self._get_caseroot(),
component="clm",
contents="soil_layerstruct_predefined = '4SL_2m'",
)

View File

@ -0,0 +1,113 @@
"""
Implementation of the CIME SSP test. This class inherits from SystemTestsCommon
This is a CLM specific test:
Verifies that spinup works correctly
this test is only valid for CLM compsets with CLM45 or CLM50
(1) do an initial spin test
- set CLM_ACCELERATED_SPINUP to on
- write restarts at the end of the run, turn on short term archiving
- turn MOSART off
(2) do a hybrid non-spinup simulation run
- start from the restart files generated in (1)
- turn MOSART off
"""
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.system_tests_common import SystemTestsCommon
import shutil, glob, os
logger = logging.getLogger(__name__)
class SSP(SystemTestsCommon):
def __init__(self, case):
"""
initialize an object interface to the SSP system test
"""
SystemTestsCommon.__init__(self, case)
rof = self._case.get_value("COMP_ROF")
expect(rof == "mosart", "ERROR: SSP test requires that ROF component be mosart")
def build_phase(self, sharedlib_only=False, model_only=False):
self._case.set_value("MOSART_MODE", "NULL")
self.build_indv(sharedlib_only=sharedlib_only, model_only=model_only)
def run_phase(self):
caseroot = self._case.get_value("CASEROOT")
orig_case = self._case
orig_casevar = self._case.get_value("CASE")
# clone the main case to create ref1
clone_path = "{}.ref1".format(caseroot)
if os.path.exists(clone_path):
shutil.rmtree(clone_path)
clone = self._case.create_clone(clone_path, keepexe=True)
# determine run lengths needed below
stop_nf = self._case.get_value("STOP_N")
stop_n1 = int(stop_nf / 2)
stop_n2 = stop_nf - stop_n1
# -------------------------------------------------------------------
# (1) do a spinup run in the main case in the cloned ref case
# (short term archiving is on)
# -------------------------------------------------------------------
os.chdir(clone_path)
self._set_active_case(clone)
logger.info("startup: doing a {} {} 00000 seconds startup run".format(stop_n1, stop_nf))
logger.info(" writing restarts at end of run")
logger.info(" short term archiving is on ")
with clone:
clone.set_value("CLM_ACCELERATED_SPINUP", "on")
clone.set_value("STOP_N", stop_n1)
dout_sr = clone.get_value("DOUT_S_ROOT")
# No history files expected, set suffix=None to avoid compare error
self._skip_pnl = False
self.run_indv(suffix=None, st_archive=True)
# -------------------------------------------------------------------
# (2) do a hybrid, non-spinup run in orig_case
# -------------------------------------------------------------------
os.chdir(caseroot)
self._set_active_case(orig_case)
refdate = run_cmd_no_fail(
r'ls -1dt {}/rest/*-00000* | head -1 | sed "s/-00000.*//" | sed "s/^.*rest\///"'.format(
dout_sr
)
)
refsec = "00000"
# obtain rpointer files and 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))
for item in glob.glob("{}/*{}*".format(rest_path, refdate)):
link_name = os.path.join(rundir, os.path.basename(item))
if os.path.islink(link_name) and os.readlink(link_name) == item:
# Link is already set up correctly: do nothing
# (os.symlink raises an exception if you try to replace an
# existing file)
pass
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)
self._case.set_value("RUN_REFCASE", "{}.ref1".format(orig_casevar))
self._case.set_value("RUN_REFDATE", refdate)
self._case.set_value("STOP_N", stop_n2)
self._case.set_value("DOUT_S", False)
self._case.flush()
# do the restart run (short term archiving is off)
self.run_indv()

View File

@ -0,0 +1,86 @@
"""
Reduce code duplication by putting reused functions here.
"""
import os, subprocess
def cmds_to_setup_conda(caseroot):
# Add specific commands needed on different machines to get conda available
# Use semicolon here since it's OK to fail
#
conda_setup_commands = ". " + caseroot + "/.env_mach_specific.sh; "
# Setting CONDA_PREFIX to empty ensures that this works even if called from
# a shell with a conda environment activated
conda_setup_commands += "CONDA_PREFIX=; "
# Execute the module unload/load when "which conda" fails
# eg on cheyenne
try:
subprocess.run("which conda", shell=True, check=True)
except subprocess.CalledProcessError:
# Remove python and add conda to environment for cheyennne
unload_python_load_conda = "module unload python; module load conda;"
# Make sure that adding this actually loads conda
subprocess.run(unload_python_load_conda + "which conda", shell=True, check=True)
# Save
conda_setup_commands += " " + unload_python_load_conda
return conda_setup_commands
def cmds_to_run_via_conda(caseroot, conda_run_call, command):
# Run in the specified conda environment
conda_setup_commands = cmds_to_setup_conda(caseroot)
conda_setup_commands += " " + conda_run_call
# Finish with Python script call
command = conda_setup_commands + " " + command
print(f"command: {command}")
return command
def run_python_script(caseroot, this_conda_env, command_in, tool_path):
# First, try with "conda run -n"
command = cmds_to_run_via_conda(caseroot, f"conda run -n {this_conda_env}", command_in)
# Run with logfile
tool_name = os.path.split(tool_path)[-1]
try:
with open(tool_name + ".log", "w") as f:
subprocess.run(
command, shell=True, check=True, text=True, stdout=f, stderr=subprocess.STDOUT
)
except subprocess.CalledProcessError as error:
# Retry with the original "conda activate" method
command = cmds_to_run_via_conda(
caseroot,
f"conda activate {this_conda_env} && ",
command_in,
)
try:
with open(tool_name + ".log2", "w") as f:
subprocess.run(
command, shell=True, check=True, text=True, stdout=f, stderr=subprocess.STDOUT
)
except subprocess.CalledProcessError as error:
print("ERROR while getting the conda environment and/or ")
print(f"running the {tool_name} tool: ")
print(f"(1) If your {this_conda_env} environment is out of date or you ")
print(f"have not created the {this_conda_env} environment, yet, you may ")
print("get past this error by running ./py_env_create ")
print("in your ctsm directory and trying this test again. ")
print("(2) If conda is not available, install and load conda, ")
print("run ./py_env_create, and then try this test again. ")
print("(3) If (1) and (2) are not the issue, then you may be ")
print(f"getting an error within {tool_name} itself. ")
print("Default error message: ")
print(error.output)
raise
except:
print(f"ERROR trying to run {tool_name}.")
raise
except:
print(f"ERROR trying to run {tool_name}.")
raise

197
cime_config/buildlib Normal file
View File

@ -0,0 +1,197 @@
#!/usr/bin/env python3
"""
build ctsm library
"""
import sys, os
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
_LIBDIR = os.path.join(_CIMEROOT, "CIME", "Tools")
sys.path.append(_LIBDIR)
from standard_script_setup import *
from CIME.buildlib import parse_input
from CIME.build import get_standard_makefile_args
from CIME.case import Case
from CIME.utils import run_cmd, expect
logger = logging.getLogger(__name__)
###############################################################################
def _write_ctsm_mk(gmake, gmake_opts, makefile, exeroot, libroot):
"""Writes a ctsm.mk file in exeroot.
This file can be included by atmosphere model builds outside of cime.
"""
cime_output_file = os.path.join(exeroot, "cime_variables.mk")
# Set COMP_NAME=driver because some link flags are set differently when COMP_NAME=driver, and
# those are the ones we want here.
cmd = (
"{gmake} write_include_and_link_flags OUTPUT_FILE={cime_output_file} "
"COMP_NAME=driver {gmake_opts} -f {makefile} "
).format(
gmake=gmake,
cime_output_file=cime_output_file,
gmake_opts=gmake_opts,
makefile=makefile,
)
rc, out, err = run_cmd(cmd)
logger.info("%s: \n\n output:\n %s \n\n err:\n\n%s\n" % (cmd, out, err))
expect(rc == 0, "Command %s failed with rc=%s" % (cmd, rc))
ctsm_mk_path = os.path.join(exeroot, "ctsm.mk")
with open(ctsm_mk_path, "w") as ctsm_mk:
ctsm_mk.write(
"""
# ======================================================================
# Include this file to get makefile variables needed to include / link
# LILAC/CTSM in an atmosphere model's build
#
# Variables of interest are:
# - CTSM_INCLUDES: add this to the compilation line
# - CTSM_LIBS: add this to the link line
# ======================================================================
# ======================================================================
# The following CIME variables are meant for internal use, and generally
# should not be included directly in an atmosphere model's build.
# ======================================================================
"""
)
with open(cime_output_file) as infile:
ctsm_mk.write(infile.read())
ctsm_bld_dir = os.path.abspath(os.path.join(libroot, os.pardir))
with open(ctsm_mk_path, "a") as ctsm_mk:
ctsm_mk.write(
"""
# ======================================================================
# The following settings are meant for internal use, and generally
# should not be included directly in an atmosphere model's build.
# NOTE: clm library name and subdirectory will eventually need to
# be updated to ctsm.
# ======================================================================
CTSM_BLD_DIR = {ctsm_bld_dir}
CTSM_INC = $(CTSM_BLD_DIR)/clm/obj
# ======================================================================
# The following settings should be included in an atmosphere model's build.
# ======================================================================
CTSM_INCLUDES = $(CIME_ESMF_F90COMPILEPATHS) -I$(CIME_CSM_SHR_INCLUDE) -I$(CTSM_INC)
CTSM_LIBS = -L$(CTSM_BLD_DIR)/lib -lclm $(CIME_ULIBS) $(CIME_SLIBS) $(CIME_MLIBS) $(CIME_F90_LDFLAGS)
""".format(
ctsm_bld_dir=ctsm_bld_dir
)
)
###############################################################################
def _main_func():
###############################################################################
caseroot, libroot, bldroot = parse_input(sys.argv)
with Case(caseroot) as case:
casetools = case.get_value("CASETOOLS")
makefile = os.path.join(casetools, "Makefile")
lnd_root = case.get_value("COMP_ROOT_DIR_LND")
gmake_j = case.get_value("GMAKE_J")
gmake = case.get_value("GMAKE")
gmake_opts = get_standard_makefile_args(case)
driver = case.get_value("COMP_INTERFACE").lower()
lilac_mode = case.get_value("LILAC_MODE")
if lilac_mode == "on":
driver = "lilac"
# -------------------------------------------------------
# create Filepath file
# -------------------------------------------------------
compname = case.get_value("COMP_LND")
filepath_file = os.path.join(bldroot, "Filepath")
if not os.path.isfile(filepath_file):
caseroot = case.get_value("CASEROOT")
expect(
((compname == "clm") or (compname == "ctsm")),
"Unexpected COMP_LND name: %s" % (compname),
)
paths = [
os.path.join(caseroot, "SourceMods", "src." + compname),
os.path.join(lnd_root, "src", "cpl", driver),
os.path.join(lnd_root, "src", "main"),
os.path.join(lnd_root, "src", "biogeophys"),
os.path.join(lnd_root, "src", "biogeochem"),
os.path.join(lnd_root, "src", "soilbiogeochem"),
os.path.join(lnd_root, "src", "dyn_subgrid"),
os.path.join(lnd_root, "src", "init_interp"),
os.path.join(lnd_root, "src", "self_tests"),
os.path.join(lnd_root, "src", "fates"),
os.path.join(lnd_root, "src", "fates", "main"),
os.path.join(lnd_root, "src", "fates", "biogeophys"),
os.path.join(lnd_root, "src", "fates", "biogeochem"),
os.path.join(lnd_root, "src", "fates", "fire"),
os.path.join(lnd_root, "src", "fates", "parteh"),
os.path.join(lnd_root, "src", "fates", "radiation"),
os.path.join(lnd_root, "src", "utils"),
os.path.join(lnd_root, "src", "cpl"),
os.path.join(lnd_root, "src", "cpl", "utils"),
]
if lilac_mode == "on":
paths.append(os.path.join(lnd_root, "lilac", "src"))
# If we want to build with a real river model (e.g., MOSART), we'll need
# to use its directories in place of stub_rof
paths.append(os.path.join(lnd_root, "lilac", "stub_rof"))
if driver == "lilac" or driver == "nuopc":
paths.append(os.path.join(lnd_root, "src", "cpl", "share_esmf"))
with open(filepath_file, "w") as filepath:
filepath.write("\n".join(paths))
filepath.write("\n")
# -------------------------------------------------------
# create the library in libroot
# -------------------------------------------------------
complib = os.path.join(libroot, "lib%s.a" % (compname))
cmd = "{} complib -j {} COMP_NAME={} COMPLIB={} -f {} {}".format(
gmake, gmake_j, compname, complib, makefile, gmake_opts
)
rc, out, err = run_cmd(cmd)
logger.info("%s: \n\n output:\n %s \n\n err:\n\n%s\n" % (cmd, out, err))
expect(rc == 0, "Command %s failed with rc=%s" % (cmd, rc))
# ------------------------------------------------------------------------
# for lilac usage, we need a file containing some Makefile variables (for the atmosphere model's build)
# ------------------------------------------------------------------------
if lilac_mode == "on":
_write_ctsm_mk(
gmake=gmake,
gmake_opts=gmake_opts,
makefile=makefile,
exeroot=case.get_value("EXEROOT"),
libroot=libroot,
)
###############################################################################
if __name__ == "__main__":
logger.warning(
"WARNING: buildlib is being called as a program rather than a subroutine as "
+ "it is expected to be in the CESM context"
)
_main_func()

418
cime_config/buildnml Normal file
View File

@ -0,0 +1,418 @@
#!/usr/bin/env python3
"""
CTSM namelist creator
"""
import sys, os, shutil, re
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
_LIBDIR = os.path.join(_CIMEROOT, "CIME", "Tools")
sys.path.append(_LIBDIR)
from standard_script_setup import *
from CIME.buildnml import create_namelist_infile, parse_input
from CIME.case import Case
from CIME.utils import expect, run_cmd
logger = logging.getLogger(__name__)
_config_cache_template = """
<?xml version="1.0"?>
<config_definition>
<commandline></commandline>
<entry id="phys" value="{clm_phys}" list="" valid_values="clm4_5,clm5_0,clm5_1,clm6_0">Specifies CTSM physics</entry>
</config_definition>
"""
###############################################################################
def buildnml(case, caseroot, compname):
###############################################################################
"""Build the CTSM namelist"""
# Build the component namelist
if compname != "ctsm" and compname != "clm":
raise AttributeError
lnd_root = case.get_value("COMP_ROOT_DIR_LND")
din_loc_root = case.get_value("DIN_LOC_ROOT")
configuration = case.get_value("CLM_CONFIGURATION")
structure = case.get_value("CLM_STRUCTURE")
ccsm_co2_ppmv = case.get_value("CCSM_CO2_PPMV")
casename = case.get_value("CASE")
clm_co2_type = case.get_value("CLM_CO2_TYPE")
clm_namelist_opts = case.get_value("CLM_NAMELIST_OPTS")
clm_bldnml_opts = case.get_value("CLM_BLDNML_OPTS")
clm_nml_use_case = case.get_value("CLM_NML_USE_CASE")
clm_force_coldstart = case.get_value("CLM_FORCE_COLDSTART")
lnd_tuning_mode = case.get_value("LND_TUNING_MODE")
clm_accelerated_spinup = case.get_value("CLM_ACCELERATED_SPINUP")
comp_atm = case.get_value("COMP_ATM")
lnd_grid = case.get_value("LND_GRID")
ninst_lnd = case.get_value("NINST_LND")
rundir = case.get_value("RUNDIR")
run_type = case.get_value("RUN_TYPE")
run_startdate = case.get_value("RUN_STARTDATE")
run_refcase = case.get_value("RUN_REFCASE")
run_refdate = case.get_value("RUN_REFDATE")
run_reftod = case.get_value("RUN_REFTOD")
glc_nec = case.get_value("GLC_NEC")
glc_use_antarctica = case.get_value("GLC_USE_ANTARCTICA")
mask = case.get_value("MASK_GRID")
driver = case.get_value("COMP_INTERFACE").lower()
# Create init_generated_files directory if not there
newdir = os.path.join(rundir, "init_generated_files")
if not os.path.exists(newdir):
os.mkdir(newdir)
# -----------------------------------------------------
# Error checking
# -----------------------------------------------------
if clm_bldnml_opts.find("-namelist") >= 0:
expect(
False,
"The -namelist option is NOT allowed to be part of CLM_BLDNML_OPTS, "
+ "use the CLM_NAMELIST_OPTS option or add namelist items to user_nl_clm instead ",
)
#
# Warnings for land tuning modes
#
closest_tuning = {
"clm4_5_1PT": "clm4_5_CRUv7",
"clm4_5_QIAN": "clm4_5_CRUv7",
"clm4_5_NLDAS2": "clm4_5_CRUv7",
"clm4_5_ERA5": "clm4_5_CRUv7",
"clm5_0_1PT": "clm5_0_GSWP3v1",
"clm5_0_QIAN": "clm5_0_GSWP3v1",
"clm5_0_NLDAS2": "clm5_0_GSWP3v1",
"clm5_0_ERA5": "clm5_0_GSWP3v1",
"clm5_1_1PT": "clm5_1_GSWP3v1",
"clm5_1_QIAN": "clm5_1_GSWP3v1",
"clm5_1_NLDAS2": "clm5_1_GSWP3v1",
"clm5_1_ERA5": "clm5_1_GSWP3v1",
"clm5_1_CRUv7": "clm5_1_GSWP3v1",
"clm6_0_1PT": "clm6_0_GSWP3v1",
"clm6_0_QIAN": "clm6_0_GSWP3v1",
"clm6_0_NLDAS2": "clm6_0_GSWP3v1",
"clm6_0_ERA5": "clm6_0_GSWP3v1",
"clm6_0_CRUv7": "clm6_0_GSWP3v1",
}
for mode, closest in closest_tuning.items():
if lnd_tuning_mode == mode:
logger.warning(
"IMPORTANT NOTE: LND_TUNING_MODE is "
+ lnd_tuning_mode
+ " which does NOT have tuned settings, so using the closest option which is "
+ closest
)
logger.warning(
" : To suppress this message explicitly set LND_TUNING_MODE="
+ lnd_tuning_mode
+ " for your case"
)
lnd_tuning_mode = closest
# CAM4 and CAM5 options are based on cam6 tuning
# (other than the Zender dust emission soil eroditability file which is specific
# to the CAM version)
tuning_based_on = {
"clm6_0_GSWP3v1": "clm5_0_GSWP3v1",
"clm5_1_GSWP3v1": "clm5_0_GSWP3v1",
"clm6_0_cam6.0": "clm5_0_cam6.0",
"clm6_0_cam5.0": "clm5_0_cam6.0",
"clm6_0_cam4.0": "clm5_0_cam6.0",
"clm5_1_cam6.0": "clm5_0_cam6.0",
"clm5_1_cam5.0": "clm5_0_cam6.0",
"clm5_1_cam4.0": "clm5_0_cam6.0",
"clm5_0_cam5.0": "clm5_0_cam6.0",
"clm5_0_cam4.0": "clm5_0_cam6.0",
"clm4_5_cam6.0": "clm5_0_cam6.0",
"clm4_5_cam5.0": "clm5_0_cam6.0",
"clm4_5_cam4.0": "clm5_0_cam6.0",
}
for mode, based_on in tuning_based_on.items():
if lnd_tuning_mode == mode:
logger.warning(
"NOTE: LND_TUNING_MODE is "
+ lnd_tuning_mode
+ " which is NOT tuned, but is based on "
+ based_on
)
# -----------------------------------------------------
# Set ctsmconf
# -----------------------------------------------------
ctsmconf = os.path.join(caseroot, "Buildconf", compname + "conf")
if not os.path.isdir(ctsmconf):
os.makedirs(ctsmconf)
# -----------------------------------------------------
# Create config_cache.xml file
# -----------------------------------------------------
# Note that build-namelist utilizes the contents of the config_cache.xml file in
# the namelist_defaults.xml file to obtain namelist variables
clm_phys = case.get_value("CLM_PHYSICS_VERSION")
config_cache_text = _config_cache_template.format(clm_phys=clm_phys)
config_cache_path = os.path.join(caseroot, "Buildconf", compname + "conf", "config_cache.xml")
with open(config_cache_path, "w") as config_cache_file:
config_cache_file.write(config_cache_text)
# -----------------------------------------------------
# Determine input arguments into build-namelist
# -----------------------------------------------------
startfile_type = "finidat"
start_type = "default"
if run_type == "hybrid":
start_type = "startup"
elif run_type != "startup":
start_type = run_type
if run_type == "branch":
startfile_type = "nrevsn"
if clm_force_coldstart == "on":
clm_force_coldstart = "off"
logger.warning(
"WARNING: You've turned on CLM_FORCE_COLDSTART for a branch run_type, which is a contradiction, the coldstart will be ignored\n"
+ " turn off CLM_FORCE_COLDSTART, or set RUN_TYPE=hybrid to get rid of this warning"
)
if clm_force_coldstart == "on":
logger.warning("WARNING: CLM is starting up from a cold state")
start_type = "cold"
if lnd_grid == "T31":
lnd_grid = "48x96"
if lnd_grid == "T42":
lnd_grid = "64x128"
if lnd_grid == "T85":
lnd_grid = "128x256"
if lnd_grid == "T341":
lnd_grid = "512x1024"
clmusr = ""
if lnd_grid == "CLM_USRDAT":
clm_usrdat_name = case.get_value("CLM_USRDAT_NAME")
clmusr = " -clm_usr_name %s " % clm_usrdat_name
# Write warning about initial condition data
if "NEON" in clm_usrdat_name and clm_force_coldstart == "off":
if ("_transient" in clm_nml_use_case) and (
re.fullmatch(r"\w\w\w\w\.transient", casename) is None
or clm_usrdat_name is "NEON.PRISM"
):
logger.warning(
"WARNING: Do you have appropriate initial conditions for this simulation?"
+ " Check that the finidat file used in the lnd_in namelist is appropriately spunup for your case"
)
if comp_atm != "datm":
nomeg = "-no-megan"
else:
nomeg = ""
if glc_use_antarctica is None:
# This is the case for compsets with SGLC where the GLC_USE_ANTARCTICA xml
# variable isn't defined
glc_use_antarctica_flag = ""
elif isinstance(glc_use_antarctica, bool):
if glc_use_antarctica:
glc_use_antarctica_flag = "-glc_use_antarctica"
else:
glc_use_antarctica_flag = ""
else:
expect(
False,
"Unexpected value for GLC_USE_ANTARCTICA: {}".format(glc_use_antarctica),
)
if clm_nml_use_case != "UNSET":
usecase = "-use_case %s" % clm_nml_use_case
else:
usecase = ""
if (mask != "null") and (mask != "UNSET"):
gridmask = "-mask %s" % mask
else:
gridmask = ""
start_ymd = run_startdate.replace("-", "")
if ("-01-01" in run_startdate) or ("-09-01" in run_startdate):
ignore = "-ignore_ic_year"
else:
ignore = "-ignore_ic_date"
tuning = "-lnd_tuning_mode %s " % lnd_tuning_mode
spinup = "-clm_accelerated_spinup %s " % clm_accelerated_spinup
infile = os.path.join(ctsmconf, "namelist")
inputdata_file = os.path.join(caseroot, "Buildconf", "ctsm.input_data_list")
if driver == "nuopc":
lndfrac_setting = " "
else:
lnd_domain_path = case.get_value("LND_DOMAIN_PATH")
lnd_domain_file = case.get_value("LND_DOMAIN_FILE")
lndfrac_file = os.path.join(lnd_domain_path, lnd_domain_file)
lndfrac_setting = "-lnd_frac " + lndfrac_file
config_cache_file = os.path.join(caseroot, "Buildconf", compname + "conf", "config_cache.xml")
# -----------------------------------------------------
# Clear out old data
# -----------------------------------------------------
if os.path.exists(inputdata_file):
os.remove(inputdata_file)
# -----------------------------------------------------
# loop over instances
# -----------------------------------------------------
ninst = int(ninst_lnd)
for inst_counter in range(1, ninst + 1):
# determine instance string
inst_string = ""
if ninst > 1:
inst_string = "_" + "%04d" % inst_counter
# If multi-instance case does not have restart file, use
# single-case restart for each instance
rpointer = "rpointer.lnd"
if os.path.isfile(os.path.join(rundir, rpointer)) and (
not os.path.isfile(os.path.join(rundir, rpointer + inst_string))
):
shutil.copy(
os.path.join(rundir, rpointer),
os.path.join(rundir, rpointer + inst_string),
)
# -----------------------------------------------------
# call build-namelist
# -----------------------------------------------------
if run_type == "hybrid" or run_type == "branch":
compnames = ["clm4", "clm5", "clm2"]
for comp in compnames:
clm_startfile = "%s.%s%s.r.%s-%s.nc" % (
run_refcase,
comp,
inst_string,
run_refdate,
run_reftod,
)
if os.path.exists(os.path.join(rundir, clm_startfile)):
break
else:
clm_startfile = "%s.%s.r.%s-%s.nc" % (
run_refcase,
comp,
run_refdate,
run_reftod,
)
if os.path.exists(os.path.join(rundir, clm_startfile)):
logger.warning(
"WARNING: the start file being used for a multi-instance case is a single instance: "
+ clm_startfile
)
break
if not os.path.exists(os.path.join(rundir, clm_startfile)):
logger.warning("WARNING: Could NOT find a start file to use using" + clm_startfile)
clm_icfile = "%s = '%s'" % (startfile_type, clm_startfile)
else:
clm_icfile = ""
infile_lines = []
infile_lines.append(clm_icfile)
user_nl_file = os.path.join(caseroot, "user_nl_clm" + inst_string)
namelist_infile = os.path.join(ctsmconf, "namelist")
create_namelist_infile(case, user_nl_file, namelist_infile, "\n".join(infile_lines))
cmd = os.path.join(lnd_root, "bld", "build-namelist")
command = (
'%s -cimeroot %s -infile %s -csmdata %s -inputdata %s %s -namelist "&clm_inparm start_ymd=%s %s/ " '
"%s %s -res %s %s -clm_start_type %s -envxml_dir %s "
"-configuration %s -structure %s "
"%s -glc_nec %s %s -co2_ppmv %s -co2_type %s -config %s -driver %s "
"%s %s %s %s"
% (
cmd,
_CIMEROOT,
infile,
din_loc_root,
inputdata_file,
ignore,
start_ymd,
clm_namelist_opts,
nomeg,
usecase,
lnd_grid,
clmusr,
start_type,
caseroot,
configuration,
structure,
lndfrac_setting,
glc_nec,
glc_use_antarctica_flag,
ccsm_co2_ppmv,
clm_co2_type,
config_cache_file,
driver,
clm_bldnml_opts,
spinup,
tuning,
gridmask,
)
)
rc, out, err = run_cmd(command, from_dir=ctsmconf)
expect(rc == 0, "Command %s failed rc=%d\nout=%s\nerr=%s" % (cmd, rc, out, err))
if out is not None:
logger.debug(" %s" % out)
if err is not None:
logger.debug(" %s" % err)
# -----------------------------------------------------
# copy resolved namelist to rundir
# -----------------------------------------------------
if os.path.isdir(rundir):
file1 = os.path.join(ctsmconf, "lnd_in")
file2 = os.path.join(rundir, "lnd_in")
if ninst > 1:
file2 += inst_string
logger.debug("CTSM namelist copy: file1 %s file2 %s " % (file1, file2))
shutil.copy(file1, file2)
###############################################################################
def _main_func():
caseroot = parse_input(sys.argv)
with Case(caseroot) as case:
compname = case.get_value("COMP_LND")
logger.warning(
"WARNING: buildnml is being called a s program rather than a subroutine "
+ "as it is expected to be in the CESM context"
)
buildnml(case, caseroot, compname)
if __name__ == "__main__":
_main_func()

View File

@ -0,0 +1,49 @@
<components version="2.0">
<comp_archive_spec compname="clm" compclass="lnd">
<rest_file_extension>r</rest_file_extension>
<rest_file_extension>rh\d?</rest_file_extension>
<hist_file_extension>h\d*.*\.nc$</hist_file_extension>
<hist_file_extension>lilac_hi.*\.nc$</hist_file_extension>
<hist_file_extension>lilac_atm_driver_h\d*.*\.nc$</hist_file_extension>
<hist_file_extension>e</hist_file_extension>
<rest_history_varname>locfnh</rest_history_varname>
<rpointer>
<rpointer_file>rpointer.lnd$NINST_STRING</rpointer_file>
<rpointer_content>./$CASE.clm2$NINST_STRING.r.$DATENAME.nc</rpointer_content>
</rpointer>
<test_file_names>
<tfile disposition="copy">rpointer.lnd</tfile>
<tfile disposition="copy">rpointer.lnd_9999</tfile>
<tfile disposition="copy">casename.clm2.r.1976-01-01-00000.nc</tfile>
<tfile disposition="copy">casename.clm2.rh4.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.clm2.h0.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.clm2.lilac_hi.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.clm2.lilac_atm_driver_h0.0001-01.nc</tfile>
<tfile disposition="ignore">casename.clm2.h0.1976-01-01-00000.nc.base</tfile>
<tfile disposition="move">casename.clm2_0002.e.postassim.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.clm2_0002.e.preassim.1976-01-01-00000.nc</tfile>
<tfile disposition="ignore">anothercasename.clm2.i.1976-01-01-00000.nc</tfile>
</test_file_names>
</comp_archive_spec>
<comp_archive_spec compname="ctsm" compclass="lnd">
<rest_file_extension>r</rest_file_extension>
<rest_file_extension>rh\d?</rest_file_extension>
<hist_file_extension>h\d*.*\.nc$</hist_file_extension>
<hist_file_extension>e</hist_file_extension>
<rest_history_varname>locfnh</rest_history_varname>
<rpointer>
<rpointer_file>rpointer.lnd$NINST_STRING</rpointer_file>
<rpointer_content>./$CASE.ctsm$NINST_STRING.r.$DATENAME.nc</rpointer_content>
</rpointer>
<test_file_names>
<tfile disposition="copy">rpointer.lnd</tfile>
<tfile disposition="copy">rpointer.lnd_9999</tfile>
<tfile disposition="copy">casename.ctsm.r.1976-01-01-00000.nc</tfile>
<tfile disposition="copy">casename.ctsm.rh4.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.ctsm.h0.1976-01-01-00000.nc</tfile>
<tfile disposition="ignore">casename.ctsm.h0.1976-01-01-00000.nc.base</tfile>
<tfile disposition="move">casename.ctsm_0002.e.postassim.1976-01-01-00000.nc</tfile>
<tfile disposition="move">casename.ctsm_0002.e.preassim.1976-01-01-00000.nc</tfile>
</test_file_names>
</comp_archive_spec>
</components>

View File

@ -0,0 +1,410 @@
<?xml-stylesheet type="text/xsl" href="definitions_variables.xsl" ?>
<entry_id version="3.0">
<!-- modifier_mode allowed values are
'*' 0 or more modifiers (default)
'1' exactly 1 modifier
'?' 0 or 1 modifiers
'+' 1 or more modifiers
This file may have lnd desc entries.
-->
<!-- Descriptions of all the different valid configurations for different model versions -->
<description modifier_mode="1">
<desc lnd="CLM45[%SP][%SP-VIC][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP]" >clm4.5:</desc>
<desc lnd="CLM50[%SP][%SP-VIC][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK][%NWP-SP][%NWP-BGC-CROP]">clm5.0:</desc>
<desc lnd="CLM51[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%FATES-SP][%NWP-SP][%NWP-BGC-CROP]">clm5.1:</desc>
<desc lnd="CLM60[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%FATES-SP][%NWP-SP][%NWP-BGC-CROP]">clm6.0:</desc>
<desc option="SP" >Satellite phenology:</desc>
<desc option="SP-VIC" >Satellite phenology with VIC hydrology:</desc>
<desc option="SP-NOANTHRO" >Satellite phenology without anthropomorphic influences</desc>
<desc option="BGC" >BGC (vert. resol. CN and methane):</desc>
<desc option="BGC-CROP" >BGC (vert. resol. CN and methane) with prognostic crop:</desc>
<desc option="BGC-NOANTHRO" >BGC (vert. resol. CN and methane) without anthropomorphic influences:</desc>
<desc option="FATES" >FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: </desc>
<desc option="FATES-SP" >Satellite phenology with FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: </desc>
<desc option="BGCDV" >BGC (vert. resol. CN and methane) with dynamic vegetation:</desc>
<desc option="BGCDV-CROP" >BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop:</desc>
<desc option="BGC-CROP-CMIP6DECK">BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 DECK experiments:</desc>
<desc option="BGC-CROP-CMIP6WACCMDECK">BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 WACCM DECK experiments:</desc>
<desc option="NWP-SP" >NWP configuration with satellite phenology:</desc>
<desc option="NWP-BGC-CROP" >NWP configuration with BGC and CROP:</desc>
</description>
<entry id="COMP_LND">
<type>char</type>
<valid_values>clm,ctsm</valid_values>
<default_value>UNSET</default_value>
<values>
<value compset="CLM" >clm</value>
<value compset="CTSM">ctsm</value>
</values>
<group>case_comp</group>
<file>env_case.xml</file>
<desc>Name of land component</desc>
</entry>
<entry id="LILAC_MODE">
<type>char</type>
<valid_values>on,off</valid_values>
<default_value>off</default_value>
<group>build_component_ctsm</group>
<file>env_build.xml</file>
<desc>Flag to enable building the LILAC cap and coupling code</desc>
</entry>
<entry id="LND_TUNING_MODE">
<type>char</type>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Tuning parameters and initial conditions should be optimized for what CLM model version and what meteorlogical forcing combination?
Options for all combinations of CLM physics and atm forcing are given. The buildnml and namelist_defaults will narrow it down to the ones
that have been tuned. The buildnml will also warn you if a tuning combination is based on another set.
Atm forcing options:
CRUv7
GSWP3
CAM4.0
CAM5.0
CAM6.0
CAM7.0
QIAN (not tuned)
1PT (not tuned)
NLDAS2 (not tuned)
ERA5 (not tuned)
Other atm forcing options are invalid to run CLM and will result in an error.
</desc>
<default_value>UNSET</default_value>
<!-- 10 forcing options for each CLM physics option: CRUv7, GSWP3, cam7.0, cam6.0, cam5.0, cam4.0, QIAN, 1PT, NLDAS2, ERA5 -->
<valid_values>clm5_0_cam6.0,clm5_0_cam7.0,clm5.0_cam5.0,clm5.0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm5_1_CRUv7,clm5_1_GSWP3v1,clm5_1_cam6.0,clm5_1_QIAN,clm5_1_1PT,clm5_1_NLDAS2,clm5_1_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5</valid_values>
<values match="last">
<!-- Options for atm forcing are: CRU, CRUv7, GSWP3, cam6.0 (also used for DATM%CPLHIST), cam5.0, cam4.0, QIAN, WISOQIA, 1PT, NLDAS2, and ERA5) -->
<!-- All the clm4_5 physics options -->
<value compset="SATM_CLM45" >clm4_5_CRUv7</value>
<value compset="DATM%CRUv7_CLM45" >clm4_5_CRUv7</value>
<value compset="DATM%CRU_CLM45" >clm4_5_CRUv7</value>
<value compset="DATM%GSWP3v1_CLM45">clm4_5_GSWP3v1</value>
<value compset="CAM[^_]+_CLM45" >clm4_5_cam6.0</value>
<value compset="CAM40.*_CLM45" >clm4_5_cam4.0</value>
<value compset="CAM50.*_CLM45" >clm4_5_cam5.0</value>
<value compset="CAM7[^_]+_CLM45" >clm4_5_cam7.0</value>
<value compset="DATM%CPLHIST_CLM45">clm4_5_cam6.0</value>
<value compset="DATM%QIA_CLM45" >clm4_5_QIAN</value>
<value compset="DATM%WISOQIA_CLM45">clm4_5_QIAN</value>
<value compset="DATM%1PT_CLM45" >clm4_5_1PT</value>
<value compset="DATM%NLDAS2_CLM45" >clm4_5_NLDAS2</value>
<value compset="DATM%ERA5_CLM45" >clm4_5_ERA5</value>
<!-- All the clm5_0 physics options -->
<value compset="DATM%CRUv7_CLM50" >clm5_0_CRUv7</value>
<value compset="DATM%CRU_CLM50" >clm5_0_CRUv7</value>
<value compset="SATM_CLM50" >clm5_0_GSWP3v1</value>
<value compset="DATM%GSWP3v1_CLM50">clm5_0_GSWP3v1</value>
<value compset="CAM[^_]+_CLM50" >clm5_0_cam6.0</value>
<value compset="CAM40.*_CLM50" >clm5_0_cam4.0</value>
<value compset="CAM50.*_CLM50" >clm5_0_cam5.0</value>
<value compset="CAM7[^_]+_CLM50" >clm5_0_cam7.0</value>
<value compset="DATM%CPLHIST_CLM50">clm5_0_cam6.0</value>
<value compset="DATM%QIA_CLM50" >clm5_0_QIAN</value>
<value compset="DATM%WISOQIA_CLM50">clm5_0_QIAN</value>
<value compset="DATM%1PT_CLM50" >clm5_0_1PT</value>
<value compset="DATM%NLDAS2_CLM50" >clm5_0_NLDAS2</value>
<value compset="DATM%ERA5_CLM50" >clm5_0_ERA5</value>
<!-- All the clm5_1 physics options -->
<value compset="SATM_CLM51" >clm5_1_GSWP3v1</value>
<value compset="DATM%GSWP3v1_CLM51">clm5_1_GSWP3v1</value>
<value compset="CAM[^_]+_CLM51" >clm5_1_cam6.0</value>
<value compset="CAM40.*_CLM51" >clm5_1_cam4.0</value>
<value compset="CAM50.*_CLM51" >clm5_1_cam5.0</value>
<value compset="DATM%CPLHIST_CLM51">clm5_1_cam6.0</value>
<!-- All the clm6_0 physics options -->
<value compset="DATM%CRUv7_CLM60" >clm6_0_CRUv7</value>
<value compset="DATM%CRU_CLM60" >clm6_0_CRUv7</value>
<value compset="SATM_CLM60" >clm6_0_GSWP3v1</value>
<value compset="DATM%GSWP3v1_CLM60">clm6_0_GSWP3v1</value>
<value compset="CAM[^_]+_CLM60" >clm6_0_cam6.0</value>
<value compset="CAM40.*_CLM60" >clm6_0_cam4.0</value>
<value compset="CAM50.*_CLM60" >clm6_0_cam5.0</value>
<value compset="CAM7[^_]+_CLM60" >clm6_0_cam7.0</value>
<value compset="DATM%CPLHIST_CLM60">clm6_0_cam6.0</value>
<value compset="DATM%QIA_CLM60" >clm6_0_QIAN</value>
<value compset="DATM%WISOQIA_CLM60">clm6_0_QIAN</value>
<value compset="DATM%1PT_CLM60" >clm6_0_1PT</value>
<value compset="DATM%NLDAS2_CLM60" >clm6_0_NLDAS2</value>
<value compset="DATM%ERA5_CLM60" >clm6_0_ERA5</value>
<!-- Invalid ocean DATM forcing options -->
<value compset="DATM%NYF" >INVALID_DATM_FORCING_FOR_RUNNING_CTSM</value>
<value compset="DATM%MOSARTTEST" >INVALID_DATM_FORCING_FOR_RUNNING_CTSM</value>
<value compset="DATM%IAF" >INVALID_DATM_FORCING_FOR_RUNNING_CTSM</value>
<value compset="DATM%JRA" >INVALID_DATM_FORCING_FOR_RUNNING_CTSM</value>
</values>
</entry>
<entry id="CLM_PHYSICS_VERSION" >
<type>char</type>
<valid_values>clm4_5,clm5_0,clm5_1,clm6_0</valid_values>
<!-- By setting the default_value to UNSET (or some other non-empty
string that doesn't appear in the list of valid_values), the
scripts will ensure that one of the below values is picked up
by the compset match. -->
<default_value>UNSET</default_value>
<values>
<value compset="_CLM45" >clm4_5</value>
<value compset="_CLM50" >clm5_0</value>
<value compset="_CLM51" >clm5_1</value>
<value compset="_CLM60" >clm6_0</value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Overall physics version to use.
This sets the default values for many different namelist options.
This is typically set by the compset.</desc>
</entry>
<entry id="CLM_CONFIGURATION">
<type>char</type>
<valid_values>clm,nwp</valid_values>
<default_value>clm</default_value>
<values>
<value compset="_CLM[^_]*%NWP">nwp</value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Sets CLM default namelist options related to model configuration.
clm: Configuration used for climate applications (CLM)
nwp: Configuration used for numerical weather prediction applications
</desc>
</entry>
<entry id="CLM_STRUCTURE">
<type>char</type>
<valid_values>standard,fast</valid_values>
<default_value>standard</default_value>
<values>
<value compset="_CLM[^_]*%NWP">fast</value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Sets CLM default namelist options related to model structure.
standard: Standard model structure, allowing for more subgrid heterogeneity,
deeper soil, etc., at the cost of slower speeds.
fast: Simplified model structure, achieving faster speeds at the cost of less
subgrid heterogeneity, shallower soil, etc.
</desc>
</entry>
<entry id="CLM_NML_USE_CASE">
<type>char</type>
<default_value>UNSET</default_value>
<values>
<!-- Use SSP5-8.5 for PI to PDAY so will have data up to the current year available (for WACCM compsets that use PDAY) -->
<value compset="^2010_" >2010_control</value>
<value compset="^2000_" >2000_control</value>
<value compset="^1850_" >1850_control</value>
<value compset="^1850_.*_CLM60%[^_]*NOANTHRO" >1850_noanthro_control</value>
<value compset="^1850_.*_CLM50%[^_]*NOANTHRO" >1850_noanthro_control</value>
<value compset="^HIST_" >20thC_transient</value>
<value compset="^SSP585_" >1850-2100_SSP5-8.5_transient</value>
<value compset="^SSP126_" >1850-2100_SSP1-2.6_transient</value>
<value compset="^SSP370_" >1850-2100_SSP3-7.0_transient</value>
<value compset="^SSP534_" >1850-2100_SSP5-3.4_transient</value>
<value compset="^SSP245_" >1850-2100_SSP2-4.5_transient</value>
<value compset="^SSP119_" >1850-2100_SSP1-1.9_transient</value>
<value compset="^SSP434_" >1850-2100_SSP4-3.4_transient</value>
<value compset="^SSP460_" >1850-2100_SSP4-6.0_transient</value>
<value compset="^SSP585_" >1850-2100_SSP5-8.5_transient</value>
<value compset="^AMIP_" >20thC_transient</value>
<value compset="^PIPD_" >1850-2100_SSP5-8.5_transient</value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>CLM namelist use_case.
Determines the use-case that will be sent to the CLM build-namelist utility.
This is normally set by the component set. This is an advanced flag and should only be
used by expert users.</desc>
</entry>
<!-- CLM_BLDNML_OPTS is not additive, we must list all possible combinations -->
<!-- ERROR: the node below is never matched, see bug 2025 -->
<entry id="CLM_BLDNML_OPTS">
<type>char</type>
<default_value></default_value>
<values>
<!--- All versions -->
<value compset="_CLM[^_]*%SP" >-bgc sp</value>
<value compset="_CLM[^_]*BGC" >-bgc bgc</value>
<value compset="_CLM[^_]*BGC-CROP" >-bgc bgc -crop</value>
<value compset="_CLM[^_]*FATES" >-bgc fates -no-megan</value>
<value compset="_CLM[^_]*FATES-SP" >-bgc fates -no-megan</value>
<!-- Options specific for CLM4.5 -->
<value compset="_CLM45%[^_]*BGCDV" >-bgc bgc -dynamic_vegetation</value>
<value compset="_CLM45%[^_]*BGCDV-CROP" >-bgc bgc -dynamic_vegetation -crop</value>
<value compset="_CLM45%[^_]*SP-VIC" >-bgc sp -vichydro </value>
<!-- Options specific for CLM5.0 -->
<value compset="_CLM50%[^_]*BGCDV" >-bgc bgc -dynamic_vegetation</value>
<value compset="_CLM50%[^_]*BGCDV-CROP" >-bgc bgc -dynamic_vegetation -crop</value>
<value compset="_CLM50%[^_]*SP-VIC" >-bgc sp -vichydro </value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>CLM build-namelist options</desc>
</entry>
<entry id="CLM_CO2_TYPE">
<type>char</type>
<valid_values>constant,diagnostic,prognostic</valid_values>
<default_value>constant</default_value>
<values>
<value compset="_CAM" >diagnostic</value>
<value compset="_BGC%BDRD" >diagnostic</value>
<value compset="_BGC%BPRP" >prognostic</value>
<value compset="HIST.*_DATM" >diagnostic</value>
<value compset="SSP.*_DATM" >diagnostic</value>
</values>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Determines how CLM will determine where CO2 is set.
If value is constant, it will be set to CCSM_CO2_PPMV,
if value is either diagnostic or prognostic, the atmosphere model
MUST send it to CLM. CLM_CO2_TYPE is normally set by the specific
compset, since it HAS to be coordinated with settings for the
atmospheric model. Do not modify this variable. If you want to modify for
your experiment, use your own user-defined component set
This is an advanced flag and should only be used by expert users.</desc>
</entry>
<entry id="CLM_NAMELIST_OPTS">
<type>char</type>
<default_value></default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>CLM-specific namelist settings for -namelist option in the CLM
build-namelist. CLM_NAMELIST_OPTS is normally set as a compset variable
and in general should not be modified for supported compsets.
It is recommended that if you want to modify this value for your experiment,
you should use your own user-defined component sets via using create_newcase
with a compset_file argument.
This is an advanced flag and should only be used by expert users.</desc>
</entry>
<entry id="CLM_ACCELERATED_SPINUP">
<type>char</type>
<valid_values>on,off</valid_values>
<default_value>off</default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Turn on any settings for accellerating the model spinup.
</desc>
</entry>
<entry id="CLM_USRDAT_NAME">
<type>char</type>
<default_value>UNSET</default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Resolution name for user-created resolutions. This is especially used
for single point and regional resolutions created via subset_data from
the global datasets. This should be set when you use CLM_USRDAT as the grid
to create_newcase. The default value is UNSET.
For NEON cases, this can be set to either NEON or NEON.PRISM, the latter of which would
use PRISM precipitation instead of the default NEON precipitation. NEON cases then also
use the variable NEONSITE to specify the exact site.</desc>
</entry>
<entry id="CLM_USRDAT_DIR">
<type>char</type>
<default_value>UNSET</default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Directory name for user-created surface, landuse, and datm datasets.
This is used as an argument in user_mods namelists (e.g. user_nl_clm,
user_nl_datm_streams) generated with the subset_data script. Users
should modify this variable (in shell_commands or elsewhere) to set the
location of user-created data. The default value is UNSET.</desc>
</entry>
<entry id="CLM_FORCE_COLDSTART">
<type>char</type>
<valid_values>on,off</valid_values>
<default_value>off</default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Flag to the CLM build-namelist command to force CLM to do a
cold start (finidat will be set to blanks).
A value of on forces the model to spin up from a cold-start
(arbitrary initial conditions). Setting this value in the xml file will take
precedence over any settings for finidat in the $CASEROOT/user_nl_ctsm file.</desc>
</entry>
<entry id="CLM_USER_MODS">
<type>char</type>
<valid_values></valid_values>
<default_value></default_value>
<values match="last">
<value compset="_CLM60%[^_]*FATES-SP[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp</value>
<value compset="_CLM51%[^_]*FATES-SP[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/fates_sp</value>
<value compset="_CLM50%[^_]*CMIP6DECK[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck</value>
<value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6DECK[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck</value>
<value compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck</value>
<value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_nociso_deck</value>
</values>
<group>run_component_ctsm</group>
<file>env_case.xml</file>
<desc>User mods to apply to specific compset matches. </desc>
</entry>
<entry id="NEONSITE">
<type>char</type>
<!-- NOTE: Be sure to have a comma at the last site-name - otherwise there will be issues see CTSM github issue #1901 -->
<valid_values>
ABBY,BLAN,CPER,DEJU,GRSM,HEAL,KONA,LENO,NIWO,ONAQ,PUUM,SERC,SRER,TALL,TREE,WOOD,
BARR,BONA,DCFS,DELA,GUAN,JERC,KONZ,MLBS,NOGP,ORNL,RMNP,SJER,STEI,TEAK,UKFS,WREF,
BART,CLBJ,DSNY,HARV,JORN,LAJA,MOAB,OAES,OSBS,SCBI,SOAP,STER,TOOL,UNDE,YELL,
NEON_PRECIP.ABBY,NEON_PRECIP.BLAN,NEON_PRECIP.CPER,NEON_PRECIP.DEJU,NEON_PRECIP.GRSM,
NEON_PRECIP.HEAL,NEON_PRECIP.KONA,NEON_PRECIP.LENO,NEON_PRECIP.NIWO,NEON_PRECIP.ONAQ,
NEON_PRECIP.PUUM,NEON_PRECIP.SERC,NEON_PRECIP.SRER,NEON_PRECIP.TALL,NEON_PRECIP.TREE,
NEON_PRECIP.WOOD,NEON_PRECIP.BARR,NEON_PRECIP.BONA,NEON_PRECIP.DCFS,NEON_PRECIP.DELA,
NEON_PRECIP.GUAN,NEON_PRECIP.JERC,NEON_PRECIP.KONZ,NEON_PRECIP.MLBS,NEON_PRECIP.NOGP,
NEON_PRECIP.ORNL,NEON_PRECIP.RMNP,NEON_PRECIP.SJER,NEON_PRECIP.STEI,NEON_PRECIP.TEAK,
NEON_PRECIP.UKFS,NEON_PRECIP.WREF,NEON_PRECIP.BART,NEON_PRECIP.CLBJ,NEON_PRECIP.DSNY,
NEON_PRECIP.HARV,NEON_PRECIP.JORN,NEON_PRECIP.LAJA,NEON_PRECIP.MOAB,NEON_PRECIP.OAES,
NEON_PRECIP.OSBS,NEON_PRECIP.SCBI,NEON_PRECIP.SOAP,NEON_PRECIP.STER,NEON_PRECIP.TOOL,
NEON_PRECIP.UNDE,NEON_PRECIP.YELL,
PRISM_PRECIP.ABBY,PRISM_PRECIP.BLAN,PRISM_PRECIP.CPER,PRISM_PRECIP.GRSM,
PRISM_PRECIP.KONA,PRISM_PRECIP.LENO,PRISM_PRECIP.NIWO,PRISM_PRECIP.ONAQ,
PRISM_PRECIP.SERC,PRISM_PRECIP.SRER,PRISM_PRECIP.TALL,PRISM_PRECIP.TREE,
PRISM_PRECIP.WOOD,PRISM_PRECIP.DCFS,PRISM_PRECIP.DELA,PRISM_PRECIP.JERC,
PRISM_PRECIP.KONZ,PRISM_PRECIP.MLBS,PRISM_PRECIP.NOGP,PRISM_PRECIP.ORNL,
PRISM_PRECIP.RMNP,PRISM_PRECIP.SJER,PRISM_PRECIP.STEI,PRISM_PRECIP.TEAK,
PRISM_PRECIP.UKFS,PRISM_PRECIP.WREF,PRISM_PRECIP.BART,PRISM_PRECIP.CLBJ,
PRISM_PRECIP.DSNY,PRISM_PRECIP.HARV,PRISM_PRECIP.JORN,PRISM_PRECIP.MOAB,
PRISM_PRECIP.OAES,PRISM_PRECIP.OSBS,PRISM_PRECIP.SCBI,PRISM_PRECIP.SOAP,
PRISM_PRECIP.STER,PRISM_PRECIP.UNDE,PRISM_PRECIP.YELL,
</valid_values>
<default_value/>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Name of site for NEON tower data</desc>
</entry>
<entry id="NEONVERSION">
<type>char</type>
<valid_values>v1,v2,v3,latest</valid_values>
<default_value>latest</default_value>
<group>run_component_ctsm</group>
<file>env_run.xml</file>
<desc>Version id of Neon data</desc>
</entry>
<help>
=========================================
CLM naming conventions
=========================================
note: [^_]* means match zero or more of any character BUT an underbar.
(in other words make sure there is NOT a underbar before the string afterwards)
</help>
</entry_id>

View File

@ -0,0 +1,702 @@
<?xml version="1.0"?>
<compsets version="2.0">
<help>
=========================================
compset naming convention
=========================================
The compset longname below has the specified order
atm, lnd, ice, ocn, river, glc wave cesm-options
The notation for the compset longname is
TIME_ATM[%phys]_LND[%phys]_ICE[%phys]_OCN[%phys]_ROF[%phys]_GLC[%phys]_WAV[%phys][_BGC%phys]
Where for the CAM specific compsets below the following is supported
TIME = Time period (e.g. 2000, HIST, SSP585...)
ATM = [CAM40, CAM50, CAM60]
LND = [CLM45, CLM50, CLM51, CLM60, SLND]
ICE = [CICE, DICE, SICE]
OCN = [DOCN, ,AQUAP, SOCN]
ROF = [RTM, SROF]
GLC = [CISM2, SGLC]
WAV = [SWAV]
BGC = optional BGC scenario
The OPTIONAL %phys attributes specify submodes of the given system
For example DOCN%DOM is the data ocean model for DOCN
ALL the possible %phys choices for each component are listed
with the -list command for create_newcase
ALL data models must have a %phys option that corresponds to the data model mode
Each compset node is associated with the following elements
- lname
- alias
- science_support (if this compset is supported scientifically with control simulations)
</help>
<!-- I single point forcing -->
<compset>
<alias>I1PtClm60Bgc</alias>
<lname>2000_DATM%1PT_CLM60%BGC_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1PtClm60Fates</alias>
<lname>2000_DATM%1PT_CLM60%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHist1PtClm60Bgc</alias>
<lname>HIST_DATM%1PT_CLM60%BGC_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHist1PtClm60Fates</alias>
<lname>HIST_DATM%1PT_CLM60%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1PtClm60SpRs</alias>
<lname>2000_DATM%1PT_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1PtClm50SpRs</alias>
<lname>2000_DATM%1PT_CLM50%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1PtClm45SpRs</alias>
<lname>2000_DATM%1PT_CLM45%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- I CLM50 Compsets -->
<compset>
<alias>I2000Clm50Sp</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm50SpRs</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60SpRs</alias>
<lname>2000_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60Sp</alias>
<lname>2000_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm60SpRs</alias>
<lname>2000_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm50SpRtm</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50SpMizGs</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MIZUROUTE_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2010Clm50Sp</alias>
<lname>2010_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50BgcCru</alias>
<lname>2000_DATM%CRUv7_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm50BgcCropRtm</alias>
<lname>2000_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50BgcCrop</alias>
<lname>2000_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60BgcCrop</alias>
<lname>2000_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60Bgc</alias>
<lname>2000_DATM%GSWP3v1_CLM60%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I1850Clm50Sp</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>I1850Clm50SpCru</alias>
<lname>1850_DATM%CRUv7_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>I1850Clm60SpCru</alias>
<lname>1850_DATM%CRUv7_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50BgcCrop</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>I1850Clm60BgcCrop</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- currently needed for CESM remove when no longer needed -->
<compset>
<alias>I1850Clm60BgcCrop</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60Sp</alias>
<lname>1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60Bgc</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing the CMIP6DECK compset option -->
<!-- Use the CMIP6 version (clm5_0) -->
<compset>
<alias>I1850Clm50BgcCropCmip6</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing the CMIP6WACCMDECK compset option -->
<!-- Use the CMIP6 version (clm5_0) -->
<compset>
<alias>I1850Clm50BgcCropCmip6waccm</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- clm5_0 (CMIP6) version with BGC-Crop and CRU forcing -->
<compset>
<alias>I1850Clm50BgcCropCru</alias>
<lname>1850_DATM%CRUv7_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<!-- latest CLM version with BGC-Crop and CRU forcing -->
<compset>
<alias>I1850Clm60BgcCropCru</alias>
<lname>1850_DATM%CRUv7_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing - when we want builds and runs to be as
fast as possible, but still with full-featured CTSM: uses Qian
atm forcing to speed up datm, SROF to speed up build and run -->
<compset>
<alias>I2000Clm60BgcCropQianRs</alias>
<lname>2000_DATM%QIA_CLM60%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50BgcCropQianRs</alias>
<lname>2000_DATM%QIA_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm45BgcCropQianRs</alias>
<lname>2000_DATM%QIA_CLM45%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50FatesQian</alias>
<lname>2000_DATM%QIA_CLM50%FATES_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50BgcCruRs</alias>
<lname>2000_DATM%CRUv7_CLM50%BGC_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm50SpRtmFl</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_RTM%FLOOD_SGLC_SWAV</lname>
</compset>
<!---I FATES compsets -->
<compset>
<alias>I2000Clm60Fates</alias>
<lname>2000_DATM%GSWP3v1_CLM60%FATES_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50Fates</alias>
<lname>2000_DATM%GSWP3v1_CLM50%FATES_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50FatesCruRsGs</alias>
<lname>2000_DATM%CRUv7_CLM50%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60FatesSpCruRsGs</alias>
<lname>2000_DATM%CRUv7_CLM60%FATES-SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60FatesSpRsGs</alias>
<lname>2000_DATM%GSWP3v1_CLM60%FATES-SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50FatesCru</alias>
<lname>2000_DATM%CRUv7_CLM50%FATES_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm50FatesRs</alias>
<lname>2000_DATM%GSWP3v1_CLM50%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm60FatesRs</alias>
<lname>2000_DATM%GSWP3v1_CLM60%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50Bgc</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60BgcNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60SpNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50BgcNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50SpNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50BgcCrop</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>I1850Clm60SpNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM60%SP-NOANTHRO_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60Sp</alias>
<lname>HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Needed for testing until CAM removes used of CLM51 in compsets-->
<compset>
<alias>IHistClm51Sp</alias>
<lname>HIST_DATM%GSWP3v1_CLM51%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60SpRs</alias>
<lname>HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60Bgc</alias>
<lname>HIST_DATM%GSWP3v1_CLM60%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60BgcCrop</alias>
<lname>HIST_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50Sp</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>IHistClm50SpCru</alias>
<lname>HIST_DATM%CRUv7_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>IHistClm60SpCru</alias>
<lname>HIST_DATM%CRUv7_CLM60%SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50Bgc</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing; uses Qian atmospheric forcing simply to
give faster datm throughput, which is particularly relevant for
single-point cases (where datm dominates the runtime) -->
<compset>
<alias>IHistClm50BgcQian</alias>
<lname>HIST_DATM%QIA_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50BgcQianRs</alias>
<lname>HIST_DATM%QIA_CLM50%BGC_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60BgcQianRs</alias>
<lname>HIST_DATM%QIA_CLM60%BGC_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!--
future scenario compsets
-->
<compset>
<alias>ISSP585Clm50BgcCrop</alias>
<lname>SSP585_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP126Clm50BgcCrop</alias>
<lname>SSP126_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP119Clm50BgcCrop</alias>
<lname>SSP119_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP245Clm50BgcCrop</alias>
<lname>SSP245_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP370Clm50BgcCrop</alias>
<lname>SSP370_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP434Clm50BgcCrop</alias>
<lname>SSP434_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP460Clm50BgcCrop</alias>
<lname>SSP460_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>ISSP534Clm50BgcCrop</alias>
<lname>SSP534_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Latest CLM version -->
<compset>
<alias>ISSP585Clm60BgcCrop</alias>
<lname>SSP585_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing; uses Qian atmospheric forcing simply to
give faster datm throughput, which is particularly relevant for
single-point cases (where datm dominates the runtime) -->
<compset>
<alias>IHistClm50BgcCropQianRs</alias>
<lname>HIST_DATM%QIA_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>IHistClm60BgcCropQianRs</alias>
<lname>HIST_DATM%QIA_CLM60%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>IHistClm50BgcCropRs</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing, not entirely sure this configure works -->
<compset>
<alias>I2000Clm50BgcDvCrop</alias>
<lname>2000_DATM%GSWP3v1_CLM50%BGCDV-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing; uses Qian atmospheric forcing simply to give
faster datm throughput, which is particularly relevant for single-point
cases (where datm dominates the runtime) -->
<compset>
<alias>I2000Clm50BgcDvCropQianRs</alias>
<lname>2000_DATM%QIA_CLM50%BGCDV-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- I cpl history MOAR forcing spinup compsets -->
<compset>
<alias>I1850Clm50BgcSpinup</alias>
<lname>1850_DATM%CPLHIST_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- I CLM50 NWP Compsets -->
<!-- GSWP datm forcing, for global runs or regional runs outside the CONUS -->
<compset>
<alias>I2000Ctsm50NwpSpGswp</alias>
<lname>2000_DATM%GSWP3v1_CLM50%NWP-SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Ctsm50NwpBgcCropGswp</alias>
<lname>2000_DATM%GSWP3v1_CLM50%NWP-BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- NLDAS datm forcing, for regional runs over the CONUS, e.g., using
the nldas grid -->
<compset>
<alias>I2000Ctsm50NwpSpNldas</alias>
<lname>2000_DATM%NLDAS2_CLM50%NWP-SP_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<!-- NLDAS datm forcing, for regional runs over the CONUS, e.g., using
the nldas grid; stub ROF to improve performance -->
<compset>
<alias>I2000Ctsm50NwpSpNldasRs</alias>
<lname>2000_DATM%NLDAS2_CLM50%NWP-SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- I CLM45 Compsets -->
<compset>
<alias>I1850Clm45BgcCrop</alias>
<lname>1850_DATM%GSWP3v1_CLM45%BGC-CROP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm45BgcCru</alias>
<lname>1850_DATM%CRUv7_CLM45%BGC_SICE_SOCN_RTM_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>IHistClm45BgcCrop</alias>
<lname>HIST_DATM%GSWP3v1_CLM45%BGC-CROP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<!-- Primarily for testing; uses Qian atmospheric forcing simply to give
faster datm throughput, which is particularly relevant for single-point
cases (where datm dominates the runtime) -->
<compset>
<alias>IHistClm45BgcCropQianRs</alias>
<lname>HIST_DATM%QIA_CLM45%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm45Sp</alias>
<lname>2000_DATM%GSWP3v1_CLM45%SP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm45BgcCrop</alias>
<lname>2000_DATM%GSWP3v1_CLM45%BGC-CROP_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm45Fates</alias>
<lname>2000_DATM%GSWP3v1_CLM45%FATES_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<!-- Stub rof needed for regional / single-point -->
<compset>
<alias>I2000Clm45FatesRs</alias>
<lname>2000_DATM%GSWP3v1_CLM45%FATES_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm45Bgc</alias>
<lname>1850_DATM%GSWP3v1_CLM45%BGC_SICE_SOCN_RTM_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>IHistClm45Bgc</alias>
<lname>HIST_DATM%GSWP3v1_CLM45%BGC_SICE_SOCN_RTM_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>IHistClm45BgcCru</alias>
<lname>HIST_DATM%CRUv7_CLM45%BGC_SICE_SOCN_RTM_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<compset>
<alias>IHistClm45Sp</alias>
<lname>HIST_DATM%GSWP3v1_CLM45%SP_SICE_SOCN_RTM_SGLC_SWAV</lname>
<science_support grid="f09_g17"/>
<science_support grid="f19_g17"/>
</compset>
<!-- Primarily for testing -->
<compset>
<alias>I2000Clm50Vic</alias>
<lname>2000_DATM%GSWP3v1_CLM50%SP-VIC_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I2000Clm45VicCru</alias>
<lname>2000_DATM%CRUv7_CLM45%SP-VIC_SICE_SOCN_RTM_SGLC_SWAV</lname>
</compset>
<!--
IG compsets with active Glacier model
-->
<compset>
<alias>I1850Clm50SpG</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50SpGa</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_CISM2%AIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50SpGag</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_CISM2%AIS-EVOLVE%GRIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50SpG</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm50BgcCropG</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>IHistClm50BgcCropG</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<!-- Latest CLM version -->
<compset>
<alias>I1850Clm60BgcCropG</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<!-- Needed for testing until removed by CESM -->
<compset>
<alias>I1850Clm51BgcCropG</alias>
<lname>1850_DATM%GSWP3v1_CLM51%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV</lname>
</compset>
<!-- Primarily for testing: same as I1850Clm50SpGag but with SROF -->
<compset>
<alias>I1850Clm50SpRsGag</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_SROF_CISM2%AIS-EVOLVE%GRIS-EVOLVE_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60SpRs</alias>
<lname>1850_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- For LILAC. Uses a stub atmosphere to avoid needing to download
datm input data. (That avoidance is just needed for the compset
used in the LILAC system tests: it's not an issue in the
build_ctsm workflow. In principle we could use a different
compset in build_ctsm than the one used in the LILAC system
tests, but it seems most intuitive to use the same compset for
both purposes.)
-->
<compset>
<alias>I2000Ctsm50NwpSpAsRs</alias>
<lname>2000_SATM_CLM50%NWP-SP_SICE_SOCN_SROF_SGLC_SWAV</lname>
</compset>
<!-- changes to driver xml variables - in case of a tie in the values matches the last match is taken -->
<entries>
<entry id="RUN_STARTDATE">
<values>
<value compset="HIST_" >1850-01-01</value>
<value compset="2000_" >2000-01-01</value>
<value compset="2010_" >2010-01-01</value>
<value compset="SSP" >2015-01-01</value>
<value compset="CLM[45].*_CISM.*_TEST" >1980-01-15</value>
<value compset="CLM[45]%[^_]*CNDV.*_TEST" >1997-12-31</value>
<value grid="a%1x1_mexicocityMEX" >1993-12-01</value>
<value grid="a%1x1_vancouverCAN" >1992-08-12</value>
<value grid="a%1x1_urbanc_alpha" >0001-08-12</value>
</values>
</entry>
<entry id="STOP_OPTION">
<values>
<value grid="a%1x1_mexicocityMEX">nsteps</value>
<value grid="a%1x1_vancouverCAN" >nsteps</value>
<value grid="a%1x1_urbanc_alpha" >nsteps</value>
</values>
</entry>
<entry id="STOP_N">
<values>
<value grid="a%1x1_mexicocityMEX">158</value>
<value grid="a%1x1_vancouverCAN" >331</value>
<value grid="a%1x1_urbanc_alpha" >22772</value>
</values>
</entry>
</entries>
</compsets>

1975
cime_config/config_pes.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,166 @@
<?xml version="1.0"?>
<!--
This defines various CTSM-specific system tests
-->
<config_test>
<test NAME="FUNITCTSM">
<DESC>Run CTSM's Fortran unit tests. Grid and compset (and most case settings) are ignored.</DESC>
<INFO_DBUG>1</INFO_DBUG>
<STOP_OPTION>ndays</STOP_OPTION>
<STOP_N>11</STOP_N>
<CHECK_TIMING>FALSE</CHECK_TIMING>
<DOUT_S>FALSE</DOUT_S>
</test>
<test NAME="MKSURFDATAESMF">
<DESC>Build and run the mksurfdata_esmf tool to generate a new fsurdat; then run the CTSM with this fsurdat</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="FSURDATMODIFYCTSM">
<DESC>Run the CTSM with an fsurdat generated by the fsurdat_modify tool</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LGRAIN2">
<DESC>CTSM Land model test to ensure that we can allocate and use a second grain pool</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LREPRSTRUCT">
<DESC>CTSM Land model test to ensure that we can allocate and use a reproductive structure pool</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LII">
<DESC>CLM initial condition interpolation test (requires configuration with non-blank finidat)</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LII2FINIDATAREAS">
<DESC>CLM initial condition interpolation test using finidat_areas (requires configuration with non-blank finidat)</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LILACSMOKE">
<DESC>CTSM test: Smoke test of building and running CTSM via LILAC. Grid and compset (and most case settings) are ignored.</DESC>
<!-- Many of the options are irrelevant here, but we define them for consistency with other tests -->
<INFO_DBUG>1</INFO_DBUG>
<STOP_OPTION>ndays</STOP_OPTION>
<STOP_N>11</STOP_N>
<CHECK_TIMING>FALSE</CHECK_TIMING>
<DOUT_S>FALSE</DOUT_S>
</test>
<test NAME="LVG">
<DESC>CLM test: Verify that adding virtual glacier columns doesn't change answers</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<!-- Need HIST_OPTION=never for this test because we expect answer changes
in the l2x fields that are separated by elevation class. So for this
test, we just ensure that there are no answer changes in
gridcell-average CLM fields, via comparison of the CLM history
files. This means that, for this test to be effective, it needs to be
done with a testmod that produces at least one CLM history file, which
should only contain gridcell-average fields. (If we had a way to
exclude individual fields from the list of compared fields, then we
could compare cpl hist files, excluding certain l2x fields.) -->
<HIST_OPTION>never</HIST_OPTION>
</test>
<test NAME="LCISO">
<DESC>CTSM Land model test to ensure Carbon isotopes on or off does NOT change answers</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="LWISO">
<DESC>CTSM Land model test to ensure Water isotopes on or off does NOT change answers</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="RXCROPMATURITY">
<DESC>Generate prescribed maturity requirements, then test with them</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<!--
SSP smoke CLM spinup test (only valid for CLM compsets with CLM45)
do an initial spin test (setting CLM_ACCELERATED_SPINUP to on)
write restarts at the end of the run
short term archiving is on
do a hybrid non-spinup simulation run from the restart files generated in the first phase
-->
<test NAME="SSP">
<DESC>smoke CLM spinup test</DESC>
<INFO_DBUG>1</INFO_DBUG>
<STOP_OPTION>ndays</STOP_OPTION>
<RUN_TYPE>startup</RUN_TYPE>
<STOP_N>4</STOP_N>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
<test NAME="SOILSTRUCTUD">
<DESC>CLM user-defined soil structure test</DESC>
<INFO_DBUG>1</INFO_DBUG>
<DOUT_S>FALSE</DOUT_S>
<CONTINUE_RUN>FALSE</CONTINUE_RUN>
<REST_OPTION>never</REST_OPTION>
<HIST_OPTION>$STOP_OPTION</HIST_OPTION>
<HIST_N>$STOP_N</HIST_N>
</test>
</config_test>

View File

@ -0,0 +1,284 @@
<?xml version= "1.0"?>
<expectedFails version="1.1">
<!-- Notes about the format of this file:
The required elements for a given failure are just:
<test name="...">
<phase name="...">
<status>...</status>
</phase>
</test>
There can be multiple phase blocks in a given test block.
In addition, a number of optional elements are allowed, which
currently are just for human consumption (not parsed by any
scripts):
- A phase block can contain an "issue" element, which gives the
issue number associated with this failure. (#123 refers to issue
#123 in the ESCOMP/ctsm repository. Issues in other repositories
should be specified as ORG/repo#123 - e.g., ESMCI/cime#123.)
- A phase block can contain a "comment" element, which gives any
sort of comment you desire.
-->
<!-- ctsm_sci test suite failures -->
<test name="RXCROPMATURITY_Lm61.f09_g17.IHistClm50BgcCrop.derecho_intel.clm-cropMonthOutput">
<phase name="RUN">
<status>PEND</status>
<issue>#2460</issue>
</phase>
</test>
<test name="SMS_Ld12_Mmpi-serial.1x1_urbanc_alpha.I1PtClm60SpRs.derecho_intel.clm-output_sp_highfreq">
<phase name="RUN">
<status>FAIL</status>
<issue>CDEPS/#243</issue>
</phase>
</test>
<!-- aux_clm test suite failures -->
<test name="SMS_D_Ld10.f10_f10_mg37.I2000Clm50BgcCrop.izumi_intel.clm-tracer_consistency">
<phase name="RUN">
<status>FAIL</status>
<issue>#2444</issue>
</phase>
</test>
<test name="SMS_D_Ld1_Mmpi-serial_Vmct.f45_f45_mg37.I2000Clm50SpRs.izumi_gnu.clm-ptsRLA">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#1887</issue>
</phase>
</test>
<test name="SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#1733</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Bgc.derecho_gnu.clm-default--clm-NEON-NIWO">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Bgc.derecho_gnu.clm-NEON-MOAB--clm-PRISM">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.derecho_gnu.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.derecho_gnu.clm-FatesPRISM--clm-NEON-FATES-YELL">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60SpRs.derecho_gnu.clm-default--clm-NEON-TOOL">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_intel.clm-FatesColdHydro">
<phase name="RUN">
<status>FAIL</status>
<issue>#2373</issue>
</phase>
</test>
<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdHydro">
<phase name="RUN">
<status>FAIL</status>
<issue>#2373</issue>
</phase>
</test>
<test name="FUNITCTSM_P1x1.f10_f10_mg37.I2000Clm50Sp.izumi_intel">
<phase name="RUN">
<status>FAIL</status>
<issue>#2453</issue>
</phase>
</test>
<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.izumi_nag.clm-FatesColdTwoStream">
<phase name="CREATE_NEWCASE">
<status>FAIL</status>
<issue>#2454</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.izumi_nag.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.izumi_nag.clm-FatesPRISM--clm-NEON-FATES-YELL">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<!-- fates test suite failures -->
<test name="SMS_D_Ld3.f09_g17.I2000Clm60FatesSpCruRsGs.derecho_gnu.clm-FatesColdSatPhen_prescribed">
<phase name="RUN">
<status>FAIL</status>
<issue>#2321</issue>
</phase>
</test>
<test name="ERS_D_Ld5.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdHydro">
<phase name="RUN">
<status>FAIL</status>
<issue>#2373</issue>
</phase>
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>FATES#701</issue>
</phase>
</test>
<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdHydro">
<phase name="RUN">
<status>FAIL</status>
<issue>#2373</issue>
</phase>
</test>
<test name="ERS_D_Ld5.1x1_brazil.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdHydro">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>FATES#701</issue>
</phase>
</test>
<test name="ERP_P256x2_Ld30.f45_f45_mg37.I2000Clm60FatesRs.derecho_intel.clm-mimicsFatesCold">
<phase name="RUN">
<status>FAIL</status>
<issue>#2261</issue>
</phase>
</test>
<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdPRT2">
<phase name="RUN">
<status>PEND</status>
<issue>FATES#983</issue>
<comment>This job should time out on izumi, seems to be hanging on history output.</comment>
</phase>
</test>
<test name="PEM_D_Ld15.f10_f10_mg37.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdSeedDisp">
<phase name="COMPARE_base_modpes">
<status>FAIL</status>
<issue>FATES#1089</issue>
</phase>
</test>
<test name="PEM_D_Ld15.5x5_amazon.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdSeedDisp">
<phase name="COMPARE_base_modpes">
<status>FAIL</status>
<issue>FATES#1089</issue>
</phase>
</test>
<test name="SMS_D_Ld5.5x5_amazon.I1850Clm51Bgc.derecho_gnu.clm-HillslopeC">
<phase name="RUN">
<status>FAIL</status>
<issue>#2423</issue>
</phase>
</test>
<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_intel.clm-FatesColdTwoStream">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>
<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.izumi_nag.clm-FatesColdTwoStream">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>
<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdTwoStreamNoCompFixedBioGeo">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.derecho_intel.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>
<!-- Other external test list failures (MOSART, RTM, etc. -->
<test name="SMS_Lh3.f10_f10_mg37.I2000Clm51Sp.derecho_intel.mosart-clmAccelSpinupIgnoreWarn">
<phase name="CREATE_NEWCASE">
<status>FAIL</status>
<issue>MOSART#91</issue>
</phase>
</test>
</expectedFails>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
../default

View File

@ -0,0 +1,5 @@
#!/bin/bash
./xmlchange CLM_ACCELERATED_SPINUP="on"
./xmlchange MOSART_MODE="NULL"

View File

@ -0,0 +1,16 @@
#!/bin/bash
if [ "`./xmlquery ATM_GRID --value`" == "1x1_vancouverCAN" ]; then
# Go one day in, so don't have to set the TOD as well
./xmlchange RUN_STARTDATE="1992-08-13"
elif [ "`./xmlquery ATM_GRID --value`" == "1x1_mexicocityMEX" ]; then
# Go one day in, so don't have to set the TOD as well
./xmlchange RUN_STARTDATE="1993-12-02"
elif [ "`./xmlquery ATM_GRID --value`" == "1x1_urbanc_alpha" ]; then
# Go one day in, so don't have to set the TOD as well
./xmlchange RUN_STARTDATE="0001-08-13"
#
# Otherwise let this be set by the specific site
#
fi

View File

@ -0,0 +1 @@
../default

View File

@ -0,0 +1,6 @@
# Test Data Assimilation with multi-driver on
./xmlchange LND_DATA_ASSIMILATION=TRUE
./xmlchange MULTI_DRIVER=TRUE
# Set calendar, just because Gregorian is ussually used for DA
./xmlchange CALENDAR=GREGORIAN

View File

@ -0,0 +1,13 @@
! Settings being used for DART cases
hist_empty_htapes = .true.
hist_fincl1 = 'NEP','TOTECOSYSC','TOTVEGC','TLAI'
hist_fincl2 = 'NEP','FSH','EFLX_LH_TOT_R'
hist_fincl3 = 'TV','TLAI','PBOT','TBOT','TSA','RH2M_R','SNOWDP'
hist_nhtfrq = -24,1,-24
hist_mfilt = 1,48,1
hist_avgflag_pertape = 'A','A','I'
hist_dov2xy = .true.,.true.,.false.
hist_type1d_pertape = ' ',' ',' '
use_init_interp = .true.
finidat = '/glade/campaign/cisl/dares/glade-p-dares-Oct2023/RDA_strawman/CESM_ensembles/CLM/CLM5BGC-Crop/ctsm_2001-01-01-00000/clm5_f09_spinup80.clm2_0001.r.2001-01-01-00000.nc'

View File

@ -0,0 +1,13 @@
! Settings being used for DART cases
hist_empty_htapes = .true.
hist_fincl1 = 'NEP','TOTECOSYSC','TOTVEGC','TLAI'
hist_fincl2 = 'NEP','FSH','EFLX_LH_TOT_R'
hist_fincl3 = 'TV','TLAI','PBOT','TBOT','TSA','RH2M_R','SNOWDP'
hist_nhtfrq = -24,1,-24
hist_mfilt = 1,48,1
hist_avgflag_pertape = 'A','A','I'
hist_dov2xy = .true.,.true.,.false.
hist_type1d_pertape = ' ',' ',' '
use_init_interp = .true.
finidat = '/glade/campaign/cisl/dares/glade-p-dares-Oct2023/RDA_strawman/CESM_ensembles/CLM/CLM5BGC-Crop/ctsm_2001-01-01-00000/clm5_f09_spinup80.clm2_0002.r.2001-01-01-00000.nc'

View File

@ -0,0 +1,2 @@
../monthly
../../../../usermods_dirs/output_sp_exice

View File

@ -0,0 +1,3 @@
use_excess_ice = .true.
finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0003-01-01.0.9x1.25_gx1v7_exice_simyr1850_c221205.nc'
use_init_interp = .true.

View File

@ -0,0 +1 @@
../default

View File

@ -0,0 +1,2 @@
use_excess_ice = .true.
use_excess_ice_streams = .true.

View File

@ -0,0 +1,2 @@
./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"

View File

@ -0,0 +1,30 @@
!! USES THE DEFAULT INITIALIZATION FILE SPECIFIED IN bld/namelist_files/namelist_defaults_ctsm.xml
hist_mfilt = 365
hist_nhtfrq = -24
hist_empty_htapes = .true.
hist_ndens = 1
fates_spitfire_mode = 1
hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_AREA_TREES', 'FATES_COLD_STATUS', 'FATES_GDD',
'FATES_NCHILLDAYS', 'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF','FATES_DAYSINCE_COLDLEAFON',
'FATES_CANOPY_SPREAD', 'FATES_NESTEROV_INDEX', 'FATES_IGNITIONS', 'FATES_FDI',
'FATES_ROS','FATES_EFFECT_WSPEED', 'FATES_FUELCONSUMED', 'FATES_FIRE_INTENSITY',
'FATES_FIRE_INTENSITY_BURNFRAC', 'FATES_BURNFRAC', 'FATES_FUEL_MEF',
'FATES_FUEL_BULKD', 'FATES_FUEL_EFF_MOIST', 'FATES_FUEL_SAV',
'FATES_FUEL_AMOUNT', 'FATES_LITTER_IN', 'FATES_LITTER_OUT',
'FATES_SEED_BANK', 'FATES_SEEDS_IN', 'FATES_STOREC', 'FATES_VEGC',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
'FATES_AUTORESP_CANOPY', 'FATES_GPP_USTORY', 'FATES_AUTORESP_USTORY',
'FATES_DEMOTION_CARBONFLUX', 'FATES_PROMOTION_CARBONFLUX',
'FATES_MORTALITY_CFLUX_CANOPY', 'FATES_MORTALITY_CFLUX_USTORY',
'FATES_NEP', 'FATES_HET_RESP', 'FATES_FIRE_CLOSS', 'FATES_FIRE_FLUX_EL',
'FATES_CBALANCE_ERROR', 'FATES_ERROR_EL', 'FATES_LEAF_ALLOC',
'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC',
'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC',
'FATES_PATCHAREA_LU', 'FATES_DISTURBANCE_RATE_MATRIX_LULU'

View File

@ -0,0 +1 @@
../Fates

View File

@ -0,0 +1 @@
./xmlchange CLM_FORCE_COLDSTART="on"

View File

@ -0,0 +1,3 @@
./xmlchange CLM_BLDNML_OPTS="-no-megan" --append
./xmlchange BFBFLAG="TRUE"
./xmlchange CLM_FORCE_COLDSTART="on"

View File

@ -0,0 +1,59 @@
!finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/iclm45fates-finit-s1.4.0-a3.0.0-f45.clm2.r.0111-01-01-00000.nc'
hist_mfilt = 365
hist_nhtfrq = -24
hist_empty_htapes = .false.
fates_spitfire_mode = 1
fates_history_dimlevel = 2,2
use_fates_tree_damage = .true.
hist_ndens = 1
hist_fincl1 = 'FATES_TLONGTERM',
'FATES_TGROWTH','FATES_SEEDS_IN_GRIDCELL_PF','FATES_SEEDS_OUT_GRIDCELL_PF','FATES_NCL_AP',
'FATES_NPATCH_AP','FATES_VEGC_AP','FATES_SECONDAREA_ANTHRODIST_AP','FATES_SECONDAREA_DIST_AP',
'FATES_FUEL_AMOUNT_APFC','FATES_STOREC_TF_USTORY_SZPF','FATES_STOREC_TF_CANOPY_SZPF',
'FATES_CROWNAREA_CLLL','FATES_ABOVEGROUND_MORT_SZPF',
'FATES_ABOVEGROUND_PROD_SZPF','FATES_NPLANT_SZAP','FATES_NPLANT_CANOPY_SZAP',
'FATES_NPLANT_USTORY_SZAP','FATES_DDBH_CANOPY_SZAP','FATES_DDBH_USTORY_SZAP',
'FATES_MORTALITY_CANOPY_SZAP','FATES_MORTALITY_USTORY_SZAP','FATES_NPLANT_SZAPPF',
'FATES_NPP_APPF','FATES_VEGC_APPF','FATES_SCORCH_HEIGHT_APPF','FATES_GPP_SZPF',
'FATES_GPP_CANOPY_SZPF','FATES_AUTORESP_CANOPY_SZPF','FATES_GPP_USTORY_SZPF',
'FATES_AUTORESP_USTORY_SZPF','FATES_NPP_SZPF','FATES_LEAF_ALLOC_SZPF',
'FATES_SEED_ALLOC_SZPF','FATES_FROOT_ALLOC_SZPF','FATES_BGSAPWOOD_ALLOC_SZPF',
'FATES_BGSTRUCT_ALLOC_SZPF','FATES_AGSAPWOOD_ALLOC_SZPF','FATES_AGSTRUCT_ALLOC_SZPF',
'FATES_STORE_ALLOC_SZPF','FATES_DDBH_SZPF','FATES_GROWTHFLUX_SZPF','FATES_GROWTHFLUX_FUSION_SZPF',
'FATES_DDBH_CANOPY_SZPF','FATES_DDBH_USTORY_SZPF','FATES_BASALAREA_SZPF','FATES_VEGC_ABOVEGROUND_SZPF',
'FATES_NPLANT_SZPF','FATES_NPLANT_ACPF','FATES_MORTALITY_BACKGROUND_SZPF','FATES_MORTALITY_HYDRAULIC_SZPF',
'FATES_MORTALITY_CSTARV_SZPF','FATES_MORTALITY_IMPACT_SZPF','FATES_MORTALITY_FIRE_SZPF',
'FATES_MORTALITY_CROWNSCORCH_SZPF','FATES_MORTALITY_CAMBIALBURN_SZPF','FATES_MORTALITY_TERMINATION_SZPF',
'FATES_MORTALITY_LOGGING_SZPF','FATES_MORTALITY_FREEZING_SZPF','FATES_MORTALITY_SENESCENCE_SZPF',
'FATES_MORTALITY_AGESCEN_SZPF','FATES_MORTALITY_AGESCEN_ACPF','FATES_MORTALITY_CANOPY_SZPF',
'FATES_M3_MORTALITY_CANOPY_SZPF','FATES_M3_MORTALITY_USTORY_SZPF','FATES_C13DISC_SZPF',
'FATES_STOREC_CANOPY_SZPF','FATES_LEAFC_CANOPY_SZPF','FATES_LAI_CANOPY_SZPF','FATES_CROWNAREA_CANOPY_SZPF',
'FATES_CROWNAREA_USTORY_SZPF','FATES_NPLANT_CANOPY_SZPF','FATES_MORTALITY_USTORY_SZPF','FATES_STOREC_USTORY_SZPF',
'FATES_LEAFC_USTORY_SZPF','FATES_LAI_USTORY_SZPF','FATES_NPLANT_USTORY_SZPF','FATES_CWD_ABOVEGROUND_DC',
'FATES_CWD_BELOWGROUND_DC','FATES_CWD_ABOVEGROUND_IN_DC','FATES_CWD_BELOWGROUND_IN_DC',
'FATES_CWD_ABOVEGROUND_OUT_DC','FATES_CWD_BELOWGROUND_OUT_DC','FATES_YESTCANLEV_CANOPY_SZ',
'FATES_YESTCANLEV_USTORY_SZ','FATES_VEGC_SZ','FATES_DEMOTION_RATE_SZ','FATES_PROMOTION_RATE_SZ',
'FATES_SAI_CANOPY_SZ','FATES_M3_MORTALITY_CANOPY_SZ','FATES_M3_MORTALITY_USTORY_SZ','FATES_SAI_USTORY_SZ',
'FATES_NPP_CANOPY_SZ','FATES_NPP_USTORY_SZ','FATES_TRIMMING_CANOPY_SZ','FATES_TRIMMING_USTORY_SZ',
'FATES_CROWNAREA_CANOPY_SZ','FATES_CROWNAREA_USTORY_SZ','FATES_LEAFCTURN_CANOPY_SZ','FATES_FROOTCTURN_CANOPY_SZ',
'FATES_STORECTURN_CANOPY_SZ','FATES_STRUCTCTURN_CANOPY_SZ','FATES_SAPWOODCTURN_CANOPY_SZ','FATES_SEED_PROD_CANOPY_SZ',
'FATES_LEAF_ALLOC_CANOPY_SZ','FATES_FROOT_ALLOC_CANOPY_SZ','FATES_SAPWOOD_ALLOC_CANOPY_SZ','FATES_STRUCT_ALLOC_CANOPY_SZ',
'FATES_SEED_ALLOC_CANOPY_SZ','FATES_STORE_ALLOC_CANOPY_SZ','FATES_LEAFCTURN_USTORY_SZ','FATES_FROOTCTURN_USTORY_SZ',
'FATES_STORECTURN_USTORY_SZ','FATES_STRUCTCTURN_USTORY_SZ','FATES_SAPWOODCTURN_USTORY_SZ',
'FATES_SEED_PROD_USTORY_SZ','FATES_LEAF_ALLOC_USTORY_SZ','FATES_FROOT_ALLOC_USTORY_SZ','FATES_SAPWOOD_ALLOC_USTORY_SZ',
'FATES_STRUCT_ALLOC_USTORY_SZ','FATES_SEED_ALLOC_USTORY_SZ','FATES_STORE_ALLOC_USTORY_SZ','FATES_CROWNAREA_CANOPY_CD',
'FATES_CROWNAREA_USTORY_CD','FATES_NPLANT_CDPF','FATES_NPLANT_CANOPY_CDPF','FATES_NPLANT_USTORY_CDPF',
'FATES_M3_CDPF','FATES_M11_SZPF','FATES_M11_CDPF','FATES_MORTALITY_CDPF','FATES_M3_MORTALITY_CANOPY_CDPF',
'FATES_M3_MORTALITY_USTORY_CDPF','FATES_M11_MORTALITY_CANOPY_CDPF','FATES_M11_MORTALITY_USTORY_CDPF',
'FATES_MORTALITY_CANOPY_CDPF','FATES_MORTALITY_USTORY_CDPF','FATES_DDBH_CDPF','FATES_DDBH_CANOPY_CDPF',
'FATES_DDBH_USTORY_CDPF','FATES_VEGC_SZPF','FATES_LEAFC_SZPF','FATES_FROOTC_SZPF','FATES_SAPWOODC_SZPF',
'FATES_STOREC_SZPF','FATES_REPROC_SZPF','FATES_NPP_AP','FATES_GPP_AP','FATES_RDARK_USTORY_SZ',
'FATES_LSTEMMAINTAR_USTORY_SZ','FATES_CROOTMAINTAR_USTORY_SZ','FATES_FROOTMAINTAR_USTORY_SZ','FATES_GROWAR_USTORY_SZ',
'FATES_MAINTAR_USTORY_SZ','FATES_RDARK_CANOPY_SZ','FATES_CROOTMAINTAR_CANOPY_SZ','FATES_FROOTMAINTAR_CANOPY_SZ',
'FATES_GROWAR_CANOPY_SZ','FATES_MAINTAR_CANOPY_SZ','FATES_LSTEMMAINTAR_CANOPY_SZ','FATES_AUTORESP_SZPF',
'FATES_GROWAR_SZPF','FATES_MAINTAR_SZPF','FATES_RDARK_SZPF','FATES_AGSAPMAINTAR_SZPF','FATES_BGSAPMAINTAR_SZPF',
'FATES_FROOTMAINTAR_SZPF','FATES_PARSUN_CLLL','FATES_PARSHA_CLLL','FATES_PARSUN_CLLLPF','FATES_PARSHA_CLLLPF',
'FATES_PARSUN_CL','FATES_PARSHA_CL','FATES_LAISUN_CLLL','FATES_LAISHA_CLLL','FATES_LAISUN_CLLLPF',
'FATES_LAISHA_CLLLPF','FATES_PARPROF_DIR_CLLLPF','FATES_PARPROF_DIF_CLLLPF','FATES_LAISUN_CL','FATES_LAISHA_CL',
'FATES_PARPROF_DIR_CLLL','FATES_PARPROF_DIF_CLLL','FATES_NET_C_UPTAKE_CLLL','FATES_CROWNFRAC_CLLLPF',
'FATES_LBLAYER_COND_AP','FATES_STOMATAL_COND_AP'

View File

@ -0,0 +1,2 @@
./xmlchange CLM_FORCE_COLDSTART="on"
./xmlchange BFBFLAG="TRUE"

Some files were not shown because too many files have changed in this diff Show More