Skip to content

Commit

Permalink
Merge pull request ESCOMP#43 from ekluzek/shbangandcheckdir
Browse files Browse the repository at this point in the history
Change shebang lines, abort if direction file not set, add a compset
  • Loading branch information
ekluzek authored Jul 16, 2021
2 parents 0e75b65 + f33cd7d commit b13c753
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ core.*
*.gz
*.log
cime_config/buildnmlc
__pycache__

# test and case directories
tests/
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Build the mosart component library
"""
Expand Down
5 changes: 4 additions & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Namelist creator for CIME's data atmosphere model.
"""
Expand Down Expand Up @@ -120,6 +120,9 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
coupling_period = basedt // mosart_ncpl
nmlgen.set_value("coupling_period", value=coupling_period)

if ( nmlgen.get_value("frivinp_rtm") == "UNSET" ):
raise SystemExit("ERROR: Direction file is NOT set and is required: frivinp_rtm")

#----------------------------------------------------
# Write output file
#----------------------------------------------------
Expand Down
44 changes: 44 additions & 0 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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, RCP8...)
ATM = [CAM40, CAM50, CAM55, CAM60]
LND = [CLM45, CLM50, DLND, SLND]
ICE = [CICE, DICE, SICE]
OCN = [DOCN, SOCN, POP2, MOM]
ROF = [RTM, MOSART, MIZUROUTE, DROF, SROF]
GLC = [CISM1, CISM2, SGLC]
WAV = [SWAV, WWW]
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>

<!-- R compsets -->

<compset>
<alias>R2000MOSART</alias>
<lname>2000_SATM_DLND%LCPL_SICE_SOCN_MIZUROUTE_SGLC_SWAV</lname>
</compset>

</compsets>
1 change: 1 addition & 0 deletions cime_config/namelist_definition_mosart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
<input_pathname>abs</input_pathname>
<group>mosart_inparm</group>
<values>
<value >UNSET</value>
<value rof_grid="r05" >$DIN_LOC_ROOT/rof/mosart/MOSART_routing_Global_0.5x0.5_c170601.nc</value>
<value rof_grid="r8th" >$DIN_LOC_ROOT/rof/mosart/MOSART_Global_8th_20191007.nc</value>
<value rof_grid="0.125nldas2">$DIN_LOC_ROOT/rof/mosart/MOSART_routing_0.125nldas2_cdf5_c200727.nc</value>
Expand Down
16 changes: 16 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
===============================================================
Tag name: mosart1_0_43
Originator(s): erik
Date: July 16, 2021
One-line Summary: Change shebang lines to python3, abort if direction file not set, add compset

Change the shebang lines in buildnml and buildlib for python3
Abort if a direction file is not set
Add a compset for running MOSART on it's own (not tested yet)

Fixes #42 -- Change shebang lines for python
Fixes #35 -- point to directory
Fixes #28 -- add R2000MOSART compset

See https://github.com/ESCOMP/MOSART/pull/43

===============================================================
Tag name: mosart1_0_42
Originator(s): jedwards
Expand Down

0 comments on commit b13c753

Please sign in to comment.