From 8dd14047bc53e7f6cbd9dbb78bf06d1b579b1d12 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 28 Jun 2019 14:39:19 -0600 Subject: [PATCH 1/4] Fix for #14 (coldstart) and #15 (mosart used in files) --- cime_config/buildlib | 2 +- cime_config/buildnml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cime_config/buildlib b/cime_config/buildlib index 62b55ee118..bd41d6cd7f 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -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 diff --git a/cime_config/buildnml b/cime_config/buildnml index 1738359f62..3486746509 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -77,9 +77,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 nmlgen.get_value("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") @@ -159,7 +161,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) #---------------------------------------------------- From 6f59e052421f366928da9dc830a3ebbaa016079a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 28 Jun 2019 14:49:06 -0600 Subject: [PATCH 2/4] Add a cold-start test so that we know we can do a cold-start --- cime_config/testdefs/testlist_rtm.xml | 11 +++++++++++ .../testmods_dirs/rtm/rtmColdStart/include_user_mods | 1 + .../testmods_dirs/rtm/rtmColdStart/user_nl_rtm | 1 + 3 files changed, 13 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/user_nl_rtm diff --git a/cime_config/testdefs/testlist_rtm.xml b/cime_config/testdefs/testlist_rtm.xml index e316a27983..ed29088030 100644 --- a/cime_config/testdefs/testlist_rtm.xml +++ b/cime_config/testdefs/testlist_rtm.xml @@ -23,6 +23,17 @@ + + + + + + + + + + + diff --git a/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/include_user_mods b/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/include_user_mods new file mode 100644 index 0000000000..fe0e18cf88 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/include_user_mods @@ -0,0 +1 @@ +../default diff --git a/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/user_nl_rtm b/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/user_nl_rtm new file mode 100644 index 0000000000..84b6ee6e92 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/rtm/rtmColdStart/user_nl_rtm @@ -0,0 +1 @@ + finidat_rtm = ' ' From aa21dd91f4432ea3e122808acd69bc71c776e8aa Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 29 Jun 2019 13:36:14 -0600 Subject: [PATCH 3/4] Cast finidat_rtm get_value to string, so can use .strip on it, no matter what --- cime_config/buildnml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 3486746509..0084220307 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -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") @@ -77,7 +78,7 @@ 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 nmlgen.get_value("finidat_rtm").strip() == '': + elif finidat_rtm.strip() == '': nmlgen.set_value('finidat_rtm', value=' ') else: if nmlgen.get_default('finidat_rtm') == 'UNSET': From dbe4fd44d9be8898b478f32c4b344850e78a62cc Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 3 Jul 2019 15:16:05 -0600 Subject: [PATCH 4/4] Update ChangeLog on new tag --- docs/ChangeLog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/ChangeLog b/docs/ChangeLog index eba4bb1d3d..dab05781a9 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -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