Skip to main content

Swath processing toolbox for CryoSat-2

Project description

CryoSwath

GitHub top language Conda Version DOI GitHub License Conda Downloads PyPI - Downloads

CryoSwath is a Python package for processing CryoSat-2 SARIn data, from waveform-level processing to gridded elevation products.

What CryoSwath provides

  • discovery of CryoSat-2 tracks over a region of interest
  • L1b download and preprocessing
  • swath and POCA elevation retrieval
  • aggregation to regular spatial/temporal grids
  • gap filling and trend estimation workflows

Important notes

  • Install CryoSwath in a dedicated environment (pixi, conda/mamba, venv, or uv). The dependency tree is broad, and future dependency conflicts are otherwise likely.
  • Supported Python version: >=3.11 (regularly tested on 3.11 and 3.12).
  • Downloading CryoSat resources requires an ESA EO account.
  • ESA credentials are resolved in this order: EOIAM_USER/EOIAM_PASSWORD, then keyring (preferred for interactive setup), then ~/.netrc (plaintext fallback), then legacy config.ini [user] name/password (temporary fallback).
  • L1b file downloads are HTTPS-first. FTP remains a fallback path and is still used for metadata refresh flows (catalog/track updates).
  • Anonymous FTP login is no longer supported.
  • Install xarray and zarr together to avoid version mismatches.

Dependency policy

  • Flexible package bounds (for pip/uv users): xarray>=2025.3,<2025.12.
  • Stable environment (recommended for reproducible runs): use the checked-in lock/environment files (pixi.lock, environment.yml).
  • Compatibility window in this repository was last audited on February 14, 2026.

Installation

For full setup details, see the docs: cryoswath.readthedocs.io

Option 1: reproducible setup with pixi (recommended)

git clone https://github.com/j-haacker/cryoswath.git
cd cryoswath
pixi install --locked -e test
pixi run -e test test-unit

For an interactive shell in the project environment:

pixi shell -e test

Option 2: install from conda-forge

mamba create -n cryoswath conda-forge::cryoswath
mamba activate cryoswath

Option 3: editable install from source

git clone https://github.com/j-haacker/cryoswath.git
mamba env create -n cryoswath -f cryoswath/environment.yml
mamba activate cryoswath
mamba install pip
pip install --editable cryoswath

Option 4: reproducible Pixi environment

git clone https://github.com/j-haacker/cryoswath.git
cd cryoswath
pixi install --locked -e test
pixi shell -e test

This uses the lock file and is the most robust option when dependency resolvers disagree.

Contributor lockfile workflow

For regular development runs:

pixi install --locked -e test

If you change dependency manifests (pyproject.toml and/or pixi.toml):

pixi lock
pixi run -e test test-unit
pixi run -e docs docs-build

Optional: Docker image

If local dependency resolution fails, you can use Docker:

docker run -it -p 8888:8888 -v <proj_dir>:/home/jovyan/project_dir cryoswath/jupyterlab:nightly

Initialize a project

CryoSwath expects project data outside the package install directory. Run cryoswath-init inside a new project folder:

mkdir <proj_dir>
cd <proj_dir>
cryoswath-init

cryoswath-init sets up the expected data structure and writes scripts/config.ini with your base data path. The paths can be reconfigured in config.ini if you use a different layout.

To avoid storing secrets in config.ini, use keyring (preferred) or environment variables for ESA credentials and keep config.ini focused on paths. You can configure keyring credentials interactively with: cryoswath-update-keyring. If you need a fallback, you can write ~/.netrc (this stores the password in plaintext) using: cryoswath-update-netrc.

Tutorials and documentation

Local testing

Run the full local test pipeline:

pixi run -e test test-all

Run report notebooks only:

pixi run -e test test-notebooks

Run tutorial notebooks only:

pixi run -e test test-tutorial-notebooks

If tutorials are stored outside the current checkout, set CRYOSWATH_TUTORIAL_DIR to the directory containing tutorial__*.ipynb before running this task.

Notebook tests may download required larger data from first-hand sources at runtime, so network availability and valid ESA credentials matter.

External dependencies and data

CryoSwath relies on:

  • Python dependencies: requirements.txt
  • reference elevation models
  • RGI glacier outlines

The package points to required external resources during setup and use.

Known limitations

  • ESA's data server is not reachable from all internet service providers.
  • Projected RGI basin geometries can sometimes be invalid; use .make_valid() where required.
  • Most testing and validation has focused on the Arctic.

Further details: open issues

Citation and attribution

If you use CryoSwath, please cite:

@software{cryoswath,
  author       = {Haacker, Jan},
  title        = {CryoSwath: v0.2.5},
  month        = feb,
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v0.2.5},
  doi          = {10.5281/zenodo.17011635}
}

Please also acknowledge upstream data/resources used in your workflow:

License

MIT. See LICENSE.txt.

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

cryoswath-0.2.5.post1.tar.gz (100.4 kB view details)

Uploaded Source

Built Distribution

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

cryoswath-0.2.5.post1-py3-none-any.whl (104.6 kB view details)

Uploaded Python 3

File details

Details for the file cryoswath-0.2.5.post1.tar.gz.

File metadata

  • Download URL: cryoswath-0.2.5.post1.tar.gz
  • Upload date:
  • Size: 100.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cryoswath-0.2.5.post1.tar.gz
Algorithm Hash digest
SHA256 f226de7557e9fd21c9b64746b1db829f09b6ba665726a1b25682b9fe22ae8c27
MD5 ed6a2bc0116ab491382610379e5c33d8
BLAKE2b-256 5bea9fc4b0c2cff0cbd78b20dfdce3f966109daba9ab2666fa989102fc1560bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryoswath-0.2.5.post1.tar.gz:

Publisher: pypi-publish.yml on j-haacker/CryoSwath

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

File details

Details for the file cryoswath-0.2.5.post1-py3-none-any.whl.

File metadata

  • Download URL: cryoswath-0.2.5.post1-py3-none-any.whl
  • Upload date:
  • Size: 104.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cryoswath-0.2.5.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e90cdf0cf1c0b0cfca7e151be0fd98f527592fd7f4842b201dfdddd07340725
MD5 26440e176e8e629ba77941673adaa69f
BLAKE2b-256 bff943adfe58391ed52bbc9266b0972e2d6dbe5f2f82a5e46fc8d76ed0a19b06

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryoswath-0.2.5.post1-py3-none-any.whl:

Publisher: pypi-publish.yml on j-haacker/CryoSwath

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