Skip to content

Commit 9188019

Browse files
committed
SUBSETDATAPOINT now makes it to RUN but crashes there.
"No module named 'numpy'"---is it trying to run subset_data again?
1 parent 221502a commit 9188019

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
7575

7676
[submodule "cime"]
7777
path = cime
78-
url = https://github.com/ESMCI/cime
79-
fxtag = cime6.1.102
78+
url = git@github.com:samsrabin/cime_myfork.git
79+
fxtag = dfac7c17e98576a543c1507c0d9daccfaa1038ae
8080
fxrequired = ToplevelRequired
8181
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
8282
fxDONOTUSEurl = https://github.com/ESMCI/cime

cime

cime_config/SystemTests/subsetdatapoint.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
import os
77
import sys
88
import logging
9-
import subprocess
109
from CIME.SystemTests.system_tests_common import SystemTestsCommon
1110
from CIME.XML.standard_module_setup import *
1211

1312
_CTSM_PYTHON = os.path.join(
1413
os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir, "python"
1514
)
1615
sys.path.insert(1, _CTSM_PYTHON)
17-
from ctsm.subset_data import (
16+
from ctsm.subset_data import ( # pylint: disable=wrong-import-position
1817
main as subset_data,
19-
) # pylint: disable=wrong-import-position
18+
)
2019

2120
logger = logging.getLogger(__name__)
2221

@@ -65,23 +64,5 @@ def build_phase(self, sharedlib_only=False, model_only=False):
6564
]
6665
subset_data()
6766

68-
# Append files in usermods_dir to equivalents in top level of case
69-
for file in os.listdir(usermods_dir):
70-
# Get the full path to source and destination files
71-
source_file_path = os.path.join(usermods_dir, file)
72-
dest_file_path = os.path.join(self._get_caseroot(), file)
73-
74-
# Read the content of the source file
75-
with open(source_file_path, "r", encoding="utf-8") as source_file:
76-
content_to_append = source_file.read()
77-
78-
# Append the content to the destination file
79-
with open(dest_file_path, "a", encoding="utf-8") as dest_file:
80-
dest_file.write("\n\n\n" + content_to_append)
81-
82-
# Run the generated shell_commands
83-
if file == "shell_commands":
84-
cmd = f"chmod +x {source_file_path}; {source_file_path}"
85-
subprocess.check_call(cmd, shell=True)
86-
67+
self._case.apply_user_mods([usermods_dir])
8768
super().build_phase(sharedlib_only, model_only)

0 commit comments

Comments
 (0)