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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xnemogcm-0.6.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xnemogcm-0.6.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file xnemogcm-0.6.0.tar.gz.

File metadata

  • Download URL: xnemogcm-0.6.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for xnemogcm-0.6.0.tar.gz
Algorithm Hash digest
SHA256 c4ed5a5839dcf50af1d9d7ead283be77354fc7b015d6d8658b8a6374301b2534
MD5 97a2bc969c050e25700f00b4c185070b
BLAKE2b-256 97356bb84a9b624a9c033d20797bae2f837345633fbab3ab19339087ab202023

See more details on using hashes here.

File details

Details for the file xnemogcm-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: xnemogcm-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for xnemogcm-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1368a9fdda2bfb14b898bf5cb2ed8e0f1983118dcfe871a5b08ec57e5f6e78a
MD5 721623fa90a9a7740818d3d9329d3b9d
BLAKE2b-256 4647ee8d28b39f89f73d66492fcbc1de13fd80fd69df3a4a156ff96cadd32178

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page