The previous tutorials used the Low-Rate ocean products. SWOT also produces a
High-Rate pixel cloud — SWOT_L2_HR_PIXC — the geolocated radar returns
(tens of millions of points per granule) with water/land classification,
height, and backscatter per pixel. It targets inland and coastal water, and is
handy near the coast, in estuaries, and wherever the 2 km ocean grid is too
coarse.
Both PIXC tools live under the unified odsl-swot-swath CLI.
What you'll learn
- Discovering and downloading PIXC granules for a time window and box.
- Making summary maps of a granule's classification, height, and backscatter.
Prerequisites: tutorial 1; Earthdata credentials
in ~/.netrc for downloading (tutorial 2).
1. Discover first, download second
PIXC granules are large (hundreds of MB to a few GB each), and a time+bbox query can match many of them. Preview what a query returns before committing the disk space:
odsl-swot-swath pixc-download \
--start 2024-06-01 --end 2024-06-02 \
--bbox -98 18 -80 31 \
--out-dir ~/swot/pixc \
--manifest-only
--manifest-only queries CMR and writes only the manifest —
SWOT_L2_HR_PIXC_D_manifest.csv (and .json) in --out-dir — listing every
matching granule with its size and link. Inspect it, then re-run the same
command without --manifest-only to download:
odsl-swot-swath pixc-download \
--start 2024-06-01 --end 2024-06-02 \
--bbox -98 18 -80 31 \
--out-dir ~/swot/pixc
Notes:
--start/--endtake dates (2024-06-01) or full ISO timestamps; the bbox uses[-180, 180]longitudes.- Always set
--out-dir— the built-in default is adata/folder inside the repository, which is not where you want gigabytes of granules. - Downloads are idempotent (existing files are skipped;
--overwriteforces). --max-granules Ncaps the download — useful to grab one granule for a first look.
2. Summary maps of a granule
odsl-swot-swath pixc-plot ~/swot/pixc/SWOT_L2_HR_PIXC_*.nc
This reads the pixel cloud and writes a multi-panel PNG
(<granule stem>_summary.png next to the input, or --output): a
classification panel (land → open water categories) plus one panel each
for height, water_frac, sig0, phase_noise_std, and cross_track.
Useful options:
--variables height sig0— plot only those panels (classification is always first).--water-only— drop land-classified pixels, so water features stretch the colour scale.--max-points— granules have tens of millions of points; the plotter stride-samples down to this cap (default 300,000). Raise it for more detail, at the cost of time and memory.--wrap-longitude— for granules straddling the antimeridian.--show— interactive window instead of just the PNG.
3. Going further
The pixel cloud is point data, not a grid: analyses beyond quicklooks usually
start by opening the pixel_cloud NetCDF group directly —
import xarray as xr
ds = xr.open_dataset("~/swot/pixc/SWOT_L2_HR_PIXC_....nc", group="pixel_cloud")
print(ds[["latitude", "longitude", "height", "classification"]])
— then filtering by classification and binning to whatever geometry your
problem needs (the common.swath_regrid helpers work on any scattered
lat/lon points).
Troubleshooting
- Query matches nothing — PIXC coverage targets rivers, lakes, and coasts; a purely open-ocean box can legitimately return few granules. Widen the time window or move the box coastward.
- Plot looks sparse — that's the
--max-pointsstride sampling; raise the cap. - Out of disk — check the manifest's sizes before downloading, and use
--max-granuleswhile exploring.
Series recap: 1 — Getting started ·
2 — Downloading · 3 — Finding passes ·
4 — Subset cubes · 5 — Regridding ·
6 — PIXC. For advanced topics — per-cycle MPI combining
(swot/combine_passes.py) and geometric eddy/internal-wave separation
(swot/geometric_separation_eddy_waves_ssh.py) — see the
swot package README.