Skip to main content

No project description provided

Project description

xshelftransects

Build and sample cross-shelf transects from a binary boundary mask on model grids. Useful for understanding gravity current and coastally-trapped waves, which are defined by their orientation and proximity to the continental shelves.

Install

conda create --name xshelftransects python=3.11
conda activate xshelftransects
pip install -e .

Optional dependencies

  • xesmf (for engine="xesmf" on curvilinear grids)
  • scipy (for Theil-Sen based transect orientation)

Basic usage

import numpy as np
import xshelftransects

transects, geometry = xshelftransects.cross_shelf_transects(
    ds,
    "thetao",
    boundary_mask,  # binary mask: 0/1 interface is transect_length=0
    transect_length=np.arange(0.0, 200e3 + 2e3, 2e3),
    transect_spacing=10e3,
    crs="EPSG:3031",
    engine="xesmf",
)

Inputs and expectations

  • ds["lon"], ds["lat"]: 2D longitude/latitude arrays.
  • ds["deptho"]: ocean depth in meters, positive downward (deptho <= 0 treated as land/ice).
  • boundary_mask: DataArray on the same grid as lon/lat; 0/1 interface is the boundary.
  • crs: projected CRS in meters (e.g., "EPSG:3031" Antarctica, "EPSG:3413" Arctic, "EPSG:3857" global).

Outputs

  • transects: sampled values with dims (..., section, transect_length) and lon/lat coords.
  • geometry: Dataset with anchor points, normals, and boundary contour.

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

xshelftransects-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

xshelftransects-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xshelftransects-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eda688de68931bca00232f336b4ecb814a73a91be4047e8a3dc2ae982c639a15
MD5 be770ce593dcc27396b06468c8e4f17a
BLAKE2b-256 3e5c07da2a0fcded3b0791992ae1f481a5825e97defb973864b801745b7f9c2c

See more details on using hashes here.

Provenance

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

Publisher: python-publish.yml on anthony-meza/xshelftransects

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

File details

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

File metadata

File hashes

Hashes for xshelftransects-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1f538acd6a3bec59808baa82943abe4e88c4c5d2ed0465e357cb8503f48e621
MD5 2366e9df72abe5e6b898c12a6d91b088
BLAKE2b-256 97da2016f2b8b363b1f366aaeed43795d11e0de6c6ee8de6c241e243fdb38e9d

See more details on using hashes here.

Provenance

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

Publisher: python-publish.yml on anthony-meza/xshelftransects

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