Add a regime calculation function
Add a regime calculation function
(transfer from ticket https://forge.irstea.fr/issues/5445)
It could be nice to propose a function to calculate regime (for P, T, PE, Q, SnowPack, SCA) from an OutputsModel
object and Qobs (or SWE obs or SCA obs) and also to plot them.
This function could have as arguments the aggregation time step and a sliding window length.
- #41v1.6.10
- #43v1.6.10
Activity
- Thirel Guillaume added 1 deleted label
added 1 deleted label
- Delaigue Olivier added R SUGGESTION labels
added R SUGGESTION labels
- Owner
In fact, this is very similar to the use of the
SeriesAggreg()
function, isn't it? - Author Owner
- Owner
If you can aggregate your data using
SeriesAggreg()
, you can compute inter-annual regimes or monthly regimes as you want. After, ok, you can apply a moving average. - Delaigue Olivier mentioned in commit 7a804e87
mentioned in commit 7a804e87
- Delaigue Olivier mentioned in commit 81fccf1d
mentioned in commit 81fccf1d
- Delaigue Olivier mentioned in commit 50d0ad9f
mentioned in commit 50d0ad9f
- Delaigue Olivier mentioned in commit 25d44cab
mentioned in commit 25d44cab
- Owner
First tests (the case of 29 February has not yet been taken into account):
library(airGR) ## loading catchment data data(L0123002) ## preparation of the initial time series data frame at the daily time step TabSeries <- BasinObs[, c("DatesR", "P", "E", "T", "Qmm")] ## monthly regimes NewTabSeries <- SeriesAggreg2(TabSeries = TabSeries, Format = "%m", ConvertFun = c("sum", "sum", "mean", "sum")) plot(Qmm ~ DatesR, data = NewTabSeries, type = "l") ## daily regimes NewTabSeries <- SeriesAggreg2(TabSeries = TabSeries, Format = "%d", ConvertFun = c("sum", "sum", "mean", "sum")) plot(Qmm ~ DatesR, data = NewTabSeries, type = "l")
Edited by Delaigue Olivier - Delaigue Olivier mentioned in commit 344a99d0
mentioned in commit 344a99d0
- Delaigue Olivier mentioned in commit acbce291
mentioned in commit acbce291
- Delaigue Olivier mentioned in commit 466ac283
mentioned in commit 466ac283
- Delaigue Olivier mentioned in commit e0bef844
mentioned in commit e0bef844
- Delaigue Olivier mentioned in commit 75975813
mentioned in commit 75975813
- Delaigue Olivier mentioned in commit bc9d8ef8
mentioned in commit bc9d8ef8
- Delaigue Olivier marked this issue as related to #41 (closed)
marked this issue as related to #41 (closed)
- Delaigue Olivier changed milestone to %v1.6.10
changed milestone to %v1.6.10
- Delaigue Olivier added Doing label
added Doing label
- Delaigue Olivier marked this issue as related to #43 (closed)
marked this issue as related to #43 (closed)
- Owner
See !12 (merged)
- Delaigue Olivier closed
closed