Skip to content

Commit

Permalink
Moves rest of required code/data files under CIME module
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Oct 15, 2021
1 parent b00ccc6 commit dfc095e
Show file tree
Hide file tree
Showing 119 changed files with 111 additions and 77 deletions.
4 changes: 2 additions & 2 deletions CIME/Tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ CMAKE_OPTS += -Wno-dev -D CMAKE_Fortran_FLAGS:STRING="$(FFLAGS) $(EXTRA_PIO_FPPD
-D GPTL_PATH:STRING=$(INSTALL_SHAREDPATH) \
-D PIO_ENABLE_TESTS:BOOL=OFF \
-D PIO_USE_MALLOC:BOOL=ON \
-D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/src/CMake;$(EXTERN_PATH)/parallelio/cmake"
-D USER_CMAKE_MODULE_PATH:LIST="$(CIMEROOT)/CIME/data/CMake;$(EXTERN_PATH)/parallelio/cmake"

ifeq ($(DEBUG), TRUE)
CMAKE_OPTS += -D PIO_ENABLE_LOGGING=ON
Expand Down Expand Up @@ -967,7 +967,7 @@ $(COMPLIB): $(OBJS)
$(CXX) -c $(INCLDIR) $(INCS) $(CXXFLAGS) $<

%.F90: %.F90.in
$(CIMEROOT)/src/externals/genf90/genf90.pl $< > $@
$(CIMEROOT)/CIME/data/genf90/genf90.pl $< > $@

clean_dependsatm:
$(RM) -f $(EXEROOT)/atm/obj/Srcfiles
Expand Down
Empty file added CIME/build_scripts/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def buildlib(bldroot, installpath, case):
os.makedirs(pio_dir)
casetools = case.get_value("CASETOOLS")
if pio_version == 1 or scorpio_src_root_dir:
cmake_opts = "\"-D GENF90_PATH=$CIMEROOT/src/externals/genf90 \""
cmake_opts = "\"-D GENF90_PATH=$CIMEROOT/CIME/data/genf90 \""
else:
cmake_opts = "\"-D GENF90_PATH="+srcroot+"/libraries/parallelio/scripts/ \""

Expand Down
11 changes: 11 additions & 0 deletions CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from CIME.XML.standard_module_setup import *
#pylint: disable=import-error,redefined-builtin
from CIME.six.moves import input
from CIME import utils
from CIME.utils import expect, get_cime_root, append_status
from CIME.utils import convert_to_type, get_model, set_model
from CIME.utils import get_project, get_charge_account, check_name
Expand Down Expand Up @@ -101,6 +102,12 @@ def __init__(self, case_root=None, read_only=True, record=False):

self.read_xml()

srcroot = self.get_value("SRCROOT")

# Propagate `srcroot` to `GenericXML` to resolve $SRCROOT
if srcroot is not None:
utils.GLOBAL["SRCROOT"] = srcroot

if record:
self.record_cmd()

