Repository: ESMCI/cime

Issue:
Resolve compset issue
A subtle bug fix - the discovery of compsets needs to have information about available components so that it can look in the correct cime_config directories for config_compsets.xml files. 

Test suite: scripts_regression_tests.py + cesm F cases
Test baseline: 
Test namelist changes: 
Test status: bit for bit
Fixes 

User interface changes?: 

Update gh-pages html (Y/N)?:

Code review: 



Discussion:
@mvertens I have rerun testing on this branch.  All pass
@jgfouca this is ready

Resolving patch:
diff --git a/scripts/lib/CIME/build.py b/scripts/lib/CIME/build.py
--- a/scripts/lib/CIME/build.py
+++ b/scripts/lib/CIME/build.py
@@ -430,7 +430,7 @@ def _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist):
     smp_value           = case.get_value("SMP_VALUE")
     clm_use_petsc       = case.get_value("CLM_USE_PETSC")
     cism_use_trilinos   = case.get_value("CISM_USE_TRILINOS")
-    mpasli_use_albany   = case.get_value("MPASLI_USE_ALBANY")
+    mali_use_albany     = case.get_value("MALI_USE_ALBANY")
     use_moab            = case.get_value("USE_MOAB")
     clm_config_opts     = case.get_value("CLM_CONFIG_OPTS")
     cam_config_opts     = case.get_value("CAM_CONFIG_OPTS")
@@ -462,7 +462,7 @@ def _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist):
     os.environ["PROFILE_PAPI_ENABLE"]  = stringify_bool(profile_papi_enable)
     os.environ["CLM_USE_PETSC"]        = stringify_bool(clm_use_petsc)
     os.environ["CISM_USE_TRILINOS"]    = stringify_bool(cism_use_trilinos)
-    os.environ["MPASLI_USE_ALBANY"]    = stringify_bool(mpasli_use_albany)
+    os.environ["MALI_USE_ALBANY"]      = stringify_bool(mali_use_albany)
     os.environ["USE_MOAB"]             = stringify_bool(use_moab)
 
     if get_model() == "e3sm" and mach == "titan" and compiler == "pgiacc":
@@ -496,11 +496,11 @@ def _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist):
 
     # Set the overall USE_ALBANY variable to TRUE if any of the
     # *_USE_ALBANY variables are TRUE.
-    # For now, there is just the one MPASLI_USE_ALBANY variable, but in
+    # For now, there is just the one MALI_USE_ALBANY variable, but in
     # the future there may be others -- so USE_ALBANY will be true if
     # ANY of those are true.
 
-    use_albany = stringify_bool(mpasli_use_albany)
+    use_albany = stringify_bool(mali_use_albany)
     case.set_value("USE_ALBANY", use_albany)
     os.environ["USE_ALBANY"] = use_albany
 
diff --git a/scripts/lib/CIME/case/check_input_data.py b/scripts/lib/CIME/case/check_input_data.py
--- a/scripts/lib/CIME/case/check_input_data.py
+++ b/scripts/lib/CIME/case/check_input_data.py
@@ -94,6 +94,7 @@ def stage_refcase(self, input_data_root=None, data_list_dir=None):
             success = _downloadfromserver(self, input_data_root=input_data_root, data_list_dir=data_list_dir)
             expect(success, "Could not download refcase from any server")
 
+
         logger.info(" - Prestaging REFCASE ({}) to {}".format(refdir, rundir))
 
         # prestage the reference case's files.


Test patch:
diff --git a/config/e3sm/tests.py b/config/e3sm/tests.py
--- a/config/e3sm/tests.py
+++ b/config/e3sm/tests.py
@@ -25,8 +25,7 @@
                              ),
 
     "e3sm_atm_developer" : (None, None,
-                            ("SMS_D_Ln5.ne4_ne4.FC5",
-                             "ERP_Ln9.ne4_ne4.FC5AV1C-L",
+                            ("ERP_Ln9.ne4_ne4.FC5AV1C-L",
                              ("SMS_Ln9.ne4_ne4.FC5AV1C-L", "cam-outfrq9s"),
                              ("SMS.ne4_ne4.FC5AV1C-L", "cam-cosplite"),
                              "SMS_R_Ld5.T42_T42.FSCM5A97",
@@ -34,8 +33,7 @@
                             ),
 
     "e3sm_atm_integration" : (None, None,
-                              ("ERS_Ln9.ne4_ne4.FC5" ,
-                               "ERP_Ln9.ne4_ne4.FC5AV1C-L-AQUAP",
+                              ("ERP_Ln9.ne4_ne4.FC5AV1C-L-AQUAP",
                                ("PET_Ln5.ne4_ne4.FC5AV1C-L","allactive-mach-pet"),
                                "PEM_Ln5.ne4_ne4.FC5AV1C-L",
                                ("SMS_D_Ln5.ne4_ne4.FC5AV1C-L", "cam-cosplite_nhtfrq5"),
@@ -70,7 +68,7 @@
                          "NCK.f19_g16_rx1.A",
                          "SMS.ne30_f19_g16_rx1.A",
                          "ERS_Ld5.T62_oQU120.CMPASO-NYF",
-                         "ERS.f09_g16_g.MPASLISIA",
+                         "ERS.f09_g16_g.MALISIA",
                          "SMS.T62_oQU120_ais20.MPAS_LISIO_TEST",
                          "SMS.f09_g16_a.IGCLM45_MLI"
                         ,("SMS_P12x2.ne4_oQU240.A_WCYCL1850","allactive-mach_mods")
@@ -86,7 +84,7 @@
                            ("PET_Ln9_PS.ne30_oECv3_ICG.A_WCYCL1850S","allactive-mach-pet"),
                            "PEM_Ln9.ne30_oECv3_ICG.A_WCYCL1850S",
                            "ERP_Ld3.ne30_oECv3_ICG.A_WCYCL1850S",
-                           "SMS.f09_g16_a.MPASLIALB",
+                           "SMS.f09_g16_a.MALI",
                            "SMS_D_Ln5.conusx4v1_conusx4v1.FC5AV1C-L",
 			   ("SMS.ne30_oECv3.BGCEXP_BCRC_CNPRDCTC_1850","clm-bgcexp"),
                            ("SMS.ne30_oECv3.BGCEXP_BCRC_CNPECACNT_1850","clm-bgcexp"))
diff --git a/scripts/lib/get_tests.py b/scripts/lib/get_tests.py
--- a/scripts/lib/get_tests.py
+++ b/scripts/lib/get_tests.py
@@ -6,7 +6,7 @@
 # Expect that, if a model wants to use python-based test lists, they will have a file
 # config/$model/tests.py , containing a test dictionary called _TESTS
 
-sys.path.append(os.path.join(get_cime_root(), "config", get_model()))
+sys.path.insert(0, os.path.join(get_cime_root(), "config", get_model()))
 _ALL_TESTS = {}
 try:
     from tests import _TESTS # pylint: disable=import-error
@@ -70,6 +70,7 @@
                              "MCC_P1.f19_g16_rx1.A",
                              "LDSTA.f45_g37_rx1.A")
                             ),
+
 }
 
 _ALL_TESTS.update(_CIME_TESTS)