Skip to content

Add seasonal FBFM40 support (season argument) - #213

Merged
amarcozzi merged 1 commit into
mainfrom
209-fbfm40-seasonal-support
Aug 26, 2026
Merged

Add seasonal FBFM40 support (season argument)#213
amarcozzi merged 1 commit into
mainfrom
209-fbfm40-seasonal-support

Conversation

@amarcozzi

Copy link
Copy Markdown
Contributor

Summary

Closes #209. Adds a season argument to create_fuel_model_grid_from_landfire_fbfm40, exposing LANDFIRE Seasonal Fuels through the SDK. The regenerated v2 client already carries the season field and the 2025 seasonal vintage — this wires them into the public function.

Behavior

  • season accepts "ES" (early spring), "SP" (spring), "SU" (summer), "FA" (fall).
  • When season is set, the grid is fetched on demand from the LANDFIRE Product Service (LFPS) for that season, and version must be a seasonal vintage (e.g. "2025"). When omitted, the annual path is unchanged and version must be an annual vintage.
  • The API owns the coupling: it validates version↔season, checks LFPS coverage for the domain, and reads the projected season year from the live LFPS catalog. A mismatch or an uncovered domain surfaces as UnprocessableEntityException — the SDK does not duplicate that validation.
  • Grid.represented_year reflects the projected season year (e.g. 2025 + SP → 2026), populated on the pending grid at creation.

Tests

  • Offline: season and version are forwarded to the request body; an unknown season raises ValueError.
  • Live: a seasonal request against a domain inside the current spring coverage region returns a pending grid whose represented_year is 2026. The test reads represented_year off the pending grid rather than calling wait(), because grid completion submits a real, up-to-20-minute on-demand LFPS job. Seasonal Fuels is a moving pilot boundary served live, so the test skips (rather than fails) when LFPS is not serving that domain/season.

All eight FBFM40 tests pass against the live API; the annual path is unaffected.

Expose a season argument on create_fuel_model_grid_from_landfire_fbfm40
so callers can request LANDFIRE Seasonal Fuels (ES/SP/SU/FA) from the
LANDFIRE Product Service instead of the staged annual release. The
seasonal path requires a seasonal vintage (e.g. 2025); the annual path
is unchanged when season is omitted. The API validates the
version/season coupling and surfaces UnprocessableEntity on a mismatch
or when LFPS does not cover the domain.

Tests: offline coverage that season and version are forwarded and that an
unknown season raises; a live test that a seasonal request against a
covered domain returns a pending grid whose represented_year is the
projected season year (2025 + SP -> 2026). The live test reads
represented_year off the pending grid rather than waiting, since grid
completion submits a real on-demand LFPS job; it skips when LFPS is not
serving the domain/season.
@amarcozzi
amarcozzi merged commit f6c4307 into main Aug 26, 2026
3 checks passed
@amarcozzi
amarcozzi deleted the 209-fbfm40-seasonal-support branch August 26, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK: seasonal FBFM40 support (season argument for 2025+ seasonal versions)

1 participant