bcgov / bcgov/wps

HFI Calc: Error handling of disabled weather stations

Open
#2,183 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**Describe the Bug**
If/when a weather station is disabled in WF1 but that station is being used as a planning weather station in HFI Calc, it breaks HFI Calc.

For example, if a planning area has 5 weather stations listed, but 1 of them is disabled, then the weather data for only 4 stations is received from WFWX, but HFI Calc is expecting data for 5 stations, so it shows an error for the planning area and doesn't calculate that planning area's Prep Level, FIG, etc. However, from the front end there's no obvious indication what is causing this, so it creates a lot of confusion for users.

E.g.: Moose Lake (station code 165) was being used in 4 different planning areas (4 different fire centres) but was disabled recently in WFWX.

**Expected Behaviour**
Ideally, on the front end of HFI Calc any disabled station should be listed with its station name & a marker indicating it has been disabled in WFWX. We would also want these disabled stations to be displayed from the Manage Stations modal, so that users can delete disabled stations from their planning areas.

If it isn't possible to retrieve the name of a disabled station or its status, at the very least we should be displaying in the UI that a station with "errors" has been assigned to the planning area, and that in order to remove the error for the planning area, that erroneous station needs to be deleted.

**Actual Behaviour**
Retrieval of a disabled weather station's data fails silently (to the user), so there's no explanation for why a planning area can't calculate its Prep Level, etc.

** Steps To Reproduce**
Not easily reproducible - it involves disabling weather stations in WFWX. Moose Lake (station code 165) is a known target (already disabled in WFWX).

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.