Skip to main content

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.

Metadata

Release files for xshelftransects 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xshelftransects 0.1.2
File Size Uploaded
xshelftransects-0.1.2.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xshelftransects 0.1.2
File Interpreter ABI Platform
xshelftransects-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / xshelftransects-0.1.2.tar.gz

Download URL xshelftransects-0.1.2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
525f0e2de9f618db047cab9b226aed21f684ea40ca60ab4879bbf9f834b114f2
BLAKE2b-256 checksum
How to use checksums
b413ad4ebc227042bb7702f9b4086a22f29054ccad7079bc3e20962827d07803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 19, 2026.

Transparency log

Release files / xshelftransects-0.1.2-py3-none-any.whl

Download URL xshelftransects-0.1.2-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
544abbbcff860acf638833ab4e96a4bdeb3544b38a22ea7a9c8b34398567c2d9
BLAKE2b-256 checksum
How to use checksums
f732c951c0c9333e62fc9bd3cd57b009d020dab80f464f0985ff85b2e8771425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page