airGR issueshttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues2023-10-19T18:06:50+02:00https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/182Correct vignette due to 'hydroPSO' was removed from the CRAN repository2023-10-19T18:06:50+02:00Delaigue OlivierCorrect vignette due to 'hydroPSO' was removed from the CRAN repositoryProf Brian Ripley
16 October 2023 13:03
```
Dear maintainer,
Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_airGR.html>.
Please correct before 2023-10-30 to safely retain your package on CRAN.
...Prof Brian Ripley
16 October 2023 13:03
```
Dear maintainer,
Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_airGR.html>.
Please correct before 2023-10-30 to safely retain your package on CRAN.
Packages in Suggests should be used conditionally: see 'Writing R Extensions'.
This needs to be corrected even if the missing package(s) become available.
It can be tested by checking with _R_CHECK_DEPENDS_ONLY_=true.
The CRAN Team
```v1.7.6https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/181CreateRunOptions and RunModel_GR5H* do not crash when Imax set to NULL2023-10-26T11:23:17+02:00Thirel GuillaumeCreateRunOptions and RunModel_GR5H* do not crash when Imax set to NULLSee
```
library(airGR)
## load of catchment data
data(L0123003)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5H, DatesR = BasinObs$DatesR,
Precip = Ba...See
```
library(airGR)
## load of catchment data
data(L0123003)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## run period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%Y-%m-%d %H:%M")=="2006-01-01 00:00"),
which(format(BasinObs$DatesR, format = "%Y-%m-%d %H:%M")=="2006-12-31 23:00"))
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR5H, Imax = NULL,
InputsModel = InputsModel, IndPeriod_Run = Ind_Run)
```
It gives a warning for something else, but no error:
```
Warning message:
In CreateRunOptions(FUN_MOD = RunModel_GR5H, Imax = NULL, InputsModel = InputsModel, :
model warm up period not defined: default configuration used
the year preceding the run period is used
```
That is not desirable in my opinion (someone I know just made wrong simulations for this reason due to a bad reading of Imax values).v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/179RunModel_CemaNeige fails in CreateIniStates at the hourly time step2023-10-26T11:23:22+02:00Thebault CyrilRunModel_CemaNeige fails in CreateIniStates at the hourly time stepWhen I try to use RunModel_CemaNeige alone (without GR models) at the hourly time step, the following error appear:
`UH1' must be numeric of length 480 (20 * 24)`
The error appear because in CreateIniStates, the following condition `if...When I try to use RunModel_CemaNeige alone (without GR models) at the hourly time step, the following error appear:
`UH1' must be numeric of length 480 (20 * 24)`
The error appear because in CreateIniStates, the following condition `if ("CemaNeige" %in% ObjectClass & ! "GR" %in% ObjectClass)` leads to a `UH1` set to `rep(Inf, UH1n)` instead of `rep(Inf, UH1n*k)`. This error appear also with `UH2`. Note that the `k` value is defined later in the script as:
```r
if ("hourly" %in% ObjectClass) {
k <- 24
} else {
k <- 1
}
```
I suggest therefore to move this part at the beginning of the function CreateIniStates and after that to define everywhere UH1 and UH2 as
rep(Inf, UH1n*k).
PS: The examples with CemaNeige at the hourly time step can't be run, the U2345030 catchment is not included in the package (and we can't use another catchment included in the package because they either have temperature data or hourly data, but never both).v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/178frun_CemaNeige.f90: case dG = 0 not considered2023-10-23T17:34:05+02:00Thirel Guillaumefrun_CemaNeige.f90: case dG = 0 not consideredIn frun_CemaNeige.f90, the case when dG = 0 is not taken into account. It can result in a Gratio that is set and stays equal to 1 when small solid precipitation occurs and melts on the same day. I propose to correct that by modifying lin...In frun_CemaNeige.f90, the case when dG = 0 is not taken into account. It can result in a Gratio that is set and stays equal to 1 when small solid precipitation occurs and melts on the same day. I propose to correct that by modifying line 187
` IF (dG.LT.0.) THEN`
becomes
` IF (dG.LE.0.) THEN`
Attached is the modified file, as well as the output of a simulation where this bug is activated.
Bug identified by @francois.bourgin and Thibault Hallouin.
[frun_CEMANEIGE.f90](/uploads/c8331d51d796ee6d0495b454903f8444/frun_CEMANEIGE.f90)
[bug_sca.csv](/uploads/f48eb420cd3ca73f00724f3813999659/bug_sca.csv)v1.7.6https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/177RunModel_Lag: negative Qsim during Calibration produces NaNs2024-03-27T14:24:06+01:00Dorchies DavidRunModel_Lag: negative Qsim during Calibration produces NaNsIn case of a simulation with Direct Injection abstracting to much water, the downstream flow simulated by `RunModel_Lag` can be negative. But there is a piece of code to cap it to zero:
```r
if (length(RunOptions$Outputs_Sim) > 2) {
...In case of a simulation with Direct Injection abstracting to much water, the downstream flow simulated by `RunModel_Lag` can be negative. But there is a piece of code to cap it to zero:
```r
if (length(RunOptions$Outputs_Sim) > 2) {
if (any(OutputsModel$Qsim[!is.na(OutputsModel$Qsim)] < 0)) {
warning(length(which(OutputsModel$Qsim < 0)), " time steps with negative flow, set to zero.")
OutputsModel$Qsim[OutputsModel$Qsim < 0] <- 0
}
# Warning for NAs
if (any(is.na(OutputsModel$Qsim))) {
warning(length(which(is.na(OutputsModel$Qsim))), " time steps with NA values")
}
}
```
Unfortunately the assignation to zero is in a condition that is not met during calibration. In case of using a square root transformation for the error criterion, the criterion produces NaNs with a lot of warnings.
Planned solution: move the cap to zero outside the condition linked to the warning (see code above) in order to make it systematic.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/172Correct vignette due to 'Rmalschains' was removed from the CRAN repository2023-10-20T10:20:53+02:00Delaigue OlivierCorrect vignette due to 'Rmalschains' was removed from the CRAN repositoryProf Brian Ripley
3 April 2023 10:05
```
Dear maintainer,
Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_airGR.html>.
Please correct before 2023-04-17 to safely retain your package on CRAN.
...Prof Brian Ripley
3 April 2023 10:05
```
Dear maintainer,
Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_airGR.html>.
Please correct before 2023-04-17 to safely retain your package on CRAN.
Packages in Suggests should be used conditionally: see 'Writing R Extensions'.
This needs to be corrected even if the missing package(s) become available.
It can be tested by checking with _R_CHECK_DEPENDS_ONLY_=true.
The CRAN Team
```v1.7.4https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/171Check error: Direct call of 'as.data.frame.POSIXct()' is deprecated. Use 'as...2023-10-24T11:05:59+02:00Dorchies DavidCheck error: Direct call of 'as.data.frame.POSIXct()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' insteadThis error has raised on the check for devel version of R since 16th of December.
It needs to be fixed for the next release.This error has raised on the check for devel version of R since 16th of December.
It needs to be fixed for the next release.v1.7.6https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/169Fix GR pathology2023-10-26T11:24:06+02:00Thirel GuillaumeFix GR pathologyIssue initially reported to Vazken and Charles by Wouter Knoben on the Excel GR4J in 2017, also reported recently by @laurent.strohmenger on GR5J recently.
Note: this issue concerns airGR but is not specific to the package, it comes fr...Issue initially reported to Vazken and Charles by Wouter Knoben on the Excel GR4J in 2017, also reported recently by @laurent.strohmenger on GR5J recently.
Note: this issue concerns airGR but is not specific to the package, it comes from the GR implementation.
Under some conditions (i.e. some parameters sets, some climatic conditions), the lower part of the GR models, namely the routing store and the exchange component, enter in a mode where it cannot escape anymore. Due to a positive X2 and a positive exchange larger than the routing store outflow, the routing store comes to an equilibrium and a non null discharge is produced, even though no more rainfall is injected.
This is very annoying, as the simulation quality becomes very poor. This issue may not be found under calibration, because a low objective function would lead to avoid these parameter sets, but some parameter sets can look ok under calibration and then give erroneous simulations, under a different climate for instance (e.g. high rainfall).
Included is the email exchange with Wouter Knoben colleagues.
[GR4J_pathology_Knoben.docx](/uploads/715ff50a3c0232a3125178db848fdc15/GR4J_pathology_Knoben.docx)
Attached also an R code reproducing the bug proposed by @laurent.strohmenger and augmented by the translation in R of the GR5J routing part producing the bug. It shows that X2 does not need to be larger than X3, oppositely to what was discussed in 2017.
[GR5J_bug.R](/uploads/4fc1d93321a41a052546d69d9b435427/GR5J_bug.R)
There is no solution to date, but this must be cured.v2.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/167CreateRunOptions: crash with RunModel_Lag2022-11-27T10:04:52+01:00Dorchies DavidCreateRunOptions: crash with RunModel_LagThe example provided for `RunModel_Lag` is incoherent. Both `CreateInputsModel` and `CreateRunOptions` uses `FUN_MOD = RunModelGR4J` to work. If, in example, we try to change the argument to `FUN_MOD = RunModel_Lag`, CreateRunOptions cra...The example provided for `RunModel_Lag` is incoherent. Both `CreateInputsModel` and `CreateRunOptions` uses `FUN_MOD = RunModelGR4J` to work. If, in example, we try to change the argument to `FUN_MOD = RunModel_Lag`, CreateRunOptions crashes:
```r
> InputsModelInf <- CreateInputsModel(FUN_MOD = RunModel_Lag, DatesR = BasinObs$DatesR,
+ Precip = BasinObs$P, PotEvap = BasinObs$E,
+ Qupstream = Qupstream, LengthHydro = LengthHydro,
+ BasinAreas = BasinAreas)
> RunOptions <- CreateRunOptions(FUN_MOD = RunModel_Lag,
+ InputsModel = InputsModelInf, IndPeriod_Run = Ind_Run)
Error in rep(0, NState) : invalid 'times' argument
```
This is due to the fact that:
```
> class(InputsModelInf)
[1] "InputsModel" "daily" "SD" "SD"
```
And in `CreateRunOptions` there is a test for defining the size of the initial state vector restricted to `if ("GR" %in% ObjectClass | "CemaNeige" %in% ObjectClass)` and therefore `Nstate` is `NULL` when proceeding to the creation of the initial state vector.
I see 2 solutions:
- Define the default value of `NState <- 0` instead of `NULL` which could be generic to any future model outside GR family assuming the lack of initial state
- Systematically call `CreateIniStates` with proper parameters for the cases where the parameter `IniStates` is NULL (I have tested it with `IniStates = CreateIniStates(RunModel_Lag, InputsModel)`, it works).v1.8Dorchies DavidDorchies Davidhttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/165Add missing 'IsIntStore' argument in 'CreateCalibOptions'2022-09-12T11:08:54+02:00Delaigue OlivierAdd missing 'IsIntStore' argument in 'CreateCalibOptions'The 'IsIntStore' argument has been unfortunatly removed since commit 29284029.
In fact, this argument is needed to choose the right set of transformed parameter uses at the grid-screening step (see `..StartParamTransfo()` in `CreateCal...The 'IsIntStore' argument has been unfortunatly removed since commit 29284029.
In fact, this argument is needed to choose the right set of transformed parameter uses at the grid-screening step (see `..StartParamTransfo()` in `CreateCalibOptions()`).
Currently the GR5H model used with the interception store uses the set of transformed parameter optimized for GR5H without interception. The paremeter set found during the calibtation step is not as good as expected.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/160Conversion of LayerFracSolidPrecip in SeriesAggreg2023-10-26T11:24:38+02:00Thirel GuillaumeConversion of LayerFracSolidPrecip in SeriesAggreg`LayerFracSolidPrecip` is converted through a sum in `SeriesAggreg`. `LayerFracSolidPrecip` is a fraction, so it cannot be converted with a sum. An average would be less incorrect, although definitely not perfectly correct. A better way ...`LayerFracSolidPrecip` is converted through a sum in `SeriesAggreg`. `LayerFracSolidPrecip` is a fraction, so it cannot be converted with a sum. An average would be less incorrect, although definitely not perfectly correct. A better way would be to recalculate liquid and solid precipitation, to aggregate them, and then to recalculate `LayerFracSolidPrecip` as the ratio.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/156RunModel_Lag: wrong values in parameter screening2023-10-19T18:08:39+02:00Dorchies DavidRunModel_Lag: wrong values in parameter screeningLag parameter screening values are currently:
```r
ParamTSD <- matrix(c(+1.25,
+2.50,
+5.00), ncol = 1, byrow = TRUE)
```
These values corresponds to a correct definition for **Real** paramete...Lag parameter screening values are currently:
```r
ParamTSD <- matrix(c(+1.25,
+2.50,
+5.00), ncol = 1, byrow = TRUE)
```
These values corresponds to a correct definition for **Real** parameters but, as we see that all other model screening values are between -10 and 10, **Transformed** parameters should be used here.
This wrong screening could explain the trend of the calibration to converge to high values of celerity when sensibility to this parameter is low.
As the range of the real parameter celerity is defined in the range `[0, 20]`, corresponding transformed parameters should be:
```r
ParamTSD <- matrix(c(-8.75,
-7.50,
-5.00), ncol = 1, byrow = TRUE)
```v1.7.6Dorchies DavidDorchies Davidhttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/149SeriesAggreg: handling diverse input time steps correctly2023-10-26T11:25:22+02:00Dorchies DavidSeriesAggreg: handling diverse input time steps correctlyI tried to aggregate a 15 minutes time step time series to monthly time step and here is the result:
```r
> d <- seq.POSIXt(from = as.POSIXct("2020-01-01 00:00:00", tz = "UTC"),
+ to = as.POSIXct("2021-12-31 23:59:59", ...I tried to aggregate a 15 minutes time step time series to monthly time step and here is the result:
```r
> d <- seq.POSIXt(from = as.POSIXct("2020-01-01 00:00:00", tz = "UTC"),
+ to = as.POSIXct("2021-12-31 23:59:59", tz = "UTC"),
+ by = "15 min")
> df <- data.frame(d = d, v = 1)
> QM <- SeriesAggreg(df, Format = "%Y%m", ConvertFun = "sum")
Warning message:
In SeriesAggreg.data.frame(df, Format = "%Y%m", ConvertFun = "sum") :
the requested time 'Format' is the same as the one in 'x'. No time-step conversion was performed
```
Maybe I was foolish to try to use other time steps than the ones handle by GR models... The strange thing is that yearly aggregation doesn't warn and send a bad result:
```r
> QY <- SeriesAggreg(df, Format = "%Y", ConvertFun = "sum")
> str(QY)
'data.frame': 2 obs. of 2 variables:
$ d: POSIXct, format: "2020-01-01" "2021-01-01"
$ v: num 12 12
```v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/145CreateIniStates: Mistake when checking if IntStore is not NULL with another m...2022-02-03T08:42:39+01:00Tilmant FrancoisCreateIniStates: Mistake when checking if IntStore is not NULL with another model than GR5HThere is a mistake in the check of IntStore when using another model than GR5H.
https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/blob/dev/R/CreateIniStates.R#L77
It should be : <br>
`if (!(identical(FUN_MOD, RunModel_GR5H) | identical(FUN_...There is a mistake in the check of IntStore when using another model than GR5H.
https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/blob/dev/R/CreateIniStates.R#L77
It should be : <br>
`if (!(identical(FUN_MOD, RunModel_GR5H) | identical(FUN_MOD, RunModel_CemaNeigeGR5H)) & !is.null(IntStore))` <br>
instead of : <br>
`if ((!identical(FUN_MOD, RunModel_GR5H) | identical(FUN_MOD, RunModel_CemaNeigeGR5H)) & !is.null(IntStore))`v1.7.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/144Extraction of Zlayers in DataAltiExtrapolation_Valery function2022-02-02T18:35:09+01:00Tilmant FrancoisExtraction of Zlayers in DataAltiExtrapolation_Valery functionWhen using a vector of 101 values for `HypsoData` for 5 layers, the selected indexes are wrong (one less than what is expected).
For example, the elevation of the 3rd layer should be the median elevation of the catchment (HypsoData[51]) ...When using a vector of 101 values for `HypsoData` for 5 layers, the selected indexes are wrong (one less than what is expected).
For example, the elevation of the 3rd layer should be the median elevation of the catchment (HypsoData[51]) but the selected index is 50.v1.7.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/137Fix .ExtractOutputsModel function to manage the new elements of OutputsModel2022-02-15T08:39:07+01:00Delaigue OlivierFix .ExtractOutputsModel function to manage the new elements of OutputsModelThe `.ExtractOutputsModel()` function no longer works because of the addition of the `Param` and `WarmUpQsim` elements in the `OutputsModel` object.
There are several solutions to solve the problem:
- handle each exception in the fu...The `.ExtractOutputsModel()` function no longer works because of the addition of the `Param` and `WarmUpQsim` elements in the `OutputsModel` object.
There are several solutions to solve the problem:
- handle each exception in the function `.ExtractOutputsModel()` (not recommended from my point of view)
- manage the `Param` and `WarmUpQsim` elements as the different elements of `StateEnd`, i.e. in a list
If the second solution is chosen, we need to mange the `.GetOutputsModelGR()` (UtilsRunModel.R) as following. But the fact that the `WarmUpQsim` element has a specific `"WarmUpOutputsModelItem"` class is also a problem.
```r
if ("WarmUpQsim" %in% RunOptions$Outputs_Sim) {
OutputsModel$RunOptions$WarmUpQsim <- RESULTS$Outputs[seq_len(length(RunOptions$IndPeriod_WarmUp)),
which(FortranOutputs == "Qsim")]
class(OutputsModel$RunOptions$WarmUpQsim) <- c("WarmUpOutputsModelItem", class(OutputsModel$RunOptions$WarmUpQsim))
}
if ("Param" %in% RunOptions$Outputs_Sim) {
OutputsModel$RunOptions$Param <- Param
}
```
`.ExtractOutputsModel()`:
```
if (!is.null(x$RunOptions)) {
res$RunOptions <- x$RunOptions
}
```v1.7.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/136Decreased performance of calibration execution time2021-11-03T11:17:53+01:00Dorchies DavidDecreased performance of calibration execution timeSince merge of branch 132-runmodel_lag-add-warmupqsim-to-outputsmodel into dev the calibration schedule test lasts more than 60 minutes to run although it lasts less than 25 minutes before.Since merge of branch 132-runmodel_lag-add-warmupqsim-to-outputsmodel into dev the calibration schedule test lasts more than 60 minutes to run although it lasts less than 25 minutes before.v1.7.0Dorchies DavidDorchies Davidhttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/133SeriesAggreg: Reorder regime time series and keep original data.frame column ...2021-07-15T09:56:33+02:00Delaigue OlivierSeriesAggreg: Reorder regime time series and keep original data.frame column names
## Row order
When a user wants to calculate the monthly regime from a time series that does not start in January, the resulting time series is not ordered chronologically:
```r
## loading catchment data
data(L0123002)
## preparation...
## Row order
When a user wants to calculate the monthly regime from a time series that does not start in January, the resulting time series is not ordered chronologically:
```r
## loading catchment data
data(L0123002)
## preparation of the initial time series data frame at the daily time step
TabSeries <- BasinObs[-c(1:100), c("DatesR", "P", "E", "T", "Qmm")]
## monthly regimes
NewTabSeries <- SeriesAggreg(TabSeries,
Format = "%m",
ConvertFun = c("sum", "sum", "mean", "sum"))
NewTabSeries
```
```
DatesR P E T Qmm
25 1985-01-01 4561.75 0.000 -4.38509320 801.5458
1638 1985-02-01 3628.40 137.333 -3.19772073 885.9376
2514 1985-03-01 3285.26 918.967 -0.06520829 1419.2986
3204 1984-04-10 2951.83 1945.714 3.62350569 3228.6649
4204 1984-05-01 3039.24 3060.999 7.44770178 6952.6141
5151 1984-06-01 2550.69 3655.168 11.41753270 5886.3055
6049 1984-07-01 1463.55 3980.017 15.21047230 1728.8110
6857 1984-08-01 1369.97 3609.238 15.05654527 528.8462
7770 1984-09-01 1914.48 2685.482 10.52281546 407.1385
8724 1984-10-01 2596.42 1697.494 4.53778871 487.0308
9587 1984-11-01 4752.38 645.070 -2.62700563 750.2040
10440 1984-12-01 4870.14 44.293 -5.27928687 903.0798
```
This can lead to a counter-intuitive behavior...
```r
plot(NewTabSeries[, c("DatesR", "Qmm")], type = "l")
```
![image](/uploads/c1dbe9fff6950039947a5eb5446976f1/image.png)
One possibility is to reorder the table by the date culumn. The other solution, which I prefer, is to impose the same year (which doesn't really make sense).
## Column names
Another problem that we have already talked about. But the function automatically renames the date column of a data.frame, which is not very polite to the user.
```r
## preparation of the initial time series data frame at the daily time step
TabSeries <- BasinObs[-c(1:100), c("DatesR", "P", "E", "T", "Qmm")]
colnames(TabSeries) <- LETTERS[1:5]
## monthly regimes
NewTabSeries <- SeriesAggreg(TabSeries,
Format = "%m",
ConvertFun = c("sum", "sum", "mean", "sum"))
head(NewTabSeries)
```
```
DatesR B C D E
25 1985-01-01 4561.75 0.000 -4.38509320 801.5458
1638 1985-02-01 3628.40 137.333 -3.19772073 885.9376
2514 1985-03-01 3285.26 918.967 -0.06520829 1419.2986
3204 1984-04-10 2951.83 1945.714 3.62350569 3228.6649
4204 1984-05-01 3039.24 3060.999 7.44770178 6952.6141
5151 1984-06-01 2550.69 3655.168 11.41753270 5886.3055
```v1.7.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/131RunModel_Lag: extra `names` attribute on `OutputsModel$Qsim`2021-07-09T18:56:19+02:00Dorchies DavidRunModel_Lag: extra `names` attribute on `OutputsModel$Qsim`Following the modifications of #123, *airGRiwrm* has failed tests as described in in-wop/airGRiwrm#50
When using `Qupstream` for initial states of the lag model, `OutputsModel$Qsim` has an attribute "names" with empty strings.
This att...Following the modifications of #123, *airGRiwrm* has failed tests as described in in-wop/airGRiwrm#50
When using `Qupstream` for initial states of the lag model, `OutputsModel$Qsim` has an attribute "names" with empty strings.
This attribute must be removed in any case.v1.7.0Dorchies DavidDorchies Davidhttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/119Fix 'baseflow' reverse dependency2021-11-03T14:11:39+01:00Delaigue OlivierFix 'baseflow' reverse dependency'airGR' v1.6.11 breaks the CRAN version of the 'baseflow' package. The error was not returned by the automated reverse dependency checking that is running using 'revdepcheck' during the pipeline, but it was detected by the one of the CRA...'airGR' v1.6.11 breaks the CRAN version of the 'baseflow' package. The error was not returned by the automated reverse dependency checking that is running using 'revdepcheck' during the pipeline, but it was detected by the one of the CRAN.
The following error appears only when 'airGR' is not attached before running the example. I don't see where the 'revdepcheck' package does this automatically (by using `library()` or something else that causes the same behavior).
```
Package check result: OK
Changes to worse in reverse depends:
Package: baseflow
Check: examples
New result: ERROR
Running examples in 'baseflow-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: BaseflowFilter
> ### Title: Constructor function of class 'BaseflowFilter'
> ### Aliases: BaseflowFilter
> ### Keywords: manip
>
> ### ** Examples
>
> library(baseflow)
>
> # Loading example data from airGR package
> data(L0123001, package = 'airGR')
>
> # Defining BasinData object
>
> Name <- BasinInfo$BasinName
> startDate <- BasinObs$DatesR[1]
> endDate <- BasinObs$DatesR[length(BasinObs$DatesR)]
> P <- BasinObs$P
> PET <- BasinObs$E
> Qobs <- BasinObs$Qmm
>
> BasinData_Example <- BasinData(Name, startDate, endDate, P, PET, Qobs, fill = "GR4J")
Error in FUN(X[[i]], ...) : object 'RunModel_GR1A' not found
Calls: BasinData ... CreateInputsModel -> .GetFeatModel -> lapply -> FUN
```v1.8