|
| 1 | +# Fire VASE / FireHull |
| 2 | + |
| 3 | +CubeDynamics treats FIRED fire events as spatiotemporal objects, not just a list of polygons or a one-off plot. The fire/VASE workflow turns daily perimeters into a time-stacked hull that can participate in the same cube-centered grammar used elsewhere in the library. |
| 4 | + |
| 5 | +## Core objects |
| 6 | + |
| 7 | +### `FireEventDaily` |
| 8 | + |
| 9 | +`FireEventDaily` is the canonical daily fire event object. |
| 10 | + |
| 11 | +It stores: |
| 12 | + |
| 13 | +- `event_id` |
| 14 | +- `gdf` with daily perimeter geometry |
| 15 | +- `t0` / `t1` |
| 16 | +- `centroid_lat` / `centroid_lon` |
| 17 | + |
| 18 | +Useful entry points: |
| 19 | + |
| 20 | +```python |
| 21 | +from cubedynamics.fire_time_hull import FireEventDaily |
| 22 | + |
| 23 | +event = FireEventDaily.example() |
| 24 | +event = FireEventDaily.from_fired(fired_daily, event_id=12345) |
| 25 | +``` |
| 26 | + |
| 27 | +### `FireHull` |
| 28 | + |
| 29 | +`FireHull` is the canonical fire-time hull / VASE object. |
| 30 | + |
| 31 | +It stores triangulated geometry and time metadata: |
| 32 | + |
| 33 | +- `verts_km` |
| 34 | +- `tris` |
| 35 | +- `t_days_vert` |
| 36 | +- `t_norm_vert` |
| 37 | +- `metrics` |
| 38 | + |
| 39 | +It exposes object methods aligned with CubeDynamics design principles: |
| 40 | + |
| 41 | +```python |
| 42 | +hull = event.to_hull() |
| 43 | +hull.metrics() |
| 44 | +hull.to_mesh() |
| 45 | +hull.to_cube(template_cube) |
| 46 | +hull.attach_environment(cube, variables=["vpd"]) |
| 47 | +hull.plot(color="vpd") |
| 48 | +``` |
| 49 | + |
| 50 | +`TimeHull` remains available as a compatibility alias, but `FireHull` is the preferred public name going forward. |
| 51 | + |
| 52 | +## Minimal runnable example |
| 53 | + |
| 54 | +```python |
| 55 | +from cubedynamics.fire_time_hull import FireEventDaily |
| 56 | + |
| 57 | +event = FireEventDaily.example() |
| 58 | +hull = event.to_hull(n_ring_samples=24, n_theta=16) |
| 59 | + |
| 60 | +print(hull.metrics()) |
| 61 | +mesh = hull.to_mesh() |
| 62 | +print(mesh["verts_km"].shape, mesh["tris"].shape) |
| 63 | +``` |
| 64 | + |
| 65 | +For a complete lightweight example that does not require live FIRED downloads, see [Synthetic fire/VASE recipe](../recipes/fire_vase_synthetic.md). |
| 66 | + |
| 67 | +## Metrics available now |
| 68 | + |
| 69 | +Stable metric names currently include: |
| 70 | + |
| 71 | +- `duration_days` |
| 72 | +- `scale_km` |
| 73 | +- `footprint_area_peak_km2` |
| 74 | +- `footprint_area_final_km2` |
| 75 | +- `hull_volume_km2_days` |
| 76 | +- `hull_surface_km_day` |
| 77 | + |
| 78 | +Legacy aliases retained for compatibility: |
| 79 | + |
| 80 | +- `days` |
| 81 | +- `volume_km2_days` |
| 82 | +- `surface_km_day` |
| 83 | + |
| 84 | +These metrics are geometric summaries of the hull. They are not yet a complete ecological or dynamical taxonomy. |
| 85 | + |
| 86 | +## Environmental attribution |
| 87 | + |
| 88 | +The scientific direction is: |
| 89 | + |
| 90 | +```python |
| 91 | +hull + environment -> explanatory fire manifold |
| 92 | +``` |
| 93 | + |
| 94 | +The current first implementation is `FireHull.attach_environment(...)`, which stores per-variable `HullClimateSummary` objects keyed by variable name: |
| 95 | + |
| 96 | +```python |
| 97 | +hull_with_env = hull.attach_environment(cube, variables=["vpd"], method="nearest") |
| 98 | +fig = hull_with_env.plot(color="vpd") |
| 99 | +``` |
| 100 | + |
| 101 | +This is intentionally modest but now mesh-aware. It stores: |
| 102 | + |
| 103 | +- the original summary-level `HullClimateSummary` |
| 104 | +- per-layer values aligned to hull time slices |
| 105 | +- per-vertex values aligned explicitly to the mesh |
| 106 | + |
| 107 | +It does not yet store a fully local `(x, y, t)` field sampled independently at every hull vertex. |
| 108 | + |
| 109 | +## Cube compatibility |
| 110 | + |
| 111 | +`FireHull.to_cube(template_cube)` returns a boolean occupancy cube aligned to a supplied template grid. |
| 112 | + |
| 113 | +Why a template is required: |
| 114 | + |
| 115 | +- CubeDynamics prefers explicit coordinate semantics. |
| 116 | +- The hull itself does not yet define a standalone canonical occupancy grid. |
| 117 | +- Requiring a template keeps the conversion predictable and composable. |
| 118 | + |
| 119 | +## Current limitations |
| 120 | + |
| 121 | +- The fire-specific interactive hull viewer still uses Plotly. |
| 122 | +- `FireHull.to_cube()` requires a template cube. |
| 123 | +- `attach_environment()` currently supports `method="nearest"` only. |
| 124 | +- Environmental attribution is summary-level, not yet full local hull-element attribution. |
| 125 | +- FIRED ingestion, hull geometry, attribution, and rendering are clearer than before, but not fully separated into independent public submodules yet. |
0 commit comments