Python package for automatic generation of regional configurations for the Modular Ocean Model 6.
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!
- A cool idea for a new regional MOM6 domain
- A working MOM6 executable on a machine of your choice.
- A bathymetry file that at least covers your domain
- 3D ocean forcing files of any resolution on your choice of A, B or C Arakawa grid
- Surface forcing files (eg ERA or JRA reanalysis)
- 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.
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/regional-mom6.git@v0.X.X
or
pip install git+https://github.com/COSIMA/regional-mom6.git@061b0ef80c7cbc04de0566df329c4ea472002f7e
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.