Skip to content

Commit

Permalink
Merge pull request #32 from mnlevy1981/reorg_externals
Browse files Browse the repository at this point in the history
Reorganize externals
  • Loading branch information
mnlevy1981 authored Dec 12, 2023
2 parents 23579cd + 091bae0 commit c3ac19d
Show file tree
Hide file tree
Showing 13 changed files with 2,701 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ nbscuid.egg-info

# Text editor temp files
**/*.swp

externals/
14 changes: 10 additions & 4 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
[nbscuid_adf_examples]
local_path = examples/externals/
[ADF]
local_path = externals/ADF
branch = main
protocol = git
repo_url = https://github.com/rmshkv/nbscuid-adf-sandbox.git
sparse = ../.nblibrary_sparse_checkout
repo_url = https://github.com/NCAR/ADF.git
required = True

[mom6-tools]
local_path = externals/mom6-tools
branch = main
protocol = git
repo_url = https://github.com/NCAR/mom6-tools.git
required = True

[externals_description]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ 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 a few packages that are still being developed,
so the `git clone` process is a little more complicated than usual:

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

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

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:
1. If `./manage_externals/checkout_externals` is not found, run `git submodule update --init` to clone the submodule.
1. If `which nbscuid-run` returned the error `which: no nbscuid-run in ($PATH)`, then please run the following:

```
$ conda activate nbscuid-dev
Expand Down
1 change: 0 additions & 1 deletion examples/.nblibrary_sparse_checkout

This file was deleted.

4 changes: 2 additions & 2 deletions examples/adf-mom6/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data_sources:
### look for your template notebooks in. It doesn't have to
### be inside run_dir, or be specific to this project, as
### long as the notebooks are there
nb_path_root: ../externals/nblibrary
nb_path_root: ../nblibrary

######################
# Computation Config #
Expand Down Expand Up @@ -64,7 +64,7 @@ compute_notebooks:
parameter_groups:
none:
sname: *sname
adf_path: ./ADF
adf_path: ../../externals/ADF
config_path: .
config_fil_str: "config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml"

Expand Down
6 changes: 3 additions & 3 deletions examples/adf-only/config-adf-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data_sources:
### look for your template notebooks in. It doesn't have to
### be inside run_dir, or be specific to this project, as
### long as the notebooks are there
nb_path_root: ../externals/nblibrary
nb_path_root: ../nblibrary

######################
# Computation Config #
Expand Down Expand Up @@ -64,9 +64,9 @@ compute_notebooks:
parameter_groups:
none:
sname: *sname
adf_path: ./ADF
adf_path: ../../externals/ADF
config_path: .
config_fil_str: "config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae_numcin3.001_vs_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml"
config_fil_str: "config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml"



Expand Down
1 change: 1 addition & 0 deletions examples/nblibrary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PNG
Loading

0 comments on commit c3ac19d

Please sign in to comment.