Skip to content

Commit

Permalink
Merge pull request #126 from nmizukami/main_adding_rof
Browse files Browse the repository at this point in the history
Adding a few rof notebooks
  • Loading branch information
mnlevy1981 authored Nov 21, 2024
2 parents 33e9705 + ff5d58d commit d3d7971
Show file tree
Hide file tree
Showing 11 changed files with 2,249 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,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 @@ -46,6 +47,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")
@click.argument("config_path", default="config.yml")
def run(
config_path,
Expand All @@ -57,6 +59,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
10 changes: 9 additions & 1 deletion examples/coupled_model/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,21 @@ timeseries:
end_years: [102]
level: 'lev'

rof:
vars: []
derive_vars: []
hist_str: 'initial_hist'
start_years: [2]
end_years: [102]
level: 'lev'

compute_notebooks:

# This is where all the notebooks you want run and their
# parameters are specified. Several examples of different
# types of notebooks are provided.

# The first key (here simple_no_params_nb) is the name of the
# The second key (here adf_quick_run) is the name of the
# notebook from nb_path_root, minus the .ipynb

infrastructure:
Expand Down
18 changes: 18 additions & 0 deletions examples/key_metrics/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ compute_notebooks:
obs_name: 'GrIS_MARv3.12_climo_1960_1999.nc'
climo_nyears: 40

rof:
global_discharge_gauge_compare_obs:
parameter_groups:
none:
analysis_name: ""
grid_name: 'f09_f09_mosart' # ROF grid name
rof_start_date: '0091-01-01'
rof_end_date: '0101-01-01'
figureSave: False
global_discharge_ocean_compare_obs:
parameter_groups:
none:
analysis_name: ""
grid_name: 'f09_f09_mosart' # ROF grid name
rof_start_date: '0091-01-01'
rof_end_date: '0101-01-01'
figureSave: False

# ice:
# seaice:
# parameter_groups:
Expand Down
Loading

0 comments on commit d3d7971

Please sign in to comment.