Skip to content

Commit 687f949

Browse files
authored
Merge pull request #637 from billsacks/add_x_comps
Add test components (X comps) ### Description of changes Add the test components that used to be in CIME. These can be used for testing CMEPS with artificial fields. In CESM, this is done with the `X` compset. These components belong more in CMEPS than in CIME. This brings in some, but not all history of these X components. I brought in as much history as I could fairly easily without going back to points where the history got very messy (with tons of merge commits that cluttered things up). Note that, for `X` compsets to continue to work, this should be coordinated with the CIME changes in ESMCI/cime#4946. But it's safe for the CMEPS changes to come in before the CIME changes. ### Specific notes Contributors other than yourself, if any: CMEPS Issues Fixed (include github issue #): Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) no - bfb Any User Interface Changes (namelist or namelist defaults changes)? ### Testing performed `SMS_Ld2_D_P8x1.f10_g37.X.green_gnu` in cesm3_0_alpha08f with cime and cmeps updated.
2 parents f31ebe6 + cdfb66e commit 687f949

31 files changed

Lines changed: 5179 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../xshare/cime_config/buildlib
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
build data model library
5+
"""
6+
7+
import sys, os
8+
9+
_CIMEROOT = os.path.join(
10+
os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "..", ".."
11+
)
12+
sys.path.append(os.path.join(_CIMEROOT, "CIME", "Tools"))
13+
14+
from standard_script_setup import *
15+
from CIME.buildnml import build_xcpl_nml, parse_input
16+
from CIME.case import Case
17+
18+
19+
def buildnml(case, caseroot, compname):
20+
if compname != "xatm":
21+
raise AttributeError
22+
build_xcpl_nml(case, caseroot, compname)
23+
24+
25+
def _main_func():
26+
caseroot = parse_input(sys.argv)
27+
with Case(caseroot) as case:
28+
buildnml(case, caseroot, "xatm")
29+
30+
31+
if __name__ == "__main__":
32+
_main_func()
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
3+
<?xml-stylesheet type="text/xsl" href="entry_id.xsl" ?>
4+
5+
<entry_id version="3.0">
6+
<description>
7+
<desc atm="XATM">Dead atm component</desc>
8+
</description>
9+
10+
<entry id="COMP_ATM">
11+
<type>char</type>
12+
<valid_values>xatm</valid_values>
13+
<default_value>xatm</default_value>
14+
<group>case_comp</group>
15+
<file>env_case.xml</file>
16+
<desc>Name of atmosphere component</desc>
17+
</entry>
18+
19+
<help>
20+
=========================================
21+
XATM naming conventions in compset name
22+
=========================================
23+
</help>
24+
25+
</entry_id>

med_test_comps/xatm/src/atm_comp_nuopc.F90

Lines changed: 529 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../xshare/cime_config/buildlib
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
build data model library
5+
"""
6+
7+
import sys, os
8+
9+
_CIMEROOT = os.path.join(
10+
os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "..", ".."
11+
)
12+
sys.path.append(os.path.join(_CIMEROOT, "CIME", "Tools"))
13+
14+
from standard_script_setup import *
15+
from CIME.buildnml import build_xcpl_nml, parse_input
16+
from CIME.case import Case
17+
18+
19+
def buildnml(case, caseroot, compname):
20+
if compname != "xglc":
21+
raise AttributeError
22+
build_xcpl_nml(case, caseroot, compname)
23+
24+
25+
def _main_func():
26+
caseroot = parse_input(sys.argv)
27+
with Case(caseroot) as case:
28+
buildnml(case, caseroot, "xglc")
29+
30+
31+
if __name__ == "__main__":
32+
_main_func()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
3+
<?xml-stylesheet type="text/xsl" href="entry_id.xsl" ?>
4+
5+
<entry_id version="3.0">
6+
<description>
7+
<desc glc="XGLC">Dead land-ice component</desc>
8+
</description>
9+
10+
<entry id="COMP_GLC">
11+
<type>char</type>
12+
<valid_values>xglc</valid_values>
13+
<default_value>xglc</default_value>
14+
<group>case_comp</group>
15+
<file>env_case.xml</file>
16+
<desc>Name of land-ice component</desc>
17+
</entry>
18+
19+
20+
<help>
21+
=========================================
22+
XGLC naming conventions in compset name
23+
=========================================
24+
</help>
25+
26+
</entry_id>

0 commit comments

Comments
 (0)