-
Notifications
You must be signed in to change notification settings - Fork 100
EPPT-2586: Fire Severity Index: Add a DroughtCode class to IMPROVER #2251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: EPPT_2411_fire_severity_index_workflow_development
Are you sure you want to change the base?
EPPT-2586: Fire Severity Index: Add a DroughtCode class to IMPROVER #2251
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## EPPT_2411_fire_severity_index_workflow_development #2251 +/- ##
=====================================================================================
Coverage ? 95.26%
=====================================================================================
Files ? 152
Lines ? 15389
Branches ? 0
=====================================================================================
Hits ? 14660
Misses ? 729
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ba60ee7 to
97acbee
Compare
RDP-mo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the commits 1, 2 and 4 - I'll give 3 and 5 another look tomorrow but you may as well have the comments so far
|
On the ABC refactor - it looks like process on the new base class now uses _make_output_cube instead which seems to be an improvement on the _make_dc_cube. Took me a little while to see but seems sensible. The thing I'd mention is I think ideally the Main point I'd make is that the review would have been easier if the creation of the base class has accompanied the removal of the base class elements from DroughtCode. |
|
@mo-philrelton I'm done reviewing now - I'll assign back to you most comments are somewhat optional or fairly nitty. I haven't run the tests yet just because I haven't got improver set up to do so yet so I will do that after the stand so I have it for next time - any issues I'll probably come to you. |
|
Thanks I'm happy with these changes |
… NotImplementedError
I agree with this, that is the clearest way to do this. I have now made the switch to the error raising implementation of Obviously all other reviews will still have this pass method, but I can fix this when performing future rebases. Just watch out for it in the other PRs. |
ryan-cocking-mo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments on some docstrings but otherwise great.
| potential_evapotranspiration (np.ndarray): The potential evapotranspiration. | ||
|
|
||
| Returns: | ||
| np.ndarray: The calculated DC value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| potential_evapotranspiration (np.ndarray): The potential evapotranspiration. | |
| Returns: | |
| np.ndarray: The calculated DC value. | |
| potential_evapotranspiration: The potential evapotranspiration. | |
| Returns: | |
| The calculated DC value. |
Type not required in docstring as it is expressed in type hint.
| From Van Wagner and Pickett (1985), Pages 6-7: Equation 22, Steps 3 & 4. | ||
|
|
||
| Returns: | ||
| np.ndarray: The potential evapotranspiration value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| np.ndarray: The potential evapotranspiration value. | |
| The potential evapotranspiration value. |
Type not required in docstring.
| """Calculate the Drought Code (DC). | ||
|
|
||
| Returns: | ||
| np.ndarray: The calculated DC values for the current day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| np.ndarray: The calculated DC values for the current day. | |
| The calculated DC values for the current day. |
Type not required in docstring.
EPPT-2586
In order to calculate the daily Fire Severity Index, we require a Drought Code calculation. This class, and associated tests, partially reproduce the Canadian Forest Fire Weather Index from van Wagner and Pickett's 1985 FORTRAN implementation
Testing: