Skip to main content

Efficient and lazy computation of Water Mass Budgets in arbitrary sub-domains of C-grid ocean models

Project description

xwmb: xarray-enabled Water Mass transformation Budgets (WMB) using structured ocean model output

PyPI Conda Version Docs License

xWMB is a Python package that provides a efficient and lazy computation of Water Mass Budgets in arbitrary sub-domains of C-grid ocean models. Most of the heavy lifting is done by dependency packages by the same team of developers:

  • sectionate: for computing transports normal to a section (open or closed)
  • regionate: for converting between gridded masks and the closed sections that bound them
  • xbudget: for model-agnostic wrangling of multi-level tracer budgets
  • xwmt: for computing bulk water mass transformations from these budgets

Documentation is not yet available, but the core API is illustrated in the example notebooks here and in each of the dependency packages.

If you use xwmb, please cite the companion manuscript: Henri F. Drake, Shanice Bailey, Raphael Dussin, Stephen M. Griffies, John Krasting, Graeme MacGilchrist, Geoffrey Stanley, Jan-Erik Tesdal, Jan D. Zika. Water Mass Transformation Budgets in Finite-Volume Generalized Vertical Coordinate Ocean Models. Journal of Advances in Modeling Earth Systems. 08 March 2025. DOI: doi.org/10.1029/2024MS004383

Quick Start Guide

Minimal installation within an existing environment

conda install -c conda-forge xwmb

Installing from scratch using conda

This is the recommended mode of installation for developers.

git clone git@github.com:hdrake/xwmb.git
cd xwmb
conda env create -f docs/environment.yml
conda activate docs_env_xwmb
pip install -e .

You can verify that the package was properly installed by confirming it passes all of the tests with:

pytest -v

You can launch a Jupyterlab instance using this environment with:

python -m ipykernel install --user --name docs_env_xwmb --display-name "docs_env_xwmb"
jupyter-lab

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

xwmb-0.6.0.tar.gz (983.7 kB view details)

Uploaded Source

Built Distribution

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

xwmb-0.6.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xwmb-0.6.0.tar.gz
  • Upload date:
  • Size: 983.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for xwmb-0.6.0.tar.gz
Algorithm Hash digest
SHA256 ea54b48a40e230765a3f0cf47064a12b4213c18e79a92000e70a447b479a7751
MD5 7093cc2f34d241a45b16ad9b64f89515
BLAKE2b-256 14fa9dbad89486ae4d47262472f62204509c5050207ddb23d7250bf1146b3bcb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xwmb-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for xwmb-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86b55c8d6d36792757811a143f2a248ba6b6966143bca0151835af782c657c11
MD5 7d0484180dede5efd3ce96ed0bfaab37
BLAKE2b-256 e8e80384fd81698cfc2a42f6809807c0252804e6bf21e52b13388de45c30ca16

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 Pingdom Monitoring Sentry Error logging StatusPage Status page