Interface to open NEMO ocean global circulation model output dataset and create a xgcm grid. NEMO 3.6, 4.0, and 4.2.0 are tested and supported. Any version between 3.6 and 4.2.0 should work, but in case of trouble, please open an issue.
If you wish to contribute but don't have a github account, send me an email with your questions or comments: romain [dot] caneill [at] ens-lyon [.] org
For conda
conda install --channel conda-forge xnemogcm
for pip
pip install xnemogcm
from pathlib import Path
from xnemogcm import open_nemo_and_domain_cfg
ds = open_nemo_and_domain_cfg(
nemo_files='/path/to/output/files',
domcfg_files='/path/to/domain_cfg/mesh_mask/files'
)
# Interface with xgcm
from xnemogcm import get_metrics
import xgcm
grid = xgcm.Grid(ds, metrics=get_metrics(ds), periodic=False)
The full documentation is hosted online: https://xnemogcm.readthedocs.io/