Repository navigation
LANDFIRE fuel model creators: expose the disturbance option - #245
Merged
Merged
Conversation
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.
Closes #244
FastFuels-API-v2#701 added a
disturbanceoption to the LANDFIRE FBFM13, FBFM40 and FCCS grid requests. With it, the API updates the baseline release for recent disturbance where the newest release doesn't fully cover the domain, and records the plan on the grid assource.disturbance. The regenerated client already had the models; this exposes the option in the hand-written creators.Changes
create_fuel_model_grid_from_landfire_fbfm13/_fbfm40/_fccstake a newdisturbance=Noneargument. It's the last parameter, so no existing positional call shifts. A new_build_landfire_disturbancehelper, following_build_boundary_scatter, accepts:"landfire"{"source": "landfire"}LandfireDisturbanceRequestAnything else raises
ValueError. Version and season rules are left to the API's 422, as for the creators' other arguments.Docstrings: tell users to omit
version(or set it to the baseline release); FBFM40's also says not to combinedisturbancewithseason. No release years are hardcoded, because the baselines come from API configuration.Guide:
creating-grids.md's "Disturbance grids" section gets a short step and an example, with the realsource.disturbanceoutput.Tests:
test_live_fbfm40_disturbancecreates its own small domain near Boulder, CO, where LANDFIRE 2025 only partly covers the area. It waits for completion, checkssource.disturbance, and deletes the grid and the domain. It skips if the API says disturbance isn't needed there.Verification
disturbance="landfire"and noversioncompleted in 41 s withversion2024 andsource.disturbance={'ldist_version': '2025', 'fdist_version': '2024', 'source': 'landfire', 'mode': 'ldist_and_last_year_fdist'}. The API accepted FBFM13 and FCCS creates and recorded the same plan.pytest tests/v2/test_grids.py -k "fbfm13 or fbfm40 or fccs or disturbance"against prod: 63 passed.