Skip to main content

xnemogcm

DOI python versions ci documentation status pypi anaconda badge Project Status: Active – The project has reached a stable, usable state and is being actively developed. pyOpenSci

Interface to open NEMO ocean global circulation model output as an Xarray Dataset and create a xgcm grid. NEMO 3.6, 4.0, 4.2.0, and 5.0 are tested and supported. Any version between 3.6 and 5.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

Installation

For conda

conda install --channel conda-forge xnemogcm

for pip

pip install xnemogcm

Usage

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/

Differences with existing tools

There exist tools in Fortran that ship with NEMO that are used to create domain files, input fields, etc. They are however more used to produce configurations with the necessary input files, than to analyse the outputs. So there is only one overlap with xnemogcm, which is recombining the mesh_mask / domaincfg files, when they have been outputted by different processors.

NEMO output files are outputted as netcdf so they can directly be opened by xarray. However, what is missing is all grid information in the shape needed by xgcm (COMODO convention). To solve this problem, another python package exists: xorca. However, xorca is not developed any more and is less flexible than xnemogcm. xnemogcm is meant to replace xorca, in addition to extending its functionality.

Release files for xnemogcm 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xnemogcm 0.6.0
File Size Uploaded
xnemogcm-0.6.0.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xnemogcm 0.6.0
File Interpreter ABI Platform
xnemogcm-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.4 kB

Release files / xnemogcm-0.6.0.tar.gz

Download URL xnemogcm-0.6.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c4ed5a5839dcf50af1d9d7ead283be77354fc7b015d6d8658b8a6374301b2534
BLAKE2b-256 checksum
How to use checksums
97356bb84a9b624a9c033d20797bae2f837345633fbab3ab19339087ab202023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / xnemogcm-0.6.0-py3-none-any.whl

Download URL xnemogcm-0.6.0-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1368a9fdda2bfb14b898bf5cb2ed8e0f1983118dcfe871a5b08ec57e5f6e78a
BLAKE2b-256 checksum
How to use checksums
4647ee8d28b39f89f73d66492fcbc1de13fd80fd69df3a4a156ff96cadd32178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page