diff --git a/src/preprocessor.py b/src/preprocessor.py index c3f0f65d8..705f698ea 100644 --- a/src/preprocessor.py +++ b/src/preprocessor.py @@ -896,7 +896,7 @@ def execute_pp_functions(self, v: varlist_util.VarlistEntry, xarray_ds = func.execute(func, v, xarray_ds, **kwargs) # append custom preprocessing scripts - if any([s for s in self.user_pp_scripts]): + if self.user_pp_scripts and len(self.user_pp_scripts) > 0: for s in self.user_pp_scripts: script_name, script_ext = os.path.splitext(s) full_module_name = "user_scripts." + script_name @@ -1262,6 +1262,7 @@ class DaskMultiFilePreprocessor(MDTFPreprocessorBase): `__. """ module_root: str = "" + user_pp_scripts: list def __init__(self, model_paths: util.ModelDataPathManager, @@ -1272,6 +1273,8 @@ def __init__(self, if any([s for s in config.user_pp_scripts]): self.add_user_pp_scripts(config) self.module_root = os.path.join(config.CODE_ROOT, "user_scripts") + else: + self.user_pp_scripts = None def add_user_pp_scripts(self, runtime_config: util.NameSpace): self.user_pp_scripts = [s for s in runtime_config.user_pp_scripts] diff --git a/src/util/path_utils.py b/src/util/path_utils.py index 757bd8998..d695c42de 100644 --- a/src/util/path_utils.py +++ b/src/util/path_utils.py @@ -124,11 +124,11 @@ def __init__(self, config: NameSpace, if hasattr(config, "MODEL_DATA_ROOT"): self.MODEL_DATA_ROOT = self._init_path('MODEL_DATA_ROOT', config, env=env) - self.MODEL_DATA_DIR = dict() - self.MODEL_OUTPUT_DIR = dict() - self.MODEL_WORK_DIR = dict() else: self.MODEL_DATA_ROOT = "" + self.MODEL_DATA_DIR = dict() + self.MODEL_OUTPUT_DIR = dict() + self.MODEL_WORK_DIR = dict() def setup_data_paths(self, case_list: NameSpace): # define directory paths for multirun mode diff --git a/templates/runtime_config.yml b/templates/runtime_config.yml index e5c6496cb..f8d55cb9c 100755 --- a/templates/runtime_config.yml +++ b/templates/runtime_config.yml @@ -5,21 +5,20 @@ # List of POD(s) to run pod_list: - "example_multicase" - - "MJO_suite" # Case list entries (must be unique IDs for each simulation) case_list: "CMIP_Synthetic_r1i1p1f1_gr1_19800101-19841231" : model: "test" convention: "CMIP" - startdate: "19800101:000000" - enddate: "19841231:000000" + startdate: "19800101120000" + enddate: "19841231000000" "CMIP_Synthetic_r1i1p1f1_gr1_19850101-19891231" : model: "test" convention: "CMIP" - startdate: "19850101:000000" - enddate: "19891231:000000" + startdate: "19850101000000" + enddate: "19891231000000" ### Data location settings ### # Required: full or relative path to ESM-intake catalog header file @@ -31,17 +30,17 @@ OBS_DATA_ROOT: "../inputdata/obs_data" # Final output is also written here if the OUTPUT_DIR is not defined. WORK_DIR: "../wkdir" # Optional: Location to write final output if you don't want it in the wkdir -OUTPUT_DIR: "" +OUTPUT_DIR: "../wkdir" ### Environment Settings ### # Required: Location of the Anaconda/miniconda installation to use for managing # dependencies (path returned by running `conda info --base`.) -conda_root": "" +conda_root: "/Users/jess/micromamba" # Optional: Directory containing the framework-specific conda environments. This should # be equal to the "--env_dir" flag passed to conda_env_setup.sh. If left # blank, the framework will look for its environments in conda_root/envs -conda_env_root": "" +conda_env_root: "/Users/jess/micromamba/envs" # Location of micromamba executable; REQUIRED if using micromamba -micromamba_exe: "" +micromamba_exe: "/Users/jess/.local/bin/micromamba" ### Data type settings ### # set to true to handle data files > 4 GB large_file: False