Combining wind-smeared data and Riley BP + smoothing#278
Merged
andersy005 merged 13 commits intomainfrom Oct 21, 2025
Merged
Conversation
- 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.
…ing errors in tests
… 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
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) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.