Skip to content

Commit

Permalink
Merge pull request #3666 from jedwards4b/cmeps_driver_env_var
Browse files Browse the repository at this point in the history
Cmeps driver env var
  • Loading branch information
jedwards4b authored Aug 19, 2020
2 parents bea8a7f + ad65d09 commit cb20f87
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
30 changes: 22 additions & 8 deletions config/ufs/config_inputdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<!-- it will be searched for filename and chksum of each downloaded file. -->
<!-- see the file ftp://ftp.cgd.ucar.edu/cesm/inputdata_chksum.dat for proper format. -->

<!-- server for sample data -->
<server>
<comment>ftp site for ufs release</comment>
<protocol>ftp</protocol>
Expand All @@ -16,17 +17,30 @@
<password>[email protected]</password>
<ic_filepath>/inputdata/</ic_filepath>
</server>

<!-- servers for GRIB2 data -->
<server>
<comment>NOMADS site for grib initial conditions (depricated)</comment>
<comment>NCEI Thredds server for historical 0.5 deg. GRIB2 initial conditions</comment>
<protocol>wget</protocol>
<address>https://nomads.ncdc.noaa.gov:</address>
<ic_filepath>data/gfs4/</ic_filepath>
<address>https://www.ncei.noaa.gov</address>
<ic_filepath>thredds/fileServer/model-gfs-004-files-old/</ic_filepath>
</server>
<server>
<comment>NOMADS ftp site for grib initial conditions</comment>
<protocol>ftp</protocol>
<address>ftp://nomads.ncdc.noaa.gov</address>
<ic_filepath>GFS/Grid4</ic_filepath>
<comment>NCEI Thredds server for 0.5 deg. GRIB2 initial conditions</comment>
<protocol>wget</protocol>
<address>https://www.ncei.noaa.gov</address>
<ic_filepath>thredds/fileServer/model-gfs-004-files/</ic_filepath>
</server>
<server>
<comment>NCEI Thredds server for historical 1.0 deg. GRIB2 initial conditions</comment>
<protocol>wget</protocol>
<address>https://www.ncei.noaa.gov</address>
<ic_filepath>thredds/fileServer/model-gfs-003-files-old/</ic_filepath>
</server>
<server>
<comment>NCEI Thredds server for 1.0 deg. GRIB2 initial conditions</comment>
<protocol>wget</protocol>
<address>https://www.ncei.noaa.gov</address>
<ic_filepath>thredds/fileServer/model-gfs-003-files/</ic_filepath>
</server>

</inputdata>
4 changes: 2 additions & 2 deletions config/ufs/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ This allows using a different mpirun command to launch unit tests
</modules>
<modules mpilib="mpt" compiler="gnu">
<command name="use">/glade/p/ral/jntp/GMTB/tools/modulefiles/gnu-8.3.0/mpt-2.19</command>
<command name="load">NCEPlibs/1.0.0</command>
<command name="load">NCEPlibs/1.1.0</command>
</modules>
<modules mpilib="mpt" compiler="intel">
<command name="use">/glade/p/ral/jntp/GMTB/tools/modulefiles/intel-19.0.5/mpt-2.19</command>
<command name="load">NCEPlibs/1.0.0</command>
<command name="load">NCEPlibs/1.1.0</command>
</modules>
<modules compiler="intel" mpilib="impi" DEBUG="FALSE" comp_interface="nuopc">
<command name="use">/glade/p/cesmdata/cseg/PROGS/modulefiles/esmfpkgs/intel/19.0.5</command>
Expand Down
11 changes: 7 additions & 4 deletions scripts/lib/CIME/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,13 @@ def _build_libraries(case, exeroot, sharedpath, caseroot, cimeroot, libroot, lid
os.makedirs(shared_item)

mpilib = case.get_value("MPILIB")
if 'CPL' in case.get_values("COMP_CLASSES"):
libs = ["gptl", "mct", "pio", "csm_share"]
else:
cmeps_driver = os.environ.get("UFS_DRIVER")
if cmeps_driver:
logger.info("UFS_DRIVER is set to {}".format(cmeps_driver))
if cmeps_driver and 'nems' in cmeps_driver:
libs = []
else:
libs = ["gptl", "mct", "pio", "csm_share"]

if mpilib == "mpi-serial":
libs.insert(0, mpilib)
Expand All @@ -351,7 +354,7 @@ def _build_libraries(case, exeroot, sharedpath, caseroot, cimeroot, libroot, lid

# Build shared code of CDEPS nuopc data models
cdeps_build_script = None
if comp_interface == "nuopc":
if comp_interface == "nuopc" and cmeps_driver and not 'nems' in cmeps_driver:
libs.append("CDEPS")
cdeps_build_script = os.path.join(cimeroot, "src", "components", "cdeps", "cime_config", "buildlib")

Expand Down
12 changes: 5 additions & 7 deletions scripts/lib/CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,11 @@ def _set_compset(self, compset_name, files, driver="mct"):

self.set_lookup_value("COMP_INTERFACE", driver)
if self._cime_model == 'ufs':
config = {}
# this is not sustainable, need to come up with something better
if 'ufsatm' in compset_name or 'HAFS' in compset_name:
config['component']='nems'
else:
config['component']='cpl'
comp_root_dir_cpl = files.get_value("COMP_ROOT_DIR_CPL", attribute=config)
cmeps_driver = os.environ.get("UFS_DRIVER")
attribute = None
if cmeps_driver:
attribute = {"component":cmeps_driver}
comp_root_dir_cpl = files.get_value("COMP_ROOT_DIR_CPL", attribute=attribute)

if self._cime_model == 'cesm':
comp_root_dir_cpl = files.get_value("COMP_ROOT_DIR_CPL")
Expand Down
7 changes: 6 additions & 1 deletion scripts/lib/CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,12 @@ def _xml_phase(self, test):
# Determine list of component classes that this coupler/driver knows how
# to deal with. This list follows the same order as compset longnames follow.
files = Files(comp_interface=self._cime_driver)
drv_config_file = files.get_value("CONFIG_CPL_FILE")
cmeps_driver = os.environ.get("UFS_DRIVER")
attribute = None
if cmeps_driver:
attribute = {"component":cmeps_driver}

drv_config_file = files.get_value("CONFIG_CPL_FILE", attribute=attribute)

if self._cime_driver == "nuopc" and not os.path.exists(drv_config_file):
drv_config_file = files.get_value("CONFIG_CPL_FILE", {"component":"cpl"})
Expand Down

0 comments on commit cb20f87

Please sign in to comment.