Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include rof in run.py #132

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Options:
-lnd, --land Run land component diagnostics
-ice, --seaice Run sea ice component diagnostics
-glc, --landice Run land ice component diagnostics
-rof, --river_runoff Run river runoff component diagnostics
--config_path Path to the YAML configuration file containing specifications for notebooks (default config.yml)
-h, --help Show this message and exit.
```
Expand Down
6 changes: 5 additions & 1 deletion cupid/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
-lnd, --land Run land component diagnostics
-ice, --seaice Run sea ice component diagnostics
-glc, --landice Run land ice component diagnostics
-rof, --river_runoff Run river runoff component diagnostics
-config_path Path to the YAML configuration file containing specifications for notebooks (default: config.yml)
-h, --help Show this message and exit.
"""
Expand Down Expand Up @@ -47,6 +48,7 @@
@click.option("--land", "-lnd", is_flag=True, help="Run land component diagnostics")
@click.option("--seaice", "-ice", is_flag=True, help="Run sea ice component diagnostics")
@click.option("--landice", "-glc", is_flag=True, help="Run land ice component diagnostics")
@click.option("--river_runoff", "-rof", is_flag=True, help="Run river runoff component diagnostics")
Copy link
Collaborator

Choose a reason for hiding this comment

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

For time-series generation, we use a - in the command line option rather than an _ (--time-series, not --time_series); to stick with at, I think we want --river-runoff here. Changing this means we'll also need to change the README file.

@click.argument("config_path", default="config.yml")
def run(
config_path,
Expand All @@ -58,6 +60,7 @@ def run(
land=False,
seaice=False,
landice=False,
river_runoff=False,
):
"""
Main engine to set up running all the notebooks.
Expand All @@ -81,11 +84,12 @@ def run(
"lnd": land,
"ice": seaice,
"glc": landice,
"rof": river_runoff,
}

# Automatically run all if no components specified

if True not in [atmosphere, ocean, land, seaice, landice]:
if True not in [atmosphere, ocean, land, seaice, landice, river_runoff]:
all = True
for key in component_options.keys():
component_options[key] = True
Expand Down
Loading