Coming From X-STILT#
PYSTILT has the main pieces of X-STILT’s column and satellite workflow: column and slant receptors, sounding selection, averaging kernels, and pressure weighting. In X-STILT you configure one large script. In PYSTILT these pieces are Python functions and objects that you combine in your own script. PYSTILT does not try to copy every X-STILT feature. The table shows the ones that have an equivalent.
X-STILT concept |
X-STILT API / file |
PYSTILT equivalent |
|---|---|---|
Column receptor ( |
|
|
Slant column ( |
|
|
Sounding selection (near-field + background) |
|
|
Jittered receptors in a pixel ( |
|
|
Overpass grouping |
|
|
Vertical weighting (AK × PWF) |
|
|
Per-sounding averaging kernels ( |
|
|
First-order chemistry |
|
|
Column footprint outputs |
X-STILT column products |
standard PYSTILT footprints from column or slant receptors |
Product readers (OCO-2/3, TROPOMI, TCCON) |
|
|
Transport error on the modeled column ( |
|
|
Modeled enhancement from an inventory ( |
|
|
Wind error statistics from radiosondes and surface stations |
|
|
Mixing-height scaling for the vertical transport error ( |
|
|
Background from trajectory endpoints ( |
|
|
Emission-error propagation ( |
|
the same product as the enhancement, |
Satellite-derived plume background ( |
|
|
Runs you already have in X-STILT’s out/by-id folder are read with
stilt.migration.read_stilt_r() (Coming From STILT-R). X-STILT weights the
footprint by the averaging kernel and pressure weighting, but saves the
particles before it does, so the particles read are unweighted. X-STILT keeps
rslurm’s params.RDS in a folder named for the job inside its own working
directory, not beside out/, so give the smooth_factor of
run_xstilt.r to read the footprints:
read_stilt_r("out/by-id", smooth_factor=1).
stilt.migration.import_stilt_r() writes them into a project’s output
directory the same way, with the X-STILT commit as version
(Coming From STILT-R).
Where the methods differ#
On the same particles, a few steps give different numbers in PYSTILT and in X-STILT. Each row says what each one does.
Step |
X-STILT |
PYSTILT |
|---|---|---|
Transport error across release levels ( |
Fits a weighted line of the perturbed variance against the unperturbed variance through the levels where the variance rose, and scales every level’s variance with that line. |
Uses each level’s variance difference as it is, with its sign (Lin
and Gerbig’s equation 4), so the noise in it averages out over many
receptors. |
Particles kept in each level ( |
Drops the particles above the 99th percentile of the enhancement. |
Keeps every particle, as Lin and Gerbig do. |
Vertical correlation of the level errors ( |
356 m, an empirical mean length scale. |
356 m by default ( |
Emission error ( |
Reports the fully correlated sum, a footprint times a |
The same sum, and also the root-sum-square for independent cells,
which bounds the error from below. With a spatial correlation, fips’s
|
Pressure weighting ( |
Gives each particle the layer below its release pressure, from the next particle down (or the ground, for the lowest). A particle released at the surface gets almost no weight. |
Gives each particle the slab centered on its release height, with edges halfway to its neighbors and the ground closing the lowest slab, because HYSPLIT places each particle at random inside its own slab. A particle’s slab is half a slab higher than in X-STILT (Particle Weighting (Transforms)). |
Moving a workflow over#
Write a reader that turns your product into a DataFrame with one row per sounding (see Your own instrument in Tutorial: A Satellite Column, Start To Finish).
Group the soundings by overpass and select the ones to run with the helpers above.
Build one receptor per row. For slant columns, use
slant_points.Build the averaging-kernel table with
averaging_kernel_tableand save it in the project. Then listaveraging_kernel(withtable:) andpressure_weightingundertransformsinconfig.yaml.