Skip to content

Feature: volume and mass integration utilities, prism-volume test and notebook examples - #9

Open
aesgeorges wants to merge 5 commits into
mainfrom
feature/volume-and-mass-calculations
Open

Feature: volume and mass integration utilities, prism-volume test and notebook examples#9
aesgeorges wants to merge 5 commits into
mainfrom
feature/volume-and-mass-calculations

Conversation

@aesgeorges

Copy link
Copy Markdown
Contributor

This PR introduces new grid-integration utilities for volume and mass calculations, adds a focused synthetic unit test for prism-volume behavior, and extends the example subset notebook with end-to-end usage and comparison plots between the two volume calculation functions implemented.

What was added?

  1. Integration routines in integrate.py:
  • projected prism-volume calculation (public entry point): calc_volumes_from_projected
  • uxarray-based spherical volume calculations
  • mass caulcation using TEOS-10 density equations via gsw
  1. Added synthetic test in test_volume.py
  2. Added examples in example_subset.ipynb:
  • compares projected vs uxarray volume calculations
  • includes mass calculation example
  1. Added gsw>=3.6 dependency for density-to-mass calculations.

Alexandre Georges added 4 commits July 27, 2026 10:10
…te.py

Two functions are implemented, one using planar coordinates extending Suxarray nodal integration routies (`_calculate_prism_volumes`) and one leveraging a uxarray based routine (`_calculate_volumes_uxarray`). One of these two methods may be dropped at a later time. The mass calculation function (`_calculate_mass`) may also be temporary. It uses the TEOS-10 equations for calculating density and uses the gsw package.
For volume calculations, both methods `calc_volumes_from_projected` and `_calculate_volumes_uxarray` are used and their results compared.
@aesgeorges
aesgeorges requested a review from kjnam July 27, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant