Skip to content

Commit

Permalink
Merge pull request #28 from TeaganKing/example_run
Browse files Browse the repository at this point in the history
Update quickstart instructions
  • Loading branch information
mnlevy1981 authored Dec 7, 2023
2 parents 11b7675 + e95ed23 commit 23579cd
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ CUPiD is a collaborative effort that unifies all CESM component diagnostics and
To install CUPiD, you need to check out the code and then set up a few environments.
The initial examples have hard-coded paths that require you to be on `casper`.

The code relies on submodules to install `manage_externals` and then uses `manage_externals` for one more package,
so the `git clone` process is a little more complicated than usual:
The code relies on submodules to install `manage_externals` and then uses `manage_externals` for one more package, so the `git clone` process is a little more complicated than usual:

```
$ git clone --recurse-submodules https://github.com/NCAR/CUPiD.git
Expand All @@ -31,25 +30,33 @@ Then build the necessary conda environments with

```
$ conda env create -f nbscuid/dev-environment.yml
$ which nbscuid-run
$ conda env create -f mom6-environment.yml
```

Note that `conda` now defaults to using `mamba` to solve environments;
the `mom6-environment.yml` environment is complicated,
so older versions of `conda` should be updated (`conda update -n base conda`) or you should use `mamba` instead.
Notes:

1. `conda` now defaults to using `mamba` to solve environments; the `mom6-environment.yml` environment is complicated, so older versions of `conda` should be updated (`conda update -n base conda`) or you should use `mamba` instead.

2. IF `which nbscuid-run` returned the error `which: no nbscuid-run in ($PATH)`, then please run the following:

```
$ conda activate nbscuid-dev
$ pip install -e . # installs nbscuid
```

## Running

CUPiD currently provides two examples for generating diagnostics.
To test the package out, try to run `examples/adf-mom6`:

```
$ cd examples/adf-mom6
$ conda activate nbscuid-dev
$ cd examples/adf-mom6
$ nbscuid-run config.yml
$ nbscuid-build config.yml # Will build HTML from Jupyter Book
```

After the last step is finished, you can use Jupyter to view generated notebooks in `${CUPID_ROOT}/examples/adf-mom6/computed_notebooks/adf-quick-run`
or you can copy the entire `${CUPID_ROOT}/examples/adf-mom6/computed_notebooks/adf-quick-run/_build/html`
directory to your local machine and look at `index.html` in a web browser.
directory to your local machine and look at `index.html` in a web browser.

0 comments on commit 23579cd

Please sign in to comment.