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.2.tar.gz (9.4 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.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xshelftransects-0.1.2.tar.gz
  • Upload date:
  • Size: 9.4 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.2.tar.gz
Algorithm Hash digest
SHA256 525f0e2de9f618db047cab9b226aed21f684ea40ca60ab4879bbf9f834b114f2
MD5 611d35d3b87dad7cb9b1150426fdf8ac
BLAKE2b-256 b413ad4ebc227042bb7702f9b4086a22f29054ccad7079bc3e20962827d07803

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xshelftransects-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 544abbbcff860acf638833ab4e96a4bdeb3544b38a22ea7a9c8b34398567c2d9
MD5 1b31fcf125e15d5a0f53ff8cd6fbf66c
BLAKE2b-256 f732c951c0c9333e62fc9bd3cd57b009d020dab80f464f0985ff85b2e8771425

See more details on using hashes here.

Provenance

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