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.1.tar.gz (8.7 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xshelftransects-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 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.1.tar.gz
Algorithm Hash digest
SHA256 3e48bca268a27352221ec5b4875abe5ea390c409ea31886bdeb8f36016bcfc21
MD5 06deea95bf00b0e327975c394023f468
BLAKE2b-256 eb8f65da431c9d8f23eae7fcca9e815bedbe0a9f1cbb34bff2a3105d3ca0ca94

See more details on using hashes here.

Provenance

The following attestation bundles were made for xshelftransects-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for xshelftransects-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc4a52fa4cc6b3b98c0aaa9affeb7b0e8593face3057a29f6e4488f0b22f81dc
MD5 246a70b8e42601ad21437a5468f3166b
BLAKE2b-256 a29be09f6e4837b2342f5ad108df8ae0e1d29ac6df0e614a181da6803f073aef

See more details on using hashes here.

Provenance

The following attestation bundles were made for xshelftransects-0.1.1-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