Skip to main content

xarray interface for HYCOM a.b binary output files

Project description

xhycom

Run Tests codecov Documentation Status

xhycom integrates HYCOM model output with xarray — giving every field a name, coordinates, units, and lazy out-of-memory access, directly from the native .ab format.

Installation

pip install git+https://github.com/nansencenter/xhycom.git

Dependencies: numpy, xarray, cftime, dask, xgcm — no Fortran compiler or external binary readers required. This covers reading, lazy/out-of-memory loading, and vertical regridding.

Horizontal regridding additionally needs xESMF, whose ESMF/esmpy backend is conda-forge only. ci/environment-regrid.yml creates the environment and pip installs xhycom itself (in editable mode) into it in one step:

conda env create -f ci/environment-regrid.yml
conda activate hycom-analysis-env

See Installation for details, including setup on the Olivia and Betzy HPC clusters.

Quick example

import xhycom

# Single snapshot — auto-detects file type, attaches lon/lat/time/dens
ds = xhycom.open_dataset("archv.2020_001_00", grid="regional.grid")
ds["temp"].isel(time=0, k=0).plot()

# Multi-year time series — lazy, out-of-memory, no data loaded until .compute()
ds = xhycom.open_mfdataset("data/", grid="regional.grid", chunks={"time": 1})
ds["temp"].isel(k=0).mean("time").compute()

Documentation

Full documentation — why xarray, worked examples, API reference, and a how-it-works guide — is at https://xhycom.readthedocs.io.

Project details


Download files

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

Source Distribution

xhycom-0.1.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

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

xhycom-0.1.0-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file xhycom-0.1.0.tar.gz.

File metadata

  • Download URL: xhycom-0.1.0.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xhycom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5fdb9a9b547c4df89cacd47a8a0c155395db07b013c06e99ba759f0c35ee03a
MD5 4d85a2afc6f60d4f671368b09bf1d088
BLAKE2b-256 e5cc4237585640e8c74871d4760669d46e161a4669969c05842f88ed9a9e8af9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xhycom-0.1.0.tar.gz:

Publisher: publish.yml on nansencenter/xhycom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xhycom-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xhycom-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xhycom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f59cd9ca7955c1b4312c747e3daddb24c302bad3617186e7737131d944d9851
MD5 e8889fc650ffef7546c1f55b34fd5b9b
BLAKE2b-256 66f92c12d218894587701fa6ef9e761f8d206ff1c82fe9a67b75acf08edf9850

See more details on using hashes here.

Provenance

The following attestation bundles were made for xhycom-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nansencenter/xhycom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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