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

Adding a few rof notebooks #126

Merged
merged 91 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
c4e8a29
added rof notebook config example
nmizukami Aug 22, 2024
9402085
added rof notebooks with ancillary data and scripts
nmizukami Aug 22, 2024
aa80717
reformatting with pre-commit
nmizukami Aug 23, 2024
c784061
change one of key names in setup and notebook changes associated with…
nmizukami Aug 23, 2024
a652359
Update config.yml to include rof in timeseries and book_toc
TeaganKing Aug 23, 2024
f9505d0
Update run.py to include rof
TeaganKing Aug 23, 2024
9acbf78
updates for pre-commit
TeaganKing Aug 23, 2024
b45413a
replace math sqrt with numpy sqrt
nmizukami Aug 23, 2024
c5a52ae
forgot uncommenting other component configs
nmizukami Aug 23, 2024
bda0fa8
adding new script to compute various flow metrics
nmizukami Sep 12, 2024
1f7c8aa
remove unused packages, rename setup variables
nmizukami Sep 14, 2024
5cc7d25
added one new rof notebook
nmizukami Sep 14, 2024
3beca30
update readme and config for clarification purposes
TeaganKing Sep 19, 2024
1be9016
fix a few other failed checks from pre-commit
TeaganKing Sep 19, 2024
ccb0a3a
added myCount function in metrics.py. it was missing
nmizukami Sep 19, 2024
94a8703
fixed all checks
TeaganKing Sep 19, 2024
8c56237
removed commented out scripts
nmizukami Sep 19, 2024
873ef25
added comments for each def with docstrings
nmizukami Sep 19, 2024
b9d678b
fix river_runoff underscore
TeaganKing Sep 20, 2024
76786b6
code style
TeaganKing Sep 20, 2024
c82fa7a
initial logging for print statements that we added
TeaganKing Aug 29, 2024
bc271a5
pre commits
TeaganKing Aug 29, 2024
6a27053
formatting
TeaganKing Aug 29, 2024
81a3138
remove filename
TeaganKing Sep 4, 2024
7715481
include log level in config file and move to utils
TeaganKing Sep 17, 2024
f3b2568
pass logger argument in timeseries and update warnings.warn to logger…
TeaganKing Sep 18, 2024
ed358c7
precommit updates
TeaganKing Sep 18, 2024
4897f52
change default logging level to info since that's probably better whi…
TeaganKing Sep 19, 2024
d77893e
initial implementation of config file documentation
TeaganKing Sep 4, 2024
fed977a
adjust spacing
TeaganKing Sep 4, 2024
3a84ab9
loop through files including config.md in conf.py
TeaganKing Sep 4, 2024
729158c
Some clean-up for key_metrics
mnlevy1981 Aug 13, 2024
55e91b9
Clean up glacier notebook
mnlevy1981 Aug 13, 2024
f7e8163
Case 104 has 21 more years of data
mnlevy1981 Aug 26, 2024
df1f3ed
Use hide-input and hide-cell tags
mnlevy1981 Aug 28, 2024
6c6aa24
key_metrics generates time-series for both cases
mnlevy1981 Aug 28, 2024
fd6b825
Update time axis for glacier plot
mnlevy1981 Aug 28, 2024
2105f42
Create contributors.md
TeaganKing Aug 21, 2024
b1c1ad6
Add github handles to contributors.md
TeaganKing Aug 22, 2024
56193ea
Add hyperlinks to contributors.md
TeaganKing Aug 22, 2024
0016b30
add one more github handle...
TeaganKing Aug 22, 2024
41f573a
updates to include on github.io page and Lev's affiliation
TeaganKing Sep 4, 2024
5541644
Update Anna's affiliation
TeaganKing Sep 5, 2024
e16d41b
Include clearer instructions on adding a name to contributors.md
TeaganKing Sep 5, 2024
d3c9457
remove config from loop in conf.py since config.md is in docs dir
TeaganKing Sep 5, 2024
95a4f39
images now rendering correctly
TeaganKing Sep 5, 2024
9fe61bc
update to use key metrics images
TeaganKing Sep 5, 2024
e4d2361
include docs in gitignore
TeaganKing Sep 5, 2024
247e27e
fix for configuration file documentation images
TeaganKing Sep 10, 2024
f22db44
move images to docs/_static/images/config
TeaganKing Sep 10, 2024
8f7ee25
updates from review
TeaganKing Sep 19, 2024
79ec065
include else statement in case of log level with typo
TeaganKing Sep 19, 2024
0d3a985
add quotes around log level in config!
TeaganKing Sep 19, 2024
89928eb
add quotes in coupled_model config
TeaganKing Sep 19, 2024
b522140
Remove manage externals
mnlevy1981 Sep 16, 2024
1b6ad7a
Add ADF and mom6-tools as submodules
mnlevy1981 Sep 16, 2024
09ab2e3
Update documentation to remove manage_externals
mnlevy1981 Sep 16, 2024
76945a2
Don't name specific directories in externals/
mnlevy1981 Sep 17, 2024
41bd7e3
add var element in rof timeseries
nmizukami Sep 20, 2024
d382750
Merge branch 'NCAR:main' into main_adding_rof
nmizukami Sep 20, 2024
2f51d2d
added ocean_discharge notebook in chapter. added a comment on case in…
nmizukami Oct 1, 2024
de81559
Merge remote-tracking branch 'nmizukami/main_adding_rof' into main_ad…
nmizukami Oct 1, 2024
2ac3101
remove case_dir input b/c it is not used
nmizukami Oct 1, 2024
2bd5c36
Cleanup based on review comments e.g., remove empty cells, etcs
nmizukami Oct 1, 2024
35df64d
change dask setupt
nmizukami Oct 11, 2024
04f9c53
rof updates
nmizukami Oct 11, 2024
bb894a3
rof sepcific setup update
nmizukami Oct 11, 2024
b57be4f
automated reformat
nmizukami Oct 11, 2024
1aa1654
just temporal comment out
nmizukami Oct 11, 2024
7ca263a
auto-formatting
nmizukami Oct 11, 2024
eb22c6b
uncomment ocean_discharge notebook config
nmizukami Oct 13, 2024
26fed7c
key values updates and remove some items
nmizukami Oct 13, 2024
413239a
automated format fix on ocean-discharge notebook
nmizukami Oct 13, 2024
d4efeeb
rof specific setup changes
nmizukami Oct 18, 2024
1e26410
a few rof parameters added in config.yml
nmizukami Oct 18, 2024
4b2a3b2
auto reformatting
nmizukami Oct 18, 2024
e9174f1
auto formatting
nmizukami Oct 19, 2024
03b99c4
use empty string for analysis_name in config.yml
nmizukami Oct 27, 2024
aacc2cc
remove rof config
nmizukami Oct 29, 2024
7d2b228
notebook renamed
nmizukami Oct 29, 2024
6303c6d
auto formatting
nmizukami Oct 29, 2024
703e9fe
changes according to notebook name changes
nmizukami Oct 29, 2024
380982e
Update config.yml in coupled model to remove rof notebooks that are n…
TeaganKing Oct 31, 2024
55378e3
auto formatting
nmizukami Nov 14, 2024
f436dd2
auto formatting for setup.yaml
nmizukami Nov 14, 2024
4aabd48
auto formatting for notebook
nmizukami Nov 14, 2024
a734b3f
fixed typoes
nmizukami Nov 14, 2024
7189c0e
remove corr function
nmizukami Nov 14, 2024
e333c6f
setup paths change from personal to common places
nmizukami Nov 21, 2024
0cebbaa
get observed flow data even if analysis_period is outside obs period
nmizukami Nov 21, 2024
ff5d58d
auto formatting
nmizukami Nov 21, 2024
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 @@ -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]
TeaganKing marked this conversation as resolved.
Show resolved Hide resolved
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
Loading