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

Replace ESMF subprocess calls with new parallel implementation of xesmf (0.8.x) directly in Python #73

Merged
merged 43 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
413d543
still not working - failed installation of xesmf libraries and HDF er…
ashjbarnes Sep 11, 2023
9558679
Test functions written for experiment class along with big changes to…
ashjbarnes Sep 13, 2023
d58029a
black reformate
ashjbarnes Sep 13, 2023
05e36d2
try except to catch older versions of xesmf
ashjbarnes Sep 13, 2023
c3bab93
try except to catch older versions of xesmf
ashjbarnes Sep 13, 2023
684cde5
try except to catch older versions of xesmf
ashjbarnes Sep 13, 2023
db8363f
Some cleanup, and updated the demo notebooks to reflect changes
ashjbarnes Sep 13, 2023
f97bf41
Some cleanup, and updated the demo notebooks to reflect changes
ashjbarnes Sep 13, 2023
d218a3e
Updated readme
ashjbarnes Sep 13, 2023
bad58ad
black reformat
ashjbarnes Sep 13, 2023
1266197
delete code from testing
ashjbarnes Sep 14, 2023
5f63f9c
brf
ashjbarnes Sep 14, 2023
8fa6f60
adjust version requirements
ashjbarnes Sep 14, 2023
7469006
try with latest version of numpy to handle bottleneck error
ashjbarnes Sep 14, 2023
c80e0f3
revert back to basic requirements
ashjbarnes Sep 14, 2023
ce3f4a0
depend on xesmf only
ashjbarnes Sep 14, 2023
568b005
depend on xesmf only
ashjbarnes Sep 14, 2023
cf5ee97
remove kernel
ashjbarnes Sep 14, 2023
d9b997f
Merge branch 'main' into test-domain-generation
navidcy Sep 14, 2023
1ef57ec
add compat requirements for xesmf
navidcy Sep 14, 2023
6f084ac
Merge branch 'main' into test-domain-generation
navidcy Sep 14, 2023
db43748
attempt to fix docs; remove conda-env kernel
navidcy Sep 14, 2023
7996bd9
Update regional_mom6/regional_mom6.py
ashjbarnes Sep 15, 2023
472a73c
Update regional_mom6/regional_mom6.py
ashjbarnes Sep 15, 2023
8fd91b7
Update tests/test_expt_class.py
ashjbarnes Sep 15, 2023
25ec286
Update regional_mom6/regional_mom6.py
ashjbarnes Sep 15, 2023
20e9d8d
Update tests/test_expt_class.py
ashjbarnes Sep 15, 2023
54dcdbf
Update README.md
navidcy Sep 15, 2023
c9c3968
Update tests/test_expt_class.py
ashjbarnes Sep 15, 2023
7ce8b93
Update tests/test_expt_class.py
ashjbarnes Sep 15, 2023
417603e
Update regional_mom6/regional_mom6.py
navidcy Sep 15, 2023
aea8793
Apply suggestions from code review
navidcy Sep 15, 2023
4c9e8ea
evaluate notebooks so docs pass maybe
ashjbarnes Sep 20, 2023
1e86b7d
black reformat
ashjbarnes Sep 20, 2023
0ae6110
Move bottleneck dependency to pyproject.toml
angus-g Sep 27, 2023
884e24e
add comments about buffer regions
navidcy Sep 27, 2023
252cd66
correct comment
navidcy Sep 27, 2023
609e8a9
remove comment that didn't make sense
navidcy Sep 27, 2023
25b3543
format black
navidcy Sep 28, 2023
f09f566
some rephrase, replace NCI with HPC machine of your choice
navidcy Sep 28, 2023
ded4a89
trying it out
navidcy Sep 28, 2023
f842621
small bug +black format
navidcy Sep 28, 2023
a413b7c
Use tmp_path fixture in tests
angus-g Sep 28, 2023
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ If you find this package useful and have any suggestions please feel free to ope
3. A bathymetry file that at least covers your domain
4. 3D ocean forcing files *of any resolution* on your choice of A, B or C Arakawa grid
5. Surface forcing files (eg ERA or JRA reanalysis)
6. [GFDL's FRE tools](https://github.com/NOAA-GFDL/FRE-NCtools) must be downloaded and compiled on the machine you are using.

Check out the the [documentation](https://regional-mom6.readthedocs.io/en/latest/) and browse through the [demos](https://regional-mom6.readthedocs.io/en/latest/demos.html).

Expand Down Expand Up @@ -60,4 +61,9 @@ pip install git+https://github.com/COSIMA/regional-mom6.git@061b0ef80c7cbc04de05

## Getting started

The two example notebooks walk you through how to use the package on two different sets of input datasets. Make sure that you can get at least one of these working on your setup with your MOM6 executable, and then try to modify them to apply to your domain with your bathymethry / forcing / boundaries.
The two example notebooks walk you through how to use the package using two different sets of input datasets.
Make sure that you can get at least one of these working on your setup with your MOM6 executable, and then try to modify them to apply to your domain with your bathymethry, forcing, and boundary conditions.

The `xesmf` the package will attempt to regrid in parallel, and if it's not able it will throw a warning and run it in serial.
You will also get a print out of the relevant `mpirun` command which you could use as a backup.
Depending on your setup of your machine, you may need to write scripts that implement the package to access more computational resources than might be available, e.g., on the HPC machine of you are working on.
554 changes: 83 additions & 471 deletions demos/model-forced.ipynb

Large diffs are not rendered by default.

288 changes: 204 additions & 84 deletions demos/reanalysis-forced.ipynb

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ authors = [
]
dynamic = ["version"]
dependencies = [
"bottleneck",
"dask[array]",
"dask[distributed]",
"netCDF4",
"numpy>=1.17.0",
"scipy>=1.2.0",
"netCDF4",
"xarray",
"xesmf",
"xesmf>=0.8",
]

[build-system]
Expand Down
287 changes: 0 additions & 287 deletions regional_mom6/default_rundir/MOM_input

This file was deleted.

7 changes: 0 additions & 7 deletions regional_mom6/default_rundir/MOM_override

This file was deleted.

66 changes: 0 additions & 66 deletions regional_mom6/default_rundir/SIS_input

This file was deleted.

Loading