Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda-env/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
# ====================
- python >=3.11,<3.14
- setuptools
- cmor >=3.7.0
- cmor >=3.9.0
- dask
- nco >=5.1.4
- netcdf4
Expand Down
2 changes: 1 addition & 1 deletion conda-env/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
# ====================
- python >=3.11,<3.14
- setuptools
- cmor >=3.7.0
- cmor >=3.9.0
- dask
- nco >=5.1.4
- netcdf4
Expand Down
11 changes: 11 additions & 0 deletions e3sm_to_cmip/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ def setup_argparser() -> argparse.ArgumentParser:
default="mon",
)

optional_run.add_argument(
"-M",
"--mip_era",
type=str,
help=(
"The cmip_era (default is 'cmip6'). Accepted "
"values are 'cmip6', 'cmip6plus', 'cmip7'."
),
default="cmip6",
)

# ======================================================================
# Paths references.
# ======================================================================
Expand Down
7 changes: 6 additions & 1 deletion e3sm_to_cmip/cmor_handlers/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def cmorize(
# ----------------------------------------------------------------------
self._setup_cmor_module(self.name, tables_path, metadata_path, cmor_log_dir)

print(metadata_path)

Comment on lines +221 to +222

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove debug print statement before merging.

# Get parameters for running CMOR operations
# ----------------------------------------------------------------------
# Check if the output CMIP variable has a time dimension, which determines
Expand Down Expand Up @@ -339,7 +341,10 @@ def _get_var_time_dim(self, table_path: str) -> str | None:
with open(table_path, "r") as inputstream:
table_info = json.load(inputstream)

axis_info = table_info["variable_entry"][self.name]["dimensions"].split(" ")
try:
axis_info = table_info["variable_entry"][self.name]["dimensions"].split(" ")
except AttributeError:
axis_info = table_info["variable_entry"][self.name]["dimensions"][:]

for dim in TIME_DIMS:
if dim in axis_info:
Expand Down
Loading
Loading