Withdraw experimental public model; keep stable release only
Browse files
README.md
CHANGED
|
@@ -7,531 +7,53 @@ tags:
|
|
| 7 |
- causal-inference
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# Trackformer 1.
|
| 11 |
|
| 12 |
-
Trackformer 1.
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
leads through +120 h.
|
| 16 |
|
| 17 |
-
This is
|
| 18 |
-
|
| 19 |
-
safety-critical decisions.
|
| 20 |
-
|
| 21 |
-
## Release Highlights
|
| 22 |
-
|
| 23 |
-
- A whole western-Pacific route state with land, coastline, terrain, and
|
| 24 |
-
ocean-context features.
|
| 25 |
-
- A causal intensity and structure head for maximum wind, pressure, RMW, and
|
| 26 |
-
quadrant wind radii.
|
| 27 |
-
- Current and lagged atmospheric analysis plus SST context, nearby-storm
|
| 28 |
-
context, and static geography.
|
| 29 |
-
- Validation-gated calibration and storm-disjoint chronological evaluation.
|
| 30 |
-
- Native PyTorch and joblib artifacts in a GitHub Release and the Hugging Face
|
| 31 |
-
model repository.
|
| 32 |
-
|
| 33 |
-
The public release name is **Trackformer 1.2**. The internal experiment history
|
| 34 |
-
is intentionally not used as the public product name.
|
| 35 |
|
| 36 |
## Availability
|
| 37 |
|
| 38 |
-
- [GitHub
|
| 39 |
-
- [Hugging Face model repository](https://huggingface.co/euler314/typhoon-predict)
|
| 40 |
- [Live interactive demo](https://yu314-coder.github.io/typhoon-tracks.html)
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
Use the live demo for the interactive route and intensity presentation. Use
|
| 45 |
-
the reproducible benchmark chart for model comparison:
|
| 46 |
-
|
| 47 |
-
- [Interactive live demo](https://yu314-coder.github.io/typhoon-tracks.html)
|
| 48 |
-
- [Matched-100 benchmark chart](paper/trackformer_1_2_vs_1_1_matched100_mae.png)
|
| 49 |
-
- [Exact benchmark JSON](paper/trackformer_1_2_vs_1_1_matched100_metrics.json)
|
| 50 |
-
|
| 51 |
-
The chart has separate panels for track error, +120 h intensity/structure
|
| 52 |
-
error, all-lead intensity/structure error, and relative +120 h change. Values
|
| 53 |
-
are printed to three decimals and use the same 100 storms, issue times, and
|
| 54 |
-
causal input boundary. It is a benchmark showcase, not a selected best-case
|
| 55 |
-
storm display.
|
| 56 |
-
|
| 57 |
-
The public package contains only the Trackformer route/intensity model. No
|
| 58 |
-
gridded weather-field generator or official forecast product is included as
|
| 59 |
-
part of the model package. The model weights are distributed as the release
|
| 60 |
-
archive rather than committed into the Git history.
|
| 61 |
-
|
| 62 |
-
## What Changed
|
| 63 |
-
|
| 64 |
-
Trackformer 1.2 keeps the causal route design and adds a promoted
|
| 65 |
-
land/ocean-context intensity candidate. The structure head uses pooled
|
| 66 |
-
log-radius groups, lead-wise residual calibration, non-negative radius
|
| 67 |
-
constraints, and a validation-selected ocean-availability gate. The route and
|
| 68 |
-
intensity components are packaged together so the same release can expose the
|
| 69 |
-
forecast track and the surrounding storm structure.
|
| 70 |
-
|
| 71 |
-
The release deliberately excludes the rejected exploratory multi-variant
|
| 72 |
-
ensemble. It is not used to select a favorable result after looking at the
|
| 73 |
-
test cases.
|
| 74 |
-
|
| 75 |
-
## Data Boundary
|
| 76 |
-
|
| 77 |
-
The model input at forecast issue time is limited to information available at
|
| 78 |
-
that time or earlier:
|
| 79 |
-
|
| 80 |
-
- observed IBTrACS history;
|
| 81 |
-
- route atmospheric analysis at t0, -6 h, and -12 h;
|
| 82 |
-
- storm-centred atmospheric patches at t0, -12 h, and -24 h;
|
| 83 |
-
- current and lagged sea-surface-temperature summaries;
|
| 84 |
-
- causal nearby-storm and basin/global pressure context;
|
| 85 |
-
- static land/sea, coastline, terrain, land-cover, and location features.
|
| 86 |
-
|
| 87 |
-
It does **not** use JMA, JTWC, ECMWF, GFS, GEFS, or another agency's forecast
|
| 88 |
-
track or positive-lead weather field as an input. Later observations and
|
| 89 |
-
best-track labels are used only after the forecast is frozen for verification.
|
| 90 |
-
|
| 91 |
-
## Inputs
|
| 92 |
-
|
| 93 |
-
Trackformer 1.2 keeps the public causal input families used by Trackformer 1.1;
|
| 94 |
-
the route context is expanded across the western Pacific and includes the
|
| 95 |
-
static land/ocean features needed near coastlines. The public tensor contract
|
| 96 |
-
is:
|
| 97 |
-
|
| 98 |
-
| Input | Shape or content | Boundary |
|
| 99 |
-
|---|---|---|
|
| 100 |
-
| Observed track and intensity history | `9 x 54` track window | issue time and earlier |
|
| 101 |
-
| Current storm-centred analysis | `4 x 17 x 17` | issue-time analysis |
|
| 102 |
-
| Older analysis context | `8 x 17 x 17` | -12 h and -24 h analysis |
|
| 103 |
-
| Whole-Pacific route state | `3 x 7 x 25 x 61` | route analysis at `t0`, `t-6 h`, `t-12 h` |
|
| 104 |
-
| SST, nearby systems, and pressure context | causal summaries and spatial features | issue time and earlier |
|
| 105 |
-
| Geography | land/sea, coastline, terrain, land-cover, and location features | static |
|
| 106 |
-
|
| 107 |
-
The data families are observations, analyses, reanalysis summaries, and static
|
| 108 |
-
geography. They are not agency forecast products. Missing radius labels are
|
| 109 |
-
masked rather than converted to zero.
|
| 110 |
-
|
| 111 |
-
## Raw Data Checklist
|
| 112 |
-
|
| 113 |
-
The public Python wrapper consumes a prepared issue packet; it is intentionally
|
| 114 |
-
not a raw-data downloader. To build that packet for an existing storm, prepare
|
| 115 |
-
the following data using an observation or analysis timestamp no later than
|
| 116 |
-
`t0`:
|
| 117 |
-
|
| 118 |
-
| Data family | Required content | Used for |
|
| 119 |
-
|---|---|---|
|
| 120 |
-
| Target and nearby storms | target position/intensity history, nearby observed storm positions and maximum winds, timestamps, and optional radius labels | track window, motion, interaction, and structure anchor |
|
| 121 |
-
| Atmospheric analysis | physical SLP/PRMSL and 500-hPa geopotential at `t0`, `t-6 h`, `t-12 h` on the `90–240E`, `0–60N`, 2.5-degree route grid | route field and synoptic context |
|
| 122 |
-
| Steering analysis | `[H500, U850, V850, U500, V500, U200, V200]` current and previous analysis fields with latitude/longitude grids | Pacific-High, ridge, shear, and steering context |
|
| 123 |
-
| Storm-centred analysis | the four-channel decoded DLM4 patches at `t0`, `t-12 h`, `t-24 h` | causal wind, pressure, and structure features |
|
| 124 |
-
| Sea surface temperature | one-channel storm-centred SST patches at `t0`, `t-12 h`, `t-24 h` plus availability masks | intensity and radius features |
|
| 125 |
-
| Ocean calibration (optional) | 22-value summaries for current, `t-12 h`, and `t-24 h` OHC/D26/D20 conditions | separate optional structure calibration |
|
| 126 |
-
| Static geography | land-sea mask, coast distance, terrain/land-cover samples, and the released geographic grids | landfall and coastal behavior |
|
| 127 |
-
|
| 128 |
-
Use the same variable units and channel order used during training. Preserve a
|
| 129 |
-
validity mask for every missing analysis, SST, ocean, or context block. Do not
|
| 130 |
-
fill a missing future frame with a later analysis, and do not substitute an
|
| 131 |
-
agency forecast for an unavailable analysis. IBTrACS best-track rows after
|
| 132 |
-
`t0` belong in the verification file, never in the input packet.
|
| 133 |
|
| 134 |
-
|
| 135 |
-
and geography inputs, but provide a candidate location and a clearly labeled
|
| 136 |
-
persistence/trend history. This is a candidate forecast only: Trackformer 1.2
|
| 137 |
-
does not autonomously search the whole basin for genesis without a candidate
|
| 138 |
-
seed or a separately trained genesis head.
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
|
|
|
|
|
|
| 144 |
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
this order: **t0, t-6 h, t-12 h**. It returns six channels in paired order:
|
| 149 |
-
|
| 150 |
-
```text
|
| 151 |
-
[SLP_t0, H500_t0, SLP_t-6, H500_t-6, SLP_t-12, H500_t-12]
|
| 152 |
-
```
|
| 153 |
-
|
| 154 |
-
The trained `[25, 61]` grid is not `100–190E` at 1.5 degrees. It is:
|
| 155 |
-
|
| 156 |
-
```text
|
| 157 |
-
latitude: 60.0, 57.5, ..., 0.0 N (25 points, descending)
|
| 158 |
-
longitude: 90.0, 92.5, ..., 240.0 E (61 points, ascending)
|
| 159 |
-
```
|
| 160 |
-
|
| 161 |
-
The exported constants `ROUTE_LATITUDES` and `ROUTE_LONGITUDES` contain these
|
| 162 |
-
vectors. The route field is an analysis-only input: use the latest analysis
|
| 163 |
-
available at the issue time and its two six-hour predecessors, never a
|
| 164 |
-
positive-lead forecast field.
|
| 165 |
-
|
| 166 |
-
### System Features
|
| 167 |
-
|
| 168 |
-
`build_route_system_features` expects the seven channels in this exact order:
|
| 169 |
-
|
| 170 |
-
```text
|
| 171 |
-
[H500, U850, V850, U500, V500, U200, V200]
|
| 172 |
-
```
|
| 173 |
-
|
| 174 |
-
The same order is available as `ROUTE_SYSTEM_CHANNELS`. If named arrays are
|
| 175 |
-
used, pass `channel_names=ROUTE_SYSTEM_CHANNELS`; the constructor raises an
|
| 176 |
-
error for a permutation instead of silently assigning the wrong Pacific-High
|
| 177 |
-
or steering descriptors.
|
| 178 |
-
|
| 179 |
-
### Structure and Intensity History
|
| 180 |
-
|
| 181 |
-
The storm-centred structure patches and ocean summaries use a separate timing
|
| 182 |
-
contract: **t0, t-12 h, t-24 h**. This is why the route field and structure
|
| 183 |
-
patches have different lag spacing. The `causal_features` vector combines
|
| 184 |
-
those patches with the issue-time-or-earlier track, nearby systems, basin and
|
| 185 |
-
global analysis context, SST/ocean summaries, and static geography.
|
| 186 |
-
|
| 187 |
-
### Static Geography Source
|
| 188 |
-
|
| 189 |
-
The eight published geography channels are derived from the packaged static
|
| 190 |
-
land/sea map, not downloaded as a forecast. The source is **Natural Earth 50m
|
| 191 |
-
land plus ESA WorldCover 10m 2021 v200**. The route-query map is sampled on a
|
| 192 |
-
global **0.25-degree grid** (`-60..70N`, `0..360E`, shape `521 x 1441`), with
|
| 193 |
-
WorldCover sampled remotely at `48 x 48` per 3 x 3 degree tile before the
|
| 194 |
-
derived coastline, multiscale land-fraction, land-buffer, and local-variance
|
| 195 |
-
features are computed. `land_fraction_75/150/300km` are derived features from
|
| 196 |
-
this same static map; they are not future weather fields.
|
| 197 |
|
| 198 |
## Outputs
|
| 199 |
|
| 200 |
-
For
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
| Track latitude and longitude | `20 x 2`, degrees |
|
| 205 |
-
| Maximum sustained wind | knots, 1-minute estimate |
|
| 206 |
-
| Central pressure | hPa |
|
| 207 |
-
| Radius of maximum wind | kilometres |
|
| 208 |
-
| R34, R50, and R64 | four quadrant radii in kilometres |
|
| 209 |
-
|
| 210 |
-
Radius outputs are non-negative and the structure head enforces R34 >= R50 >=
|
| 211 |
-
R64 for each quadrant.
|
| 212 |
-
|
| 213 |
-
## Held-Out Comparison
|
| 214 |
-
|
| 215 |
-
The canonical comparison uses the same 100 common storms, the same earliest
|
| 216 |
-
available test initialization per storm, the same +6 h through +120 h leads,
|
| 217 |
-
and the same issue-time causal boundary. The split remains chronological and
|
| 218 |
-
storm-disjoint:
|
| 219 |
-
|
| 220 |
-
- training: storms through 2015;
|
| 221 |
-
- validation: storms from 2016 through 2019;
|
| 222 |
-
- test: storms from 2020 onward, held out until scoring.
|
| 223 |
-
|
| 224 |
-
The earlier README comparison mixed a different release-manifest aggregate with
|
| 225 |
-
this matched-storm benchmark. The chart below is the canonical comparison;
|
| 226 |
-
lower error is better and every value comes from the same matched 100-storm
|
| 227 |
-
evaluation. Official forecast products are excluded from model inputs.
|
| 228 |
-
|
| 229 |
-

|
| 230 |
-
|
| 231 |
-
The source values and input policy are recorded in
|
| 232 |
-
[paper/trackformer_1_2_vs_1_1_matched100_metrics.json](paper/trackformer_1_2_vs_1_1_matched100_metrics.json).
|
| 233 |
-
|
| 234 |
-
| Metric | Trackformer 1.1 | Trackformer 1.2 | Better in this benchmark |
|
| 235 |
-
|---|---:|---:|---|
|
| 236 |
-
| Mean track error, all leads (km) | 802.406 | 398.419 | Trackformer 1.2 |
|
| 237 |
-
| Mean track error, +120 h (km) | 1,604.259 | 808.607 | Trackformer 1.2 |
|
| 238 |
-
| Wind MAE, +120 h (kt) | 20.657 | 18.509 | Trackformer 1.2 |
|
| 239 |
-
| Pressure MAE, +120 h (hPa) | 14.932 | 13.637 | Trackformer 1.2 |
|
| 240 |
-
| RMW MAE, +120 h (km) | 33.016 | 33.035 | Trackformer 1.1, marginally |
|
| 241 |
-
| R34 MAE, +120 h (km) | 69.357 | 76.112 | Trackformer 1.1 |
|
| 242 |
-
| Wind MAE, all leads (kt) | 18.121 | 17.638 | Trackformer 1.2 |
|
| 243 |
-
| Pressure MAE, all leads (hPa) | 13.044 | 12.755 | Trackformer 1.2 |
|
| 244 |
-
| RMW MAE, all leads (km) | 26.396 | 26.996 | Trackformer 1.1 |
|
| 245 |
-
| R34 MAE, all leads (km) | 57.253 | 57.079 | Trackformer 1.2 |
|
| 246 |
-
|
| 247 |
-
This benchmark supports a strong track improvement and lower wind/pressure
|
| 248 |
-
error. It does **not** support the claim that Trackformer 1.2 is better on
|
| 249 |
-
every radius metric; RMW remains slightly worse and +120 h R34 is worse. Those
|
| 250 |
-
limitations are kept visible instead of selecting a more favorable cohort.
|
| 251 |
-
|
| 252 |
-
## Release-Candidate Metrics
|
| 253 |
-
|
| 254 |
-
For completeness, the released land/ocean-context head was also compared with
|
| 255 |
-
its frozen causal baseline on 9,994 untouched test windows at +120 h. Lower is
|
| 256 |
-
better.
|
| 257 |
-
|
| 258 |
-
| Metric at +120 h | Frozen baseline | Trackformer 1.2 candidate |
|
| 259 |
-
|---|---:|---:|
|
| 260 |
-
| Maximum wind MAE (kt) | 19.876 | 19.618 |
|
| 261 |
-
| Central pressure MAE (hPa) | 13.634 | 13.519 |
|
| 262 |
-
| Mean radius MAE (km) | 28.952 | 28.944 |
|
| 263 |
-
| R34 MAE (km) | 46.672 | 46.672 |
|
| 264 |
-
| R50 MAE (km) | 25.417 | 25.417 |
|
| 265 |
-
| R64 MAE (km) | 14.767 | 14.742 |
|
| 266 |
-
|
| 267 |
-
The candidate improves maximum wind, pressure, mean radius, and R64 at +120 h,
|
| 268 |
-
while R34 and R50 are unchanged at the displayed precision. This is a separate
|
| 269 |
-
candidate-versus-baseline diagnostic and must not be substituted for the
|
| 270 |
-
matched 1.1 comparison above.
|
| 271 |
-
|
| 272 |
-
## Weight Bundle
|
| 273 |
-
|
| 274 |
-
The release archive contains:
|
| 275 |
-
|
| 276 |
-
```text
|
| 277 |
-
models/trackformer_1_2/
|
| 278 |
-
manifest.json
|
| 279 |
-
trackformer_1_2_route_seed0.pt
|
| 280 |
-
trackformer_1_2_route_seed1.pt
|
| 281 |
-
trackformer_1_2_intensity_seed0.pt
|
| 282 |
-
trackformer_1_2_intensity_seed1.pt
|
| 283 |
-
trackformer_1_2_ocean_structure.joblib
|
| 284 |
-
trackformer_1_2_feature_stats.npz
|
| 285 |
-
trackformer_1_2_route_context_stats.npz
|
| 286 |
-
trackformer_1_2_track_stats.npz
|
| 287 |
-
trackformer_1_2_system_context_stats.npz
|
| 288 |
-
```
|
| 289 |
-
|
| 290 |
-
The bundle uses native PyTorch checkpoints, NumPy statistics, and a joblib
|
| 291 |
-
calibration artifact. GGUF is not an appropriate interchange format for this
|
| 292 |
-
CNN/Transformer weather model.
|
| 293 |
-
|
| 294 |
-
Download the archive from the [Trackformer 1.2 release](https://github.com/yu314-coder/typhoon-predict/releases/latest),
|
| 295 |
-
verify its SHA-256 value shown in the release notes, and extract it outside the
|
| 296 |
-
Git checkout.
|
| 297 |
-
|
| 298 |
-
## Python Inference
|
| 299 |
-
|
| 300 |
-
The repository includes a checkpoint-compatible inference module in
|
| 301 |
-
[`trackformer_1_2.py`](trackformer_1_2.py). It loads both released neural
|
| 302 |
-
seeds and averages them as one Trackformer 1.2 model. The same module now
|
| 303 |
-
publishes the feature constructors used to build the tensor contracts, rather
|
| 304 |
-
than requiring callers to reverse-engineer the training code. Install the
|
| 305 |
-
runtime dependencies with:
|
| 306 |
-
|
| 307 |
-
```bash
|
| 308 |
-
python -m pip install -r requirements.txt
|
| 309 |
-
```
|
| 310 |
-
|
| 311 |
-
### Forecasting Workflow
|
| 312 |
-
|
| 313 |
-
The released model is a route/intensity forecaster for a storm that already
|
| 314 |
-
has an issue-time candidate location and observed or analyzed history. It can
|
| 315 |
-
forecast an existing tropical cyclone from the latest issue time. It does not
|
| 316 |
-
contain a separate genesis detector, so it cannot discover a cyclone from an
|
| 317 |
-
empty basin by itself. For a pre-genesis candidate, provide a candidate
|
| 318 |
-
location, a causal pseudo-history, and a clearly labeled fallback structure
|
| 319 |
-
anchor; treat that result as research output, not an autonomous genesis
|
| 320 |
-
alert.
|
| 321 |
-
|
| 322 |
-
1. Download the release archive or let `from_pretrained()` fetch the Hugging
|
| 323 |
-
Face bundle. The archive includes the current `models/trackformer_1_2/`
|
| 324 |
-
weights and train-only normalization statistics.
|
| 325 |
-
2. Choose an issue time `t0`. Every input must be available at `t0` or earlier.
|
| 326 |
-
Do not put JMA, JTWC, ECMWF, GFS, GEFS, DeepMind, or any other positive-lead
|
| 327 |
-
forecast into the packet.
|
| 328 |
-
3. Build the route group. It requires `field [B,6,25,61]`, raw `context
|
| 329 |
-
[B,647]`, and `base_position [B,20,2]`. Build `field` with
|
| 330 |
-
`prepare_route_field` from physical SLP/H500 analyses at `t0`, `t-6 h`,
|
| 331 |
-
and `t-12 h`. Build `context` from the published constructors and use the
|
| 332 |
-
causal incumbent route or the explicitly labeled kinematic fallback.
|
| 333 |
-
4. Build the intensity group when structure output is needed. It requires
|
| 334 |
-
`causal_features [B,1020]` and `anchor_structure [B,20,15]`. Construct the
|
| 335 |
-
feature vector from the 9x54 observed track window, decoded DLM4 analysis
|
| 336 |
-
patches at `t0`, `t-12 h`, `t-24 h`, SST patches at those same times, six
|
| 337 |
-
static terrain samples, nearby-storm/basin/global analysis context, and
|
| 338 |
-
issue-time geography. Use `build_causal_anchor_structure` only as a labeled
|
| 339 |
-
fallback when the frozen incumbent anchor is unavailable.
|
| 340 |
-
5. Optionally add `ocean_features [B,66]` from `build_ocean_features` using
|
| 341 |
-
`[B,3,22]` current, `-12 h`, and `-24 h` ocean summaries plus
|
| 342 |
-
`ocean_available [B]`. This applies the separately validated ocean
|
| 343 |
-
calibration; it is not silently stacked onto the neural intensity output.
|
| 344 |
-
6. Save the groups as one `.npz` packet and run the example command below.
|
| 345 |
-
The script writes route positions, converted latitude/longitude when an
|
| 346 |
-
issue location is supplied, intensity structure, lead hours, and optional
|
| 347 |
-
ocean-calibration results to a compressed `.npz` forecast file.
|
| 348 |
-
|
| 349 |
-
The minimum packet keys are:
|
| 350 |
-
|
| 351 |
-
| Forecast part | Required keys | Output |
|
| 352 |
-
|---|---|---|
|
| 353 |
-
| Route | `field`, `context`, `base_position` | 20 positions at +6 h to +120 h |
|
| 354 |
-
| Intensity/structure | `causal_features`, `anchor_structure` | wind, pressure, RMW, R34/R50/R64 |
|
| 355 |
-
| Optional ocean calibration | `ocean_features`, `ocean_available` | calibrated structure beside the neural result |
|
| 356 |
-
|
| 357 |
-
The public wrapper intentionally does not download raw weather data. Source
|
| 358 |
-
preprocessing must preserve issue-time timestamps, units, missing-data masks,
|
| 359 |
-
and the tensor contracts above. A valid packet for a historical hindcast must
|
| 360 |
-
also exclude all observations after its chosen issue time; later IBTrACS rows
|
| 361 |
-
are verification targets only.
|
| 362 |
-
|
| 363 |
-
Load from an extracted GitHub Release bundle:
|
| 364 |
-
|
| 365 |
-
```python
|
| 366 |
-
import numpy as np
|
| 367 |
-
from trackformer_1_2 import (
|
| 368 |
-
Trackformer12, build_base_position, build_route_context,
|
| 369 |
-
build_nearby_interaction_features, build_route_geography_features,
|
| 370 |
-
build_route_kinematic_features, build_route_system_features,
|
| 371 |
-
build_synoptic_features, local_position_to_latlon, prepare_route_field,
|
| 372 |
-
)
|
| 373 |
-
|
| 374 |
-
model = Trackformer12.from_pretrained(
|
| 375 |
-
"/path/to/trackformer_1_2/models/trackformer_1_2",
|
| 376 |
-
device="cpu", # use "mps" on Apple Silicon or "cuda" on NVIDIA
|
| 377 |
-
)
|
| 378 |
-
|
| 379 |
-
# These arrays must be constructed from issue-time/current and earlier data.
|
| 380 |
-
# build_route_context returns the raw 647-feature vector; the loader applies
|
| 381 |
-
# the released train-only route normalization automatically.
|
| 382 |
-
context = build_route_context(
|
| 383 |
-
synoptic_features, system_features, interaction_features,
|
| 384 |
-
geography_features, kinematic_features, base_route_100km,
|
| 385 |
-
)
|
| 386 |
-
base_position = build_base_position(base_route_100km)
|
| 387 |
-
route = model.predict_route(field, context, base_position)
|
| 388 |
-
intensity = model.predict_intensity(causal_features, anchor_structure)
|
| 389 |
-
|
| 390 |
-
latitude, longitude = local_position_to_latlon(
|
| 391 |
-
route["position_100km"], issue_latitude, issue_longitude
|
| 392 |
-
)
|
| 393 |
-
```
|
| 394 |
-
|
| 395 |
-
`Trackformer12.from_pretrained()` can also download the same files from the
|
| 396 |
-
[Hugging Face model repository](https://huggingface.co/euler314/typhoon-predict)
|
| 397 |
-
when `model_root` is omitted:
|
| 398 |
-
|
| 399 |
-
```python
|
| 400 |
-
from trackformer_1_2 import Trackformer12
|
| 401 |
-
model = Trackformer12.from_pretrained(device="cuda")
|
| 402 |
-
```
|
| 403 |
-
|
| 404 |
-
The exact public tensor contract is:
|
| 405 |
-
|
| 406 |
-
| API input | Shape | Meaning |
|
| 407 |
-
|---|---:|---|
|
| 408 |
-
| `field` | `[B, 6, 25, 61]` | normalized SLP/H500 grids ordered as `t0,-6 h,-12 h` pairs |
|
| 409 |
-
| `context` | `[B, 647]` | causal whole-Pacific context used by the released route checkpoint |
|
| 410 |
-
| `base_position` | `[B, 20, 2]` | cumulative local 100-km displacement before route correction |
|
| 411 |
-
| `causal_features` | `[B, 1020]` | exact pre-residual causal structure features |
|
| 412 |
-
| `anchor_structure` | `[B, 20, 15]` | frozen causal anchor: vmax, pressure, RMW, R34/R50/R64 quadrants |
|
| 413 |
-
| `ocean_features` | `[B, 66]` | current/-12 h/-24 h OHC/D26/D20 summary for the optional calibration |
|
| 414 |
-
|
| 415 |
-
### Published Feature Constructors
|
| 416 |
-
|
| 417 |
-
The constructors below are the supported bridge from causal source arrays to
|
| 418 |
-
the tensor contract. Route analysis frames are `t0, t-6 h, t-12 h`; structure
|
| 419 |
-
patches and ocean summaries are `t0, t-12 h, t-24 h`; and labels after the
|
| 420 |
-
issue time are never accepted as inputs.
|
| 421 |
-
|
| 422 |
-
| Constructor | Output | Purpose |
|
| 423 |
-
|---|---:|---|
|
| 424 |
-
| `prepare_route_field(slp, hgt500)` | `[B,6,25,61]` | normalize physical PRMSL/H500 analysis grids |
|
| 425 |
-
| `build_synoptic_features(...)` | `[B,270]` | causal low-center and 500-hPa ridge descriptors |
|
| 426 |
-
| `build_route_system_features(...)` | `[B,46]` | causal Pacific-High, steering, and local analysis context |
|
| 427 |
-
| `build_nearby_interaction_features(...)` | `[B,16]` | causal nearby observed-storm interaction context |
|
| 428 |
-
| `build_route_geography_features(...)` | `[B,224]` | land, coast, buffer, and terrain values along a route |
|
| 429 |
-
| `build_route_kinematic_features(...)` | `[B,11]` | issue-time position, heading, speed, turn, and acceleration |
|
| 430 |
-
| `build_route_context(...)` | `[B,647]` | concatenate the exact route context |
|
| 431 |
-
| `build_causal_structure_features(...)` | `[B,1020]` | construct the full wind/pressure/RMW/radius feature vector |
|
| 432 |
-
| `build_intensity_context_features(...)` | `[B,183]` | concatenate basin, nearby-system, and global context |
|
| 433 |
-
| `build_ocean_features(summary)` | `[B,66]` | flatten current/-12 h/-24 h 22-value ocean summaries |
|
| 434 |
-
| `build_terrain_samples(...)` | `[B,168]` | six causal land/sea samples used by structure |
|
| 435 |
-
|
| 436 |
-
The model bundle also contains `trackformer_1_2_route_context_stats.npz`,
|
| 437 |
-
`trackformer_1_2_track_stats.npz`, and
|
| 438 |
-
`trackformer_1_2_system_context_stats.npz`. `Trackformer12.predict_route`
|
| 439 |
-
applies the route normalization automatically when passed the raw output of
|
| 440 |
-
`build_route_context`.
|
| 441 |
-
|
| 442 |
-
For example, the route-side construction is:
|
| 443 |
-
|
| 444 |
-
```python
|
| 445 |
-
stats = model.system_context_stats
|
| 446 |
-
system = build_route_system_features(
|
| 447 |
-
ncep_current_7ch, ncep_previous_7ch, ncep_lat, ncep_lon,
|
| 448 |
-
issue_latitude, issue_longitude, feature_mean=stats["system_mean"],
|
| 449 |
-
feature_std=stats["system_std"],
|
| 450 |
-
channel_names=("hgt500", "uwnd850", "vwnd850", "uwnd500", "vwnd500", "uwnd200", "vwnd200"),
|
| 451 |
-
)
|
| 452 |
-
interaction = build_nearby_interaction_features(
|
| 453 |
-
nearby_latitude, nearby_longitude, nearby_vmax, nearby_age_hours,
|
| 454 |
-
issue_latitude, issue_longitude,
|
| 455 |
-
feature_mean=stats["interaction_mean"],
|
| 456 |
-
feature_std=stats["interaction_std"],
|
| 457 |
-
)
|
| 458 |
-
base_position = build_base_position(base_route_100km)
|
| 459 |
-
synoptic = build_synoptic_features(
|
| 460 |
-
slp_t0_tminus6_tminus12, h500_t0_tminus6_tminus12,
|
| 461 |
-
pressure_lat, pressure_lon, issue_latitude, issue_longitude,
|
| 462 |
-
)
|
| 463 |
-
geography = build_route_geography_features(
|
| 464 |
-
base_position, issue_latitude, issue_longitude,
|
| 465 |
-
terrain_lat, terrain_lon, terrain_features, terrain_feature_names,
|
| 466 |
-
)
|
| 467 |
-
kinematic = build_route_kinematic_features(
|
| 468 |
-
current_motion_100km, previous_motion_100km,
|
| 469 |
-
issue_latitude, issue_longitude,
|
| 470 |
-
)
|
| 471 |
-
context = build_route_context(
|
| 472 |
-
synoptic, system, interaction, geography, kinematic, base_route_100km,
|
| 473 |
-
)
|
| 474 |
-
route = model.predict_route(field, context, base_position)
|
| 475 |
-
```
|
| 476 |
-
|
| 477 |
-
For intensity, call `build_causal_structure_features(...)` with the three
|
| 478 |
-
decoded DLM4 analysis patches, three SST patches, the six-point terrain sample,
|
| 479 |
-
and the 183-feature result of `build_intensity_context_features(...)`. Pass
|
| 480 |
-
`model.track_mean` and `model.track_std` so the physical observed track is
|
| 481 |
-
encoded exactly. Then call `model.predict_intensity(features, anchor)`. The
|
| 482 |
-
`build_causal_anchor_structure(observed_structure)` helper is a causal
|
| 483 |
-
persistence/trend fallback only; it is not the frozen incumbent anchor and
|
| 484 |
-
must be labeled as such in a benchmark.
|
| 485 |
-
|
| 486 |
-
### Frozen Upstream Inputs
|
| 487 |
-
|
| 488 |
-
Two inputs are frozen upstream members rather than standalone public neural
|
| 489 |
-
heads: the route model's incumbent route and the intensity model's 20-lead
|
| 490 |
-
structure anchor. The exact incumbent `base_position` arrays are row-aligned
|
| 491 |
-
to the private training/evaluation issue-window archive, so there is no
|
| 492 |
-
universal public dump that can be safely applied to an arbitrary storm. If an
|
| 493 |
-
issue packet contains the exact causal array, pass it directly. Otherwise,
|
| 494 |
-
`build_kinematic_base_position` and `build_causal_anchor_structure` provide
|
| 495 |
-
explicit persistence/trend fallbacks. These fallbacks do not reproduce the
|
| 496 |
-
incumbent members and must be labeled as fallback inputs in any benchmark;
|
| 497 |
-
they are not a way to select a favorable result.
|
| 498 |
-
|
| 499 |
-
Use `prepare_route_field(slp, hgt500, ...)` when the three SLP and 500-hPa
|
| 500 |
-
height grids are still in physical units. Use
|
| 501 |
-
`examples/predict_trackformer_1_2.py` to run an `.npz` issue packet:
|
| 502 |
-
|
| 503 |
-
```bash
|
| 504 |
-
python examples/predict_trackformer_1_2.py \
|
| 505 |
-
--input issue_packet.npz \
|
| 506 |
-
--output forecast.npz \
|
| 507 |
-
--model-root /path/to/models/trackformer_1_2
|
| 508 |
-
```
|
| 509 |
-
|
| 510 |
-
The optional `predict_ocean_structure(...)` method returns the separately
|
| 511 |
-
validated causal OHC/D26/D20 calibration around the frozen incumbent anchor. It
|
| 512 |
-
is intentionally returned as a separate result and is not silently stacked
|
| 513 |
-
on the neural intensity residual head; stacking them would be a new,
|
| 514 |
-
unvalidated model. The wrapper does not include a raw-data downloader because
|
| 515 |
-
the released feature tensors require source-specific preprocessing and
|
| 516 |
-
quality/availability masks. This keeps the issue-time boundary auditable and
|
| 517 |
-
prevents future or official forecast fields from entering by accident.
|
| 518 |
-
|
| 519 |
-
## Historical Releases
|
| 520 |
-
|
| 521 |
-
[Trackformer 1.1](https://github.com/yu314-coder/typhoon-predict/releases/tag/trackformer-1.1)
|
| 522 |
-
remains available as a historical baseline. It is not mixed into the
|
| 523 |
-
Trackformer 1.2 weights or ensemble.
|
| 524 |
|
| 525 |
-
##
|
| 526 |
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
calibrated operational warnings. Use official meteorological agencies for
|
| 531 |
-
real-world forecasts and warnings.
|
| 532 |
|
| 533 |
-
##
|
| 534 |
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
- causal-inference
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# Trackformer 1.1
|
| 11 |
|
| 12 |
+
Trackformer 1.1 is a causal tropical-cyclone route and intensity research
|
| 13 |
+
model. It predicts position, maximum sustained wind, central pressure, radius
|
| 14 |
+
of maximum wind, and R34/R50/R64 wind radii at six-hour leads through +120 h.
|
|
|
|
| 15 |
|
| 16 |
+
This is not an operational warning system. Do not use it for evacuation,
|
| 17 |
+
aviation, maritime, emergency-management, or other safety-critical decisions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Availability
|
| 20 |
|
| 21 |
+
- [GitHub release: Trackformer 1.1](https://github.com/yu314-coder/typhoon-predict/releases/tag/trackformer-1.1)
|
|
|
|
| 22 |
- [Live interactive demo](https://yu314-coder.github.io/typhoon-tracks.html)
|
| 23 |
|
| 24 |
+
The released model files are under `models/trackformer_1_1/`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
## Causal Input Boundary
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
Inputs are restricted to data available at the forecast issue time or earlier:
|
| 29 |
|
| 30 |
+
- observed IBTrACS track and intensity history;
|
| 31 |
+
- atmospheric analysis fields available at or before the issue time;
|
| 32 |
+
- causal nearby-storm and basin-context summaries;
|
| 33 |
+
- static geography and land/sea features in the prepared packet.
|
| 34 |
|
| 35 |
+
The model does not use JMA, JTWC, ECMWF, GFS, GEFS, DeepMind, or another
|
| 36 |
+
agency's forecast track or positive-lead weather field as an input. Later
|
| 37 |
+
observations and best-track labels are verification data only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
## Outputs
|
| 40 |
|
| 41 |
+
For 20 six-hour leads, the model returns track latitude/longitude, maximum
|
| 42 |
+
sustained wind, central pressure, radius of maximum wind, and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ibration, normalization
|
| 49 |
+
statistics, and seed checkpoints. The GitHub release archive is the
|
| 50 |
+
authoritative packaged-weight download.
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
## Usage
|
| 53 |
|
| 54 |
+
Install the pinned requirements, construct an issue packet using only the
|
| 55 |
+
causal inputs above, and use the included 1.1 prediction wrapper. Preserve
|
| 56 |
+
validity masks for missing radius or analysis values. Never substitute a later
|
| 57 |
+
observation or an official forecast for a missing input. Verify any saved
|
| 58 |
+
forecast against the later realized IBTrACS track only after the issue-time
|
| 59 |
+
forecast has been frozen.
|