Repository: ESMCI/cime

Issue:
Short term and long-term archiving issues in cim5.0.10
case.st_archive and case.lt_archive setup for the number of tasks as in case.run rather than 1 as they should. This is on yellowstone.

Also DOUT_S is default FALSE, and we probably want it default TRUE? 

For example, the testcase SMS_D.f10_f10.A.yellowstone_intel. But, you can probably see it with other cases as well.



Discussion:

Resolving patch:
diff --git a/utils/python/CIME/XML/env_batch.py b/utils/python/CIME/XML/env_batch.py
--- a/utils/python/CIME/XML/env_batch.py
+++ b/utils/python/CIME/XML/env_batch.py
@@ -233,7 +233,7 @@ def make_batch_script(self, input_template, job, case):
         self.tasks_per_numa = task_maker.tasks_per_numa
         self.num_tasks = task_maker.totaltasks
 
-        task_count = self.get_value("task_count")
+        task_count = self.get_value("task_count", subgroup=job)
         if task_count == "default":
             self.sumpes = task_maker.fullsum
             self.totaltasks = task_maker.totaltasks
diff --git a/utils/python/CIME/XML/grids.py b/utils/python/CIME/XML/grids.py
--- a/utils/python/CIME/XML/grids.py
+++ b/utils/python/CIME/XML/grids.py
@@ -98,6 +98,7 @@ def _get_domains(self, component_grids):
                  ("OCN", component_grids[2]), \
                  ("ICE", component_grids[2]), \
                  ("ROF", component_grids[3]), \
+                 ("MASK", component_grids[4]), \
                  ("GLC", component_grids[5]), \
                  ("WAV", component_grids[6])]
         mask = component_grids[4]
@@ -113,8 +114,9 @@ def _get_domains(self, component_grids):
                 mask_name = "ocn_mask"
             root = self.get_optional_node(nodename="domain", attributes={"name":grid[1]})
             if root is not None:
-                domains[grid[0]+"_NX"] = int(self.get_value("nx", root=root))
-                domains[grid[0]+"_NY"] = int(self.get_value("ny", root=root))
+                if grid[0] != "MASK":
+                    domains[grid[0]+"_NX"] = int(self.get_value("nx", root=root))
+                    domains[grid[0]+"_NY"] = int(self.get_value("ny", root=root))
                 domains[grid[0] + "_GRID"] = grid[1]
                 if mask_name is not None:
                     file_ = self.get_value("file", attributes={mask_name:mask}, root=root)
diff --git a/utils/python/CIME/user_mod_support.py b/utils/python/CIME/user_mod_support.py
--- a/utils/python/CIME/user_mod_support.py
+++ b/utils/python/CIME/user_mod_support.py
@@ -92,12 +92,14 @@ def build_include_dirs_list(user_mods_path, include_dirs=None):
     each of those directories for further directories.
     The file may also include comments deleneated with # in the first column
     '''
+    include_dirs = [] if include_dirs is None else include_dirs
+    if user_mods_path is None or user_mods_path == 'UNSET':
+        return include_dirs
     expect(os.path.isabs(user_mods_path),
            "Expected full directory path, got '%s'"%user_mods_path)
     expect(os.path.isdir(user_mods_path),
            "Directory not found %s"%user_mods_path)
     logger.info("Adding user mods directory %s"%user_mods_path)
-    include_dirs = [] if include_dirs is None else include_dirs
     include_dirs.append(os.path.normpath(user_mods_path))
     include_file = os.path.join(include_dirs[-1],"include_user_mods")
     if os.path.isfile(include_file):


Test patch:
diff --git a/utils/python/tests/scripts_regression_tests.py b/utils/python/tests/scripts_regression_tests.py
--- a/utils/python/tests/scripts_regression_tests.py
+++ b/utils/python/tests/scripts_regression_tests.py
@@ -1010,8 +1010,9 @@ def simple_test(self, manual_timing=False):
         if manual_timing:
             run_cmd_assert_result(self, "cd %s && %s/save_provenance postrun" % (casedir, TOOLS_DIR))
 
-        provenance_dir = os.path.join(timing_dir, "performance_archive", getpass.getuser(), casename, lids[0])
-        self.assertTrue(os.path.isdir(provenance_dir), msg="'%s' was missing" % provenance_dir)
+        if CIME.utils.get_model() != "acme":
+            provenance_dir = os.path.join(timing_dir, "performance_archive", getpass.getuser(), casename, lids[0])
+            self.assertTrue(os.path.isdir(provenance_dir), msg="'%s' was missing" % provenance_dir)
 
     ###########################################################################
     def test_save_timings(self):