Command-Line Interface Reference
PyStormTracker uses one stormtracker entry point with four subcommands:
stormtracker track
stormtracker sample
stormtracker compare
stormtracker convert
Use stormtracker <command> --help for the complete parser-generated option list.
stormtracker track
Runs feature detection and trajectory linking.
stormtracker track -i input.nc -v vo -o tracks.json -m max -a hodges -f json
Required arguments
Option |
Description |
|---|---|
|
Input NetCDF, GRIB, or other Xarray-readable dataset path. |
|
Variable to track, for example |
|
Output track file. |
Tracking and preprocessing
Option |
Description |
|---|---|
|
|
|
|
|
|
|
|
|
Polar stereographic grid spacing in kilometres; default |
|
Polar stereographic bounds as |
|
Detection threshold. When omitted, the tracker selects the variable-specific default. |
|
Process the first specified number of time steps. |
|
Explicitly enable or disable spectral filtering. |
|
Inclusive wave-number range as |
|
Explicitly enable or disable sub-grid refinement. |
Filtering and refinement are tri-state options at the command-line orchestration layer. If neither form is supplied, Simple tracking uses no filtering and no sub-grid refinement, while Hodges and HEALPix tracking use T5-42 filtering and enabled refinement. Direct tracker calls retain their class-specific defaults.
The production default relative-vorticity threshold is 1e-5 s^-1. The 1e-4 s^-1 value used by legacy regression fixtures is test-specific.
Backends and input processing
Option |
Description |
|---|---|
|
|
|
Number of workers. For Dask, this also selects the Dask backend when |
|
Number of detection time steps per chunk. |
|
Compatibility option retained from the former chunk-merging interface. Gather-then-Link does not require overlapping chunks. |
|
Xarray engine: |
Simple supports serial, threaded Dask detection, and MPI detection. Dask and MPI workers return raw detections, which are sorted by time and linked once. Hodges supports serial execution, including serial chunked detection followed by one MGE linking pass. HEALPix supports serial execution. Selecting Dask or MPI for Hodges or HEALPix raises NotImplementedError.
Hodges and HEALPix linking parameters
Option |
Description |
|---|---|
|
Minimum number of grid points in a thresholded object. |
|
Number of points in the spatial boundary taper. |
|
Direction and displacement-magnitude weights in the MGE cost function. |
|
Maximum displacement in degrees before regional adjustment. |
|
Smoothness or phantom-point penalty. |
|
Maximum number of MGE forward/backward passes. |
|
Minimum number of time steps retained by |
|
Maximum number of consecutive missing frames. |
|
TRACK-style regional |
|
JSON rows of |
|
TRACK-style adaptive-smoothness file. |
|
JSON |
stormtracker sample
Samples a variable from an Xarray-readable dataset at existing track coordinates. The command reads and writes JSON track files.
stormtracker sample \
-i tracks.json \
-d precipitation.nc \
-v pr \
-o tracks_with_pr.json \
-m mean \
-r 500
Option |
Description |
|---|---|
|
Input JSON track file. |
|
Dataset containing the sampled variable. |
|
Variable name in the dataset. |
|
Output JSON track file. |
|
|
|
Radius in kilometres for |
|
Output variable name stored in the track data. |
|
Optional Xarray input engine. |
For radius methods, candidate grid cells are selected by a latitude-longitude bounding box and retained when their great-circle distance is within the requested radius.
stormtracker compare
Matches comparison tracks to reference tracks using temporal overlap and mean great-circle separation. Input files are selected by extension: .json for JSON and .txt or .dat for IMILAST.
stormtracker compare \
--ref era5.json \
--comp model.json \
--max-dist 200 \
--min-overlap 0.1 \
--json
Option |
Description |
|---|---|
|
Reference track file. |
|
Comparison track file. |
|
Maximum mean geodetic separation in kilometres; default |
|
Minimum overlap ratio, defined as |
|
Print a JSON mapping from comparison track identifier to reference track identifier. |
|
Write the matched subset of comparison tracks as JSON. |
Each comparison track is assigned to the admissible reference track with the smallest mean separation over concurrent time steps. This does not enforce one-to-one matching between the two track sets.
stormtracker convert
Converts track files and generates the HTML track explorer.
# IMILAST to JSON
stormtracker convert -i tracks.txt -o tracks.json -f imilast -F json
# Standalone HTML explorer
stormtracker convert -i tracks.json -o explorer.html -f json -F html
# HTML plus a separate JavaScript data file
stormtracker convert -i tracks.json -o explorer.html -f json -F html --split
Option |
Description |
|---|---|
|
Input path. |
|
Output path. |
|
|
|
|
|
Override inferred track type with |
|
For HTML output, place track data in a separate |