s1wvcalibration
Geophysical calibration of Sentinel-1 Wave Mode (WV) observations.
Purpose
s1wvcalibration computes a geophysical calibration constant (a bias in dB) for Sentinel-1 Wave Mode acquisitions. WV mode has no corner reflectors or transponders, so the calibration is relative: each 20x20 km WV imagette is compared against an empirical Geophysical Model Function (GMF) — CMOD5n — fed with colocated ECMWF winds. The difference between the (denoised) SAR NRCS and the GMF-predicted NRCS is the calibration bias, computed per sub-swath (WV1 / WV2).
The library is a clean-room re-packaging of the long-running Ifremer
MPC-Sentinel1 WV calibration pipeline (computeWVconstantecalibration.py).
Reading the products
- Level-1 SLC (
.tiffmeasurement) — read with xsar, which replaces the legacycerbere/sarimagemapper. - Level-2 OCN (
.ncmeasurement) — read directly with xarray.
GMF (NRCS model)
The GMF NRCS is computed with xsarsea
(windspeed.get_model("cmod5n")), which replaces the legacy sar.utils.gmf.
Configuration
All cluster-specific paths and calibration constants live in a packaged
config.yaml, overridable by a localconfig.yaml (or $S1WVCALIB_CONFIG).
This replaces the legacy shared_information module.
Dependencies
| Package | Role |
|---|---|
| xsar | Sentinel-1 Level-1 SLC reader |
| xsarsea | GMF (cmod5n / cmod5 / cmodifremer) NRCS models |
| numpy, scipy | numerical core |
| xarray, cftime, h5netcdf | NetCDF I/O (all NetCDF reads/writes via xarray) |
Installation
pip install s1wvcalibration
Apptainer image (HPC)
An Apptainer image is built from apptainer_s1wvcalibration.def and published
to the GitHub Container Registry for every tag:
apptainer pull s1wvcalibration_<tag>.sif oras://ghcr.io/umr-lops/s1wvcalibration:<tag>
apptainer exec s1wvcalibration_<tag>.sif s1wvcalib --help
To build it locally (the version must be passed explicitly, there is no .git
in the image):
apptainer build --fakeroot --ignore-fakeroot-command \
--build-arg VERSION=$(git describe --tags | sed 's/-\([0-9]*\)-g/.post\1+g/') \
s1wvcalibration.sif apptainer_s1wvcalibration.def
Usage
Run the calibration for a single SAFE:
s1wvcalib \
--input-safe /path/to/S1A_WV_SLC__1SSV_...SAFE \
--ecmwf 0100 \
--overwrite
Full CLI reference:
usage: s1wvcalib [-h] [-o OUTPUT] -i INPUT [--maxlat MAXLAT]
[--ecmwf {0125,0100}] [--overwrite] [--dev] [-v]
Per-SAFE NetCDF calibration files are written under the configured
analysis_dir (see config.yaml).
Regenerating the figures from a calibration NetCDF
The NRCS-vs-wind-speed figures (one per GMF: cmod5, cmod-ifr2, cmod5n) are
written next to the NetCDF by s1wvcalib. To re-issue them without re-running
the (expensive) calibration, use s1wvfig on an existing per-SAFE NetCDF:
s1wvfig \
--input-nc /path/to/calib/S1A_WV_SLC__1SSV_...SAFE.nc \
--output /path/to/figures
It reads the per-imagette wind / incidence / backscatter stored in the NetCDF,
recomputes the model backscatter (including the H-polarisation ratio), and
writes the same wind_vs_sig_calibrated_<gmf>_<safe>.png files.
Configuration
The packaged config.yaml holds the root_directory (under which all the
paths.* entries are resolved) and the calibration constants (high-latitude
threshold, wind ranges, ECMWF version, ...). To point the library at your
cluster's data tree, drop a localconfig.yaml next to it (or set
$S1WVCALIB_CONFIG to its path); it is deep-merged over the defaults, so a
single-leaf override is enough:
# localconfig.yaml
paths:
root_directory: /path/to/mpc-sentinel1
Project structure
s1wvcalibration/
├── src/
│ └── s1wvcalibration/
│ ├── __init__.py # Package entry point, exposes __version__
│ ├── calibration.py # Core calibration engine + `s1wvcalib` CLI
│ ├── figure.py # Re-plot figures from a NetCDF + `s1wvfig` CLI
│ ├── config.py # config.yaml loading (replaces shared_information)
│ ├── config.yaml # Default paths & calibration constants
│ └── _legacy/ # Modules ported from mpcsentinellibs
│ # (gmf, xsar_reader, ecmwf, ww3, ...)
├── tests/
│ ├── test_package.py # Package metadata tests
│ ├── test_gmf_parity.py # GMF / azimuth parity vs the legacy code
│ ├── test_figure.py # Figure replot entrypoint (s1wvfig)
│ ├── test_l1_parity.py # L1 reader parity vs a production NetCDF
│ └── test_netcdf_parity.py # End-to-end NetCDF parity
├── docs/ # Sphinx documentation
├── pyproject.toml
└── README.md
Metadata
Release files for s1wvcalibration 2026.11.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| s1wvcalibration-2026.11.18.tar.gz | 42.0 kB | With provenance | Details for s1wvcalibration-2026.11.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| s1wvcalibration-2026.11.18-py3-none-any.whl | Python 3 | none | any | Details for s1wvcalibration-2026.11.18-py3-none-any.whl |
Total release size: 92.5 kB
Release files / s1wvcalibration-2026.11.18.tar.gz
| Download URL | s1wvcalibration-2026.11.18.tar.gz |
|---|---|
| Size | 42.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ae01ef9a425b50711753e819197b68bf588893a4770807486f0574a14025272
|
|
BLAKE2b-256 checksum How to use checksums |
afda208e034aff5630f9cd8745df9b19398199f4e9f189b1168428845e9e5619
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logRelease files / s1wvcalibration-2026.11.18-py3-none-any.whl
| Download URL | s1wvcalibration-2026.11.18-py3-none-any.whl |
|---|---|
| Size | 50.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2dc1332dec64f4f3f6d9be3614ee976e779ca5b38ea084f64278dab0e41ef57
|
|
BLAKE2b-256 checksum How to use checksums |
7b7ebb6e00dd432f600acc7d6cbd761dd1b68430dd1d045a7844da5c4f0488e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logSecurity for s1wvcalibration 2026.11.18
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for s1wvcalibration-2026.11.18.tar.gz
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 Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.