diff --git a/components/eam/cime_config/buildnml b/components/eam/cime_config/buildnml index a86cd0fc17d9..beea61fd215f 100755 --- a/components/eam/cime_config/buildnml +++ b/components/eam/cime_config/buildnml @@ -233,29 +233,6 @@ def buildnml(case, caseroot, compname): safe_copy(os.path.join(eamconf_dir, "atm_in"), os.path.join(rundir, "atm_in{}".format(inst_string))) safe_copy(os.path.join(eamconf_dir, "drv_flds_in"), os.path.join(rundir, "drv_flds_in")) - # ----------------------------------------------------- - # copy scream input data - # ----------------------------------------------------- - - with SharedArea(): - scream_data_dir = os.path.join(case.get_value("SRCROOT"), "components/eamxx/data") - for item in os.listdir(scream_data_dir): - tgt_dir = os.path.join(din_loc_root, "atm/cam/physprops") - tgt_path = os.path.join(tgt_dir, item) - if not os.path.isdir(tgt_dir): - try: - os.makedirs(tgt_dir) - except OSError: - pass # lost the race - - try: - fd = os.open(tgt_path, os.O_CREAT | os.O_EXCL) - # If we get to this line, we won the race - os.close(fd) - safe_copy(os.path.join(scream_data_dir, item), tgt_path) - except OSError: - pass # lost the race - ############################################################################### def _main_func(): ############################################################################### diff --git a/components/eamxx/CMakeLists.txt b/components/eamxx/CMakeLists.txt index 693b8ae8a094..1119a3f031f7 100644 --- a/components/eamxx/CMakeLists.txt +++ b/components/eamxx/CMakeLists.txt @@ -584,9 +584,6 @@ if (NOT DEFINED ENV{SCREAM_FAKE_ONLY}) ${CMAKE_CURRENT_BINARY_DIR}/src/scream_config.h F90_FILE ${CMAKE_CURRENT_BINARY_DIR}/src/scream_config.f) - # Build any tools in the scripts/ dir. - add_subdirectory(scripts) - # Generate scream_config.h and scream_config.f include (EkatUtils) EkatConfigFile(${CMAKE_CURRENT_SOURCE_DIR}/src/scream_config.h.in diff --git a/components/eamxx/scripts/README.md b/components/eamxx/scripts/README.md index 0bcb8d79e6a1..bcff04a11cd2 100644 --- a/components/eamxx/scripts/README.md +++ b/components/eamxx/scripts/README.md @@ -80,10 +80,10 @@ This tool is not used in our core testing tools and goes through long periods of (IE there are no active ongoing porting efforts). It is likely this tool will not work exactly as expected if it has not been run in a while or is being used on a package on which it has not been used before. -## cf-xml-to-yaml +## query-cf-database/cf-xml-to-yaml Given an XML file containing the CF conventions for standardized field names -(https://cfconventions.org/standard-names.html), this tool generates a YAML +(which can be found [here](https://cfconventions.org/standard-names.html)), this tool generates a YAML file with the same information. This tool is not used in our core testing tools, but it is extremely simple and not coupled to anything else in the repo, diff --git a/components/eamxx/scripts/CMakeLists.txt b/components/eamxx/scripts/query-cf-database/CMakeLists.txt similarity index 67% rename from components/eamxx/scripts/CMakeLists.txt rename to components/eamxx/scripts/query-cf-database/CMakeLists.txt index 377452229b9d..912007606024 100644 --- a/components/eamxx/scripts/CMakeLists.txt +++ b/components/eamxx/scripts/query-cf-database/CMakeLists.txt @@ -1,8 +1,8 @@ -# Generate the source file for the CF validator and build it. +# Build the CF validator tool -set (CF_STANDARD_NAME_FILE "${PROJECT_SOURCE_DIR}/data/cf-standard-name-table.yaml" +set (CF_STANDARD_NAME_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cf-standard-name-table.yaml" CACHE STRING "Location of the cf standard name yaml table") -set (CF_SCREAM_NAME_FILE "${PROJECT_SOURCE_DIR}/data/cf-scream-name-table.yaml" +set (CF_SCREAM_NAME_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cf-scream-name-table.yaml" CACHE STRING "Location of the scream-specific cf name yaml table") add_executable(query-cf-database query-cf-database.cpp) @@ -10,5 +10,6 @@ target_compile_definitions(query-cf-database PUBLIC CF_STANDARD_NAME_FILE=${CF_STANDARD_NAME_FILE} CF_SCREAM_NAME_FILE=${CF_SCREAM_NAME_FILE}) +find_package (ekat HINTS ${EKAT_ROOT}) find_package (yaml-cpp HINTS ${YAML_CPP_ROOT}) target_link_libraries(query-cf-database ekat yaml-cpp) diff --git a/components/eamxx/data/cf-scream-name-table.yaml b/components/eamxx/scripts/query-cf-database/cf-scream-name-table.yaml similarity index 100% rename from components/eamxx/data/cf-scream-name-table.yaml rename to components/eamxx/scripts/query-cf-database/cf-scream-name-table.yaml diff --git a/components/eamxx/data/cf-standard-name-table.yaml b/components/eamxx/scripts/query-cf-database/cf-standard-name-table.yaml similarity index 100% rename from components/eamxx/data/cf-standard-name-table.yaml rename to components/eamxx/scripts/query-cf-database/cf-standard-name-table.yaml diff --git a/components/eamxx/scripts/cf-xml-to-yaml b/components/eamxx/scripts/query-cf-database/cf-xml-to-yaml similarity index 100% rename from components/eamxx/scripts/cf-xml-to-yaml rename to components/eamxx/scripts/query-cf-database/cf-xml-to-yaml diff --git a/components/eamxx/scripts/query-cf-database.cpp b/components/eamxx/scripts/query-cf-database/query-cf-database.cpp similarity index 100% rename from components/eamxx/scripts/query-cf-database.cpp rename to components/eamxx/scripts/query-cf-database/query-cf-database.cpp