Skip to content

Commit

Permalink
Merge pull request #55 from mnlevy1981/pass_paths_via_config
Browse files Browse the repository at this point in the history
Pass paths via config
  • Loading branch information
mnlevy1981 authored Jan 24, 2024
2 parents 1a516b7 + 59f07cb commit a64ac97
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 313 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ After the last step is finished, you can use Jupyter to view generated notebooks
or you can copy the entire `${CUPID_ROOT}/examples/coupled-model/computed_notebooks/quick-run/_build/html`
directory to your local machine and look at `index.html` in a web browser.

For users running on the NCAR super computers (derecho or casper), you can visualize the web page in a browser with the following steps:
1. open a new browser window that points to https://fastx.ucar.edu:3300/session/
1. open a default desktop icon
1. select the browser client
1. type `xterm` and hit enter to open a terminal
1. In the terminal, run `cd ${CUPID_ROOT}/examples/coupled_model/computed_notebooks/quick-run/_build/html` to enter the `html` directory
1. From the updated directory, run `firefox index.html &` to open a web browser pointed at the generated web page
### Looking at Output

For users running on the NCAR super computers (derecho or casper), you can visualize the web page in a browser using the FastX service. FastX requires you to be on the internal NCAR network (either on-site or via the VPN, and can be accessed via the following steps:

1. Open a new browser window that points to https://fastx.ucar.edu:3300/session/
1. Open a default desktop icon.
1. Select the browser client.
1. Type `xterm` and hit enter to open a terminal.
1. In the terminal, run `cd ${CUPID_ROOT}/examples/coupled_model/computed_notebooks/quick-run/_build/html` to enter the `html` directory.
1. From the updated directory, run `firefox index.html &` to open a web browser pointed at the generated web page.
2 changes: 1 addition & 1 deletion cupid/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run():
#####################################################################
# Ploomber - making a DAG

dag = ploomber.DAG(executor=ploomber.executors.Parallel())
dag = ploomber.DAG(executor=ploomber.executors.Serial())


#####################################################################
Expand Down
118 changes: 0 additions & 118 deletions examples/adf-only/config-adf-only.yml

This file was deleted.

35 changes: 23 additions & 12 deletions examples/coupled_model/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
data_sources:
# sname is any string used as a nickname for this configuration. It will be
### used as the name of the folder your computed notebooks are put in
sname: &sname
quick-run
sname: quick-run

# run_dir is the path to the folder you want
### all the files associated with this configuration
Expand Down Expand Up @@ -45,7 +44,7 @@ computation_config:
# All parameters under global_params get passed to all the notebooks

global_params:
test_global_param: hello
CESM_output_dir: /glade/campaign/cesm/development/cross-wg/diagnostic_framework/CESM_output_for_testing

compute_notebooks:

Expand All @@ -57,27 +56,39 @@ compute_notebooks:
### notebook from nb_path_root, minus the .ipynb
index:
parameter_groups:
none:
sname: *sname
none: {}

adf_quick_run:
parameter_groups:
none:
sname: *sname
adf_path: ../../externals/ADF
config_path: .
config_fil_str: "config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml"

surface:
ocean_surface:
parameter_groups:
none:
sname: *sname
Case: b.e23_alpha16b.BLT1850.ne30_t232.054
savefigs: False
mom6_tools_config:
start_date: '0091-01-01'
end_date: '0101-01-01'
Fnames:
native: 'mom6.h.native.????-??.nc'
static: 'mom6.h.static.nc'
oce_cat: /glade/u/home/gmarques/libs/oce-catalogs/reference-datasets.yml



land_comparision:
land_comparison:
parameter_groups:
none:
sname: *sname
cases:
- ctsm51d159_f45_GSWP3_bgccrop_1850pAD
- ctsm51d159_f45_GSWP3_bgccrop_1850pSASU
type:
- 1850pAD
- 1850pSASU


########### JUPYTER BOOK CONFIG ###########
Expand Down Expand Up @@ -109,11 +120,11 @@ book_toc:

- caption: Ocean
chapters:
- file: surface
- file: ocean_surface

- caption: Land
chapters:
- file: land_comparision
- file: land_comparison

#####################################
# Keys for Jupyter Book _config.yml #
Expand Down
1 change: 0 additions & 1 deletion examples/nblibrary/adf_quick_run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@
"import matplotlib.pyplot as plt\n",
"import xarray as xr\n",
"import numpy as np\n",
"import matplotlib.ticker as ticker\n",
"from matplotlib.ticker import MultipleLocator\n",
"from matplotlib.lines import Line2D\n",
"\n",
Expand Down
50 changes: 0 additions & 50 deletions examples/nblibrary/diag_config.yml

This file was deleted.

Loading

0 comments on commit a64ac97

Please sign in to comment.