xnemogcm
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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xnemogcm-0.6.0.tar.gz | 14.7 kB | Without provenance | Details for xnemogcm-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xnemogcm-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for xnemogcm-0.6.0-py3-none-any.whl |
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}
|
Security for xnemogcm 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.