Skip to content

Commit

Permalink
Merge pull request #16 from ekluzek/fixcoldstartnmosart
Browse files Browse the repository at this point in the history
Fix cold start and replace mosart name
  • Loading branch information
ekluzek authored Jul 3, 2019
2 parents cd4d6f9 + dbe4fd4 commit b54329f
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
Build the mosart component library
Build the rtm component library
"""
#pylint: disable=unused-wildcard-import, wildcard-import, multiple-imports
#pylint: disable=wrong-import-position, invalid-name, too-many-locals
Expand Down
7 changes: 5 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
#----------------------------------------------------

run_type = case.get_value("RUN_TYPE")
finidat_rtm = str(nmlgen.get_value("finidat_rtm"))
if run_type == 'branch' or run_type == 'hybrid':
run_refcase = case.get_value("RUN_REFCASE")
run_refdate = case.get_value("RUN_REFDATE")
Expand All @@ -77,9 +78,11 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
nmlgen.add_default("finidat_rtm", value=filename, ignore_abs_path=True)
else:
nmlgen.add_default("nrevsn_rtm", value=filename)
elif finidat_rtm.strip() == '':
nmlgen.set_value('finidat_rtm', value=' ')
else:
if nmlgen.get_default('finidat_rtm') == 'UNSET':
nmlgen.add_default('finidat_rtm', value='', ignore_abs_path=True)
nmlgen.add_default('finidat_rtm', value=' ', ignore_abs_path=True)
else:
nmlgen.add_default("finidat_rtm")

Expand Down Expand Up @@ -159,7 +162,7 @@ def buildnml(case, caseroot, compname):
#----------------------------------------------------
# Clear out old data.
#----------------------------------------------------
data_list_path = os.path.join(case.get_case_root(), "Buildconf", "mosart.input_data_list")
data_list_path = os.path.join(case.get_case_root(), "Buildconf", "rtm.input_data_list")
if os.path.exists(data_list_path):
os.remove(data_list_path)
#----------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions cime_config/testdefs/testlist_rtm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
<option name="comment" >Run with DEBUG compiler option all machine/compilers</option>
</options>
</test>
<test name="SMS_Ld5" grid="f10_f10_musgs" compset="I2000Clm50BgcCropRtm" testmods="rtm/rtmColdStart">
<machines>
<machine name="cheyenne" compiler="intel" category="rtm"></machine>
<machine name="cheyenne" compiler="gnu" category="rtm"></machine>
<machine name="hobart" compiler="nag" category="rtm"></machine>
</machines>
<options>
<option name="wallclock">0:20</option>
<option name="comment" >Run a Cold-Start with all machine/compilers</option>
</options>
</test>
<test name="ERS_Ld5" grid="f10_f10_musgs" compset="I2000Clm50BgcCropRtm" testmods="rtm/rtmOnIceOff">
<machines>
<machine name="cheyenne" compiler="intel" category="rtm">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
finidat_rtm = ' '
23 changes: 23 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
===============================================================
Tag name: rtm1_0_69
Originator(s): erik
Date: Jun 03, 2019
One-line Summary: Fix cold-starts and remove mosart from files

You couldn't set finidat_rtm to blank to indicate a cold start should
be done. This fixes that issue. It now both indicates that a cold start
should happen, AND it doesn't search for an empty filename from inputdata.

Also added a cold-start test to make sure this continues to work.

mosart was in a few places and it was changed to refer to "rtm" now.
For example the list of files needed was mosart.input_data_files now
it's properly rtm.input_data_files.

Fixes: #14, #15

Fixes #14 -- Can't set finidat_rtm to blank indicating a cold-start
Fixes #15 -- mosart is used in the title of some files
Testing:
rtm testlist on hobart and cheyenne (PASS)

===============================================================
Tag name: rtm1_0_68
Originator(s): erik
Expand Down

0 comments on commit b54329f

Please sign in to comment.