-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature drought metrics climatology #12
Merged
dschlaep
merged 22 commits into
release/devel_v0.3.0
from
feature_droughtMetricsClimatology
Dec 1, 2023
Merged
Feature drought metrics climatology #12
dschlaep
merged 22 commits into
release/devel_v0.3.0
from
feature_droughtMetricsClimatology
Dec 1, 2023
Conversation
This file contains 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
…dedicated functions - new (internal) `calc_extreme_funNday()`, `calc_condition()`, `calc_durations_consecutive_periods()`, `calc_extreme_value_consecutive_periods()` - use new functions where appropriate: `calc_new_yearly_aggregations()`, `calc_DSI()`
- documentation updated with published reference
- extract all metrics used by Chenoweth et al. 2023 - `metric_EcologicalDroughtMetrics2023_annual()` returns annual time series of these metrics - `metric_EcologicalDroughtMetrics2023_annualClim()` returns climatologies (summaries across years) of these metrics - test reference values for rSOILWAT2 v5.0 and v5.1 (but not yet v6.0)
- `calc_frost_doy()` returns +/-Inf if there was no frost event; "EcologicalDroughtMetrics2023" assumes NA for no frost events --> convert non-finite values to NA
- CWD values were previously but incorrectly multiplied by 10 -> now they return the correct value in mm
- recruitment doesn't occur every year; WDD during the recruitment period in year when it doesn't occur is NA -> metrics for which we calculate frequency, need to be calculated only over finite values
…t of integer vectors - previously, the returned object may have not been a list or may have contained elements with real-typed 0s or logical-typed NAs instead of integer-typed objects
- update reference data objects -> +/- Inf values changed to NA
- several commits fixed EcologicalDroughtMetrics2023 metrics and output: * commit e13d743 "Fix frost in "EcologicalDroughtMetrics2023"" * commit e9c782f "Fix CWD in "EcologicalDroughtMetrics2023"" * commit 011e3be "Fix recruitment-WDD in "EcologicalDroughtMetrics2023"" * commit 57fb582 "`calc_durations_consecutive_periods()` returns now consistently a list of integer vectors"
- tests that run metrics and compare output to stored reference objects are now comparing values by variable (across time) instead of by time step (across all variables) -> comparing values by variable will make it easier to interpret error messages
- TDDssv = seasonal variability of total growing degree days
- fixed fall recruitment WDD which was previously mistakenly using values from spring instead of fall
- metric groups "EcologicalDroughtMetrics2023" and "RR2020predictors" gain dedicated documentation - this is in addition to the generic documentation for all `metric_*()` fucntions
…ual()` - warning: [lengths_linter] Use lengths() to find the length of each element in a list.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## release/devel_v0.3.0 #12 +/- ##
=======================================================
- Coverage 6.58% 6.17% -0.42%
=======================================================
Files 18 18
Lines 5464 5833 +369
=======================================================
Hits 360 360
- Misses 5104 5473 +369 ☔ View full report in Codecov by Sentry. |
Addressing package check warnings for "Rd files with duplicated alias" and "Undocumented arguments in Rd file": - remove duplicate aliases for EcologicalDroughtMetrics2023_annual/Clim and RR2022predictors_annual/Clim - link to general "metrics" documentation for EcologicalDroughtMetrics2023_annual/Clim and RR2022predictors_annual/Clim - use links to individual metrics in general "metrics" documentation
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.
metric_FrostDaysAtNeg5C()
returns nowNAs
instead of+/-Inf
for yearswithout a frost event.
"EcologicalDroughtMetrics2023"
, i.e.,metric_EcologicalDroughtMetrics2023_annual()
returns annual time seriesmetric_EcologicalDroughtMetrics2023_annualClim()
returns climatologies(summaries across years).