regional-mom6

regional-mom6: A Python package for automatic generation of regional configurations for the Modular Ocean Model 6 - Published in JOSS (2024)

https://github.com/cosima/regional-mom6

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

mom6 ocean-modelling python regional-model

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Automatic generation of regional configurations of the Modular Ocean Model 6 (MOM6) in Python

Basic Info
Statistics
  • Stars: 29
  • Watchers: 10
  • Forks: 18
  • Open Issues: 38
  • Releases: 12
Topics
mom6 ocean-modelling python regional-model
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

regional-mom6

Python package for automatic generation of regional configurations for the Modular Ocean Model version 6 (MOM6)

Repo status conda forge pypi Documentation Status

License codecov Code style: black

status

Users just need to provide some information about where, when, and how big their domain is and also where raw input forcing files are. The package sorts out all the boring details and creates a set of MOM6-friendly input files along with setup directories ready to go!

The idea behind this package is that it should let the user sidestep some of the tricky issues with getting the model to run in the first place. This removes some of the steep learning curve for people new to working with MOM6. Note that the resultant model configuration might still need some tweaking (e.g., fiddling with timestep to avoid CFL-related numerical stability issues or fiddling with bathymetry to deal with very narrow fjords or channels that may exist).

Features

  • Automatic grid generation at chosen vertical and horizontal grid spacing.
  • Automatic removal of non-advective cells from the bathymetry that cause the model to crash.
  • Handle slicing across 'seams' in of the forcing input datasets (e.g., when the regional configuration includes longitude 180 and the forcing longitude is defined in [-180, 180]).
  • Handles metadata encoding.
  • Creates directory structure with the configuration files as expected by MOM6.
  • Handles interpolation and interpretation of input data. No pre-processing of forcing datasets is required. (In some cases, slicing the forcing dataset before helps with hitting limitations related to the machine's available memory.)

Limitations

  • Only generates regional horizontal grids with uniform spacing in longitude and latitude. However, users can provide their own non-uniform grid, or ideally open a pull request with a method that generates other types of horizontal grids.
  • Only supports boundary segments that are parallel to either lines of constant longitude or lines of constant latitude.

We want to hear from you

If you have any suggestions please feel free to open an issue or start a discussion. We welcome any new contributors and we are very keen to help you out along the way!

What you need to get started:

  1. a cool idea for a new regional MOM6 domain,
  2. a working MOM6 executable on a machine of your choice,
  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 (e.g., from ERA or JRA reanalysis), and
  6. GFDL's FRE tools be downloaded and compiled on the machine you are using.

Check out the documentation and browse through the demos.

Installation

We encourage creating a new or using an existing conda environment.

Easy, clean, one liner via conda

The easiest way to install regional-mom6 is via conda.

bash conda install conda-forge::regional-mom6

That's it -- now enjoy!

"But I want pip, can't I install with pip?"

To install via pip is a bit more cumbersome.

A prerequisite is the binary esmpy dependency, which provides re-gridding capabilities. The easiest way to install esmpy is via conda:

bash conda install -c conda-forge esmpy

Alternatively, to install esmpy in a Conda-free way, follow the instructions for installing ESMPy from source. With esmpy available, we can then install regional-mom6 via pip. (If we don't have have pip, then conda install pip should do the job.)

With esmpy installed we can now install regional-mom6 via pip:

bash pip install regional-mom6

The above installs the version of regional-mom6 (plus any required dependencies) that corresponds to the latest tagged release of the package.

"I want to live on the edge! I want the latest developments"

To install regional-mom6 directly from the GitHub repository using pip, first install esmpy as described above. Then:

bash pip install git+https://github.com/COSIMA/regional-mom6.git

to get the version that corresponds to the latest commit in GitHub. Alternatively, install the version that corresponds to a particular git commit using, for example,

bash pip install git+https://github.com/COSIMA/regional-mom6.git@061b0ef80c7cbc04de0566df329c4ea472002f7e

MOM6 Configuration and Version Requirements

The package and demos assume a coupled MOM6-SIS2 configuration, but also work for MOM6 ocean-only configuration after appropriate changes in the input.nml and MOM_input files.

Additionally, regional configurations require that the MOM6 executable must be compiled with symmetric memory.

The current release of this package assumes the latest source code of all components needed to run MOM6 as of January 2024. A forked version of the setup-mom6-nci repository contains scripts for compiling MOM6 and, furthermore, its src directory lists the particular commits that were used to compile MOM6 and its submodules for this package.

Note that the commits used for MOM6 submodules (e.g., Flexible Modelling System (FMS), coupler, SIS2) are not necessarily those used by the GFDL's MOM6_examples repository.

Getting started

The example notebooks walk you through how to use the package using two different sets of input datasets. Please ensure that you can get at least one of these working on your setup with your MOM6 executable before trying to modify the example to suit your domain with your bathymetry, forcing, and boundary conditions.

You can download the notebooks from Github or by clicking on the download download button, e.g., at the top-right of the regional Tasmania forced by ERA5 example.

Citing

If you use regional-mom6 in research, teaching, or other activities, we would be grateful if you could mention regional-mom6 and cite our paper in JOSS:

Barnes et al., (2024). regional-mom6: A Python package for automatic generation of regional configurations for the Modular Ocean Model 6. Journal of Open Source Software, 9(100), 6857, doi:10.21105/joss.06857.

The bibtex entry for the paper is:

bibtex @article{regional-mom6-JOSS, doi = {10.21105/joss.06857}, url = {https://doi.org/10.21105/joss.06857}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {100}, pages = {6857}, author = {Ashley J. Barnes and Navid C. Constantinou and Angus H. Gibson and Andrew E. Kiss and Chris Chapman and John Reily and Dhruv Bhagtani and Luwei Yang}, title = {{regional-mom6: A Python package for automatic generation of regional configurations for the Modular Ocean Model 6}}, journal = {Journal of Open Source Software} }

Owner

  • Name: COSIMA
  • Login: COSIMA
  • Kind: organization
  • Location: Australia

Consortium for Ocean-Sea Ice Modelling in Australia

JOSS Publication

regional-mom6: A Python package for automatic generation of regional configurations for the Modular Ocean Model 6
Published
August 09, 2024
Volume 9, Issue 100, Page 6857
Authors
Ashley J. Barnes ORCID
Australian National University, Australia, ARC Centre of Excellence for Climate Extremes, Australia
Navid C. Constantinou ORCID
Australian National University, Australia, ARC Centre of Excellence for Climate Extremes, Australia, University of Melbourne, Australia, ARC Centre of Excellence for the Weather of the 21st Century, Australia
Angus H. Gibson ORCID
Australian National University, Australia
Andrew E. Kiss ORCID
Australian National University, Australia, ARC Centre of Excellence for Climate Extremes, Australia
Chris Chapman ORCID
CSIRO Environment, Hobart, Tasmania, Australia
John Reilly ORCID
University of Tasmania, Australia
Dhruv Bhagtani ORCID
Australian National University, Australia, ARC Centre of Excellence for Climate Extremes, Australia
Luwei Yang ORCID
Australian National University, Australia, ARC Centre of Excellence for Climate Extremes, Australia
Editor
Anjali Sandip ORCID
Tags
ocean modeling regional modeling mom6

Citation (CITATION.cff)

cff-version: 1.2.0
preferred-citation:
  type: article
  authors:
  - family-names: "Barnes"
    given-names: "Ashley J."
    orcid: "https://orcid.org/0000-0003-3165-8676"
  - family-names: "Constantinou"
    given-names: "Navid C."
    orcid: "https://orcid.org/0000-0002-8149-4094"
  - family-names: "Gibson"
    given-names: "Angus H."
    orcid: "https://orcid.org/0000-0001-7577-3604"
  - family-names: "Kiss"
    given-names: "Andrew E."
    orcid: "https://orcid.org/0000-0001-8960-9557"
  - family-names: "Chapman"
    given-names: "Chris"
    orcid: "https://orcid.org/0000-0002-6030-1951"
  - family-names: "Reily"
    given-names: "John"
    orcid: "https://orcid.org/0000-0003-4001-0230"
  - family-names: "Bhagtani"
    given-names: "Dhruv"
    orcid: "https://orcid.org/0000-0002-1222-375X"
  - family-names: "Yang"
    given-names: "Luwei"
    orcid: "https://orcid.org/0000-0001-8570-7424"
  title: "regional-mom6: A Python package for automatic generation of regional configurations for the Modular Ocean Model 6"
  journal: "Journal of Open Source Software"
  doi: "10.21105/joss.06857"
  volume: 9
  issue: 100
  start: 6857
  year: 2024

GitHub Events

Total
  • Fork event: 5
  • Create event: 5
  • Commit comment event: 3
  • Release event: 1
  • Issues event: 21
  • Watch event: 6
  • Delete event: 5
  • Member event: 2
  • Issue comment event: 211
  • Push event: 34
  • Pull request review comment event: 234
  • Pull request event: 24
  • Pull request review event: 211
Last Year
  • Fork event: 5
  • Create event: 5
  • Commit comment event: 3
  • Release event: 1
  • Issues event: 21
  • Watch event: 6
  • Delete event: 5
  • Member event: 2
  • Issue comment event: 211
  • Push event: 34
  • Pull request review comment event: 234
  • Pull request event: 24
  • Pull request review event: 211

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 443
  • Total Committers: 7
  • Avg Commits per committer: 63.286
  • Development Distribution Score (DDS): 0.404
Past Year
  • Commits: 16
  • Committers: 4
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.563
Top Committers
Name Email Commits
Navid C. Constantinou n****y 264
ashjbarnes a****7@g****m 140
Angus Gibson a****s@a****e 27
Manish Venumuddula 8****u 6
Andrew Kiss 3****s 3
Dhruv Bhagtani D****i@a****u 2
Chris Chapman c****8@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 84
  • Total pull requests: 144
  • Average time to close issues: 2 months
  • Average time to close pull requests: 20 days
  • Total issue authors: 17
  • Total pull request authors: 11
  • Average comments per issue: 4.05
  • Average comments per pull request: 6.03
  • Merged pull requests: 117
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 20
  • Pull requests: 29
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 24 days
  • Issue authors: 11
  • Pull request authors: 6
  • Average comments per issue: 1.05
  • Average comments per pull request: 11.21
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • navidcy (40)
  • ashjbarnes (13)
  • angus-g (5)
  • q1165600785 (5)
  • helenmacdonald (3)
  • manishvenu (3)
  • croachutas (2)
  • ChrisC28 (2)
  • adele-morrison (1)
  • aekiss (1)
  • edoddridge (1)
  • reillyja (1)
  • AVEllepola (1)
  • mmr0 (1)
  • elizabeth-ellison (1)
Pull Request Authors
  • navidcy (99)
  • ashjbarnes (58)
  • manishvenu (15)
  • aekiss (10)
  • angus-g (9)
  • reillyja (4)
  • dhruvbhagtani (4)
  • ChrisC28 (3)
  • kshedstrom (1)
  • AndyHoggANU (1)
  • q1165600785 (1)
Top Labels
Issue Labels
question ❓ (18) documentation 📔 (14) package 📦 (8) testing 🧪 (6) bug 🐞 (6) enhancement (5) cleanup 🧹 (5) user experience 📻 (5) bathymetry ⛰️ (3) good first issue (2) help wanted (2) joss 📓 (1)
Pull Request Labels
documentation 📔 (46) cleanup 🧹 (20) package 📦 (19) testing 🧪 (18) bug 🐞 (13) user experience 📻 (12) joss 📓 (10) ⚠️ DO NOT MERGE ⚠️ (2) enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 98 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
  • Total maintainers: 2
pypi.org: regional-mom6

Automatic generation of regional configurations for Modular Ocean Model 6

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 98 Last month
Rankings
Dependent packages count: 10.0%
Average: 38.8%
Dependent repos count: 67.6%
Maintainers (2)
Last synced: 4 months ago

Dependencies

.github/workflows/testing.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • conda-incubator/setup-miniconda v2 composite
  • psf/black stable composite
docs/requirements.txt pypi
  • IPython *
  • myst-parser *
  • nbsphinx *
  • sphinx-book-theme *
pyproject.toml pypi
  • dask [array]
  • dask [distributed]
  • netCDF4 *
  • numpy >=1.17.0
  • scipy >=1.2.0
  • xarray *
  • xesmf *