Skip to content

Combining wind-smeared data and Riley BP + smoothing#278

Merged
andersy005 merged 13 commits intomainfrom
interpolate-unburnable
Oct 21, 2025
Merged

Combining wind-smeared data and Riley BP + smoothing#278
andersy005 merged 13 commits intomainfrom
interpolate-unburnable

Conversation

@orianac
Copy link
Member

@orianac orianac commented Oct 20, 2025

No description provided.

@orianac orianac added enhancement New feature or request e2e End-to-end testing labels Oct 20, 2025
- Add try/except around ds.crs.attrs['crs_wkt'] in geo_sel and raise a clear
  ValueError if the WKT is not present (encourages passing crs_wkt).
- Remove duplicate rioxarray entry in pyproject.toml.
… and tidy wind routines

- Move _get_transformers and geo_sel out of conus404.py into ocr.utils and add lru_cache/pyproj imports there
- Remove now-unused pyproj/lru_cache imports from conus404.py
- Update ocr/risks/fire.py to import geo_sel from ocr.utils
- Preserve CRS-related coords/attrs when initializing spread_results in apply_wind_directional_convolution
- Simplify create_wind_informed_burn_probability: clarify param/docs, return a named DataArray ('BP') with attrs instead of building a Dataset
…moothing and preserve xarray metadata

Replace direct cv.GaussianBlur on .values + manual DataArray construction with xr.apply_ufunc(
cv.GaussianBlur, ..., dask='parallelized') and chunking. This keeps dims/coords/attrs intact,
supports dask parallelism (avoids loading full array to memory), and sets the result name/attributes.
- Add session-scoped wind_informed_bp_cache and factory fixture get_wind_informed_burn_probability
  to tests/conftest.py. The fixture loads Riley BP, assigns CRS, subsets with geo_sel, loads the
  reprojected wind-direction distribution, computes create_wind_informed_burn_probability and
  caches results to avoid recomputation across tests.
- Add TestWindInformedBurnProbabilitySnapshot in tests/risks/test_fire_snapshots.py that
  parametrizes several regions and snapshots the wind-informed burn probability outputs.
- Adjust imports to include assign_crs, catalog, create_wind_informed_burn_probability and geo_sel.
@andersy005 andersy005 merged commit 43a996f into main Oct 21, 2025
7 of 8 checks passed
@andersy005 andersy005 deleted the interpolate-unburnable branch October 21, 2025 15:54
andersy005 added a commit that referenced this pull request Nov 4, 2025
* main: (46 commits)
  Chage summary stats geoparquet filepaths from `output` to `intermediate` (#299)
  Update data downloads page (#300)
  Bump prefix-dev/setup-pixi from 0.9.1 to 0.9.2 in the actions group (#298)
  Update data download documentation (#293)
  migrate vector input datasets to unified ingestion and remove unused datasets (#297)
  Fix duplicate `avg_name` (#296)
  fix California and Tennessee region IDs in staging automatic deploy (#294)
  Add additional region IDs to QA PR automatic deploy (#292)
  create a unified infrastructure for ingesting and processing input datasets (#289)
  Combine county, tract and block PMTiles layers into a single regions.pmtiles layer (#291)
  Pyramid (#284)
  Use buffered slices to remove edge effects from neighborhood operations (#288)
  Bumps up RAM for `write-aggregated-region-analysis-files` job (#290)
  fix block dataset path construction in wind risk regional aggregation (#282)
  Adds a bbox struct for region pmtiles (#281)
  compute Dask-backed data before assert_equal/assert_all_close (#283)
  pipeline and configuration improvements (#279)
  Add cached valid_region_ids.json and use it in ChunkingConfig (#280)
  Combining wind-smeared data and Riley BP + smoothing (#278)
  update-docs: add first draft of all docs pages (#275)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e End-to-end testing enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants