Giter Club home page Giter Club logo

mom6-regional-scripts's Introduction

regional_mom6

Python package for automatic generation of regional configurations for the Modular Ocean Model 6.

Repo status License codecov Documentation Status Code style: black

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 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 the model. 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).

Limitations: Currently the package supports only one horizontal grid type (that is equally spaced in longitude); there are plans to add more grid options. We have designed the package in a way that it is modular so, for example, one needs to implement just another method for a different type of grid and the rest should be good to go.

If you find this package useful and have any suggestions please feel free to open an issue or a discussion. We'd love to have 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 (eg ERA or JRA reanalysis)
  6. GFDL's FRE tools must be downloaded and compiled on the machine you are using.

Check out the the documentation and browse through the demos.

Installation

At the moment you can install the package via pip from GitHub. Before this, the binary esmpy dependency is required. This is easiest to install using Conda. To do so, first create a custom Conda environment, or activate an existing environment into which you want to install esmpy and regional_mom6. Then install emspy:

conda install -c conda-forge esmpy

Alternatively, it's possible to follow the Installing ESMPy from Source instructions to do this in a Conda-free way. With esmpy available, you can then install regional_mom6 via pip. If your environment doesn't yet have pip, then conda install pip should do the job.

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

This installs the latest version of regional_mom6 plus any required dependencies. esmpy won't be installed as a dependency and that's why need to install it separately.

Alternatively, you can also install a particular tag or git commit using, e.g.,

pip install git+https://github.com/COSIMA/[email protected]

or

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

Getting started

The 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 attempts to regrid in parallel, and if it's not able to do so, it throws a warning and run in serial. You 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.

mom6-regional-scripts's People

Contributors

aekiss avatar angus-g avatar ashjbarnes avatar chrisc28 avatar navidcy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.