Expand Down Expand Up @@ -1765,6 +1772,10 @@ def create(self, casename, srcroot, compset_name, grid_name,
self.set_lookup_value("CASEROOT", self._caseroot)
self.set_lookup_value("SRCROOT", srcroot)
self.set_lookup_value("CASE_HASH", self.new_hash())

# Propagate to `GenericXML` to resolve $SRCROOT
utils.GLOBAL["SRCROOT"] = srcroot

# If any of the top level user_mods_dirs contain a config_grids.xml file and
# gridfile was not set on the command line, use it. However, if there are
# multiple user_mods_dirs, it is an error for more than one of them to contain
Expand Down
Empty file added CIME/config/__init__.py
Empty file.
46 changes: 23 additions & 23 deletions CIME/config/cesm/config_files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
<values>
<value component="datm" comp_interface="nuopc" >$SRCROOT/components/cdeps/datm</value>
<value component="datm" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/datm</value>
<value component="satm" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/satm</value>
<value component="satm" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/satm</value>
<value component="satm" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/satm</value>
<value component="xatm" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xatm</value>
<value component="xatm" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xatm</value>
<value component="xatm" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xatm</value>
<value component="cam" >$SRCROOT/components/cam/</value>
<value component="ufsatm" >$SRCROOT/components/fv3/</value>
Expand Down Expand Up @@ -156,9 +156,9 @@
<value component="docn" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/docn</value>
<value component="docn" comp_interface="nuopc" >$SRCROOT/components/cdeps/docn</value>
<value component="socn" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/socn</value>
<value component="socn" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/socn</value>
<value component="socn" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/socn</value>
<value component="xocn" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xocn</value>
<value component="xocn" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xocn</value>
<value component="xocn" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xocn</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -175,9 +175,9 @@
<value component="dwav" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/dwav</value>
<value component="dwav" comp_interface="nuopc" >$SRCROOT/components/cdeps/dwav</value>
<value component="swav" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/swav</value>
<value component="swav" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/swav</value>
<value component="swav" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/swav</value>
<value component="xwav" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xwav</value>
<value component="xwav" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xwav</value>
<value component="xwav" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xwav</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -192,9 +192,9 @@
<value component="cism" >$SRCROOT/components/cism/</value>
<value component="dglc" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/dglc</value>
<value component="sglc" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/sglc</value>
<value component="sglc" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/sglc</value>
<value component="sglc" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/sglc</value>
<value component="xglc" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xglc</value>
<value component="xglc" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xglc</value>
<value component="xglc" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xglc</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -211,9 +211,9 @@
<value component="dice" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/dice</value>
<value component="dice" comp_interface="nuopc" >$SRCROOT/components/cdeps/dice</value>
<value component="sice" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/sice</value>
<value component="sice" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/sice</value>
<value component="sice" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/sice</value>
<value component="xice" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xice</value>
<value component="xice" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xice</value>
<value component="xice" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xice</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -231,9 +231,9 @@
<value component="drof" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/drof</value>
<value component="drof" comp_interface="nuopc" >$SRCROOT/components/cdeps/drof</value>
<value component="srof" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/srof</value>
<value component="srof" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/srof</value>
<value component="srof" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/srof</value>
<value component="xrof" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xrof</value>
<value component="xrof" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xrof</value>
<value component="xrof" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xrof</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -249,9 +249,9 @@
<value component="dlnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/dlnd</value>
<value component="dlnd" comp_interface="nuopc" >$SRCROOT/components/cdeps/dlnd</value>
<value component="slnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/slnd</value>
<value component="slnd" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/slnd</value>
<value component="slnd" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/slnd</value>
<value component="xlnd" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xlnd</value>
<value component="xlnd" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xlnd</value>
<value component="xlnd" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xlnd</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -264,9 +264,9 @@
<default_value>unset</default_value>
<values>
<value component="siac" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/siac</value>
<value component="siac" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/siac</value>
<value component="siac" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/siac</value>
<value component="xiac" comp_interface="mct" >$SRCROOT/components/cpl7/components/xcpl_comps_$COMP_INTERFACE/xiac</value>
<value component="xiac" comp_interface="nuopc" >$CIMEROOT/src/components/xcpl_comps_$COMP_INTERFACE/xiac</value>
<value component="xiac" comp_interface="nuopc" >$CIMEROOT/CIME/components/xcpl_comps_$COMP_INTERFACE/xiac</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand All @@ -279,9 +279,9 @@
<default_value>unset</default_value>
<values>
<value component="desp" comp_interface="mct" >$SRCROOT/components/cpl7/components/data_comps_$COMP_INTERFACE/desp</value>
<value component="desp" comp_interface="nuopc" >$CIMEROOT/src/components/data_comps_$COMP_INTERFACE/desp</value>
<value component="desp" comp_interface="nuopc" >$CIMEROOT/CIME/components/data_comps_$COMP_INTERFACE/desp</value>
<value component="sesp" comp_interface="mct" >$SRCROOT/components/cpl7/components/stub_comps_$COMP_INTERFACE/sesp</value>
<value component="sesp" comp_interface="nuopc" >$CIMEROOT/src/components/stub_comps_$COMP_INTERFACE/sesp</value>
<value component="sesp" comp_interface="nuopc" >$CIMEROOT/CIME/components/stub_comps_$COMP_INTERFACE/sesp</value>
</values>
<group>case_comps</group>
<file>env_case.xml</file>
Expand Down Expand Up @@ -644,13 +644,13 @@
<value lib="FMS">$SRCROOT/libraries/FMS/buildlib</value>
<value lib="CDEPS">$SRCROOT/components/cdeps/cime_config/buildlib</value>
<value lib="CMEPS">$SRCROOT/components/cmeps/cime_config/buildlib</value>
<value lib="gptl">$CIMEROOT/src/build_scripts/buildlib.gptl</value>
<value lib="pio">$CIMEROOT/src/build_scripts/buildlib.pio</value>
<value lib="mct">$CIMEROOT/src/build_scripts/buildlib.mct</value>
<value lib="gptl">$CIMEROOT/CIME/build_scripts/buildlib.gptl</value>
<value lib="pio">$CIMEROOT/CIME/build_scripts/buildlib.pio</value>
<value lib="mct">$CIMEROOT/CIME/build_scripts/buildlib.mct</value>
<value lib="csm_share">$SRCROOT/share/buildlib.csm_share</value>
<value lib="csm_share_cpl7">$SRCROOT/components/cpl7/buildlib.csm_share_cpl7</value>
<value lib="mpi-serial">$CIMEROOT/src/build_scripts/buildlib.mpi-serial</value>
<value lib="cprnc">$CIMEROOT/src/build_scripts/buildlib.cprnc</value>
<value lib="mpi-serial">$CIMEROOT/CIME/build_scripts/buildlib.mpi-serial</value>
<value lib="cprnc">$CIMEROOT/CIME/build_scripts/buildlib.cprnc</value>
</values>
<group>case_last</group>
<file>env_case.xml</file>
Expand Down
10 changes: 5 additions & 5 deletions CIME/config/e3sm/config_files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,13 @@
<entry id="BUILD_LIB_FILE">
<type>char</type>
<values>
<value lib="kokkos">$CIMEROOT/src/build_scripts/buildlib.kokkos</value>
<value lib="kokkos">$CIMEROOT/CIME/build_scripts/buildlib.kokkos</value>
<value lib="gptl">$SRCROOT/share/build/buildlib.gptl</value>
<value lib="pio">$CIMEROOT/src/build_scripts/buildlib.pio</value>
<value lib="mct">$CIMEROOT/src/build_scripts/buildlib.mct</value>
<value lib="pio">$CIMEROOT/CIME/build_scripts/buildlib.pio</value>
<value lib="mct">$CIMEROOT/CIME/build_scripts/buildlib.mct</value>
<value lib="csm_share">$SRCROOT/share/build/buildlib.csm_share</value>
<value lib="mpi-serial">$CIMEROOT/src/build_scripts/buildlib.mpi-serial</value>
<value lib="cprnc">$CIMEROOT/src/build_scripts/buildlib.cprnc</value>
<value lib="mpi-serial">$CIMEROOT/CIME/build_scripts/buildlib.mpi-serial</value>
<value lib="cprnc">$CIMEROOT/CIME/build_scripts/buildlib.cprnc</value>
</values>
<group>case_last</group>
<file>env_case.xml</file>
Expand Down
Loading

0 comments on commit dfc095e

Please sign in to comment.