airGR issueshttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues2023-10-26T10:58:38+02:00https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/185Add 'hydroPSO' package in the 'Suggests' list2023-10-26T10:58:38+02:00Delaigue OlivierAdd 'hydroPSO' package in the 'Suggests' listWhen the 'hydroPSO' package will be available again on CRAN, we will have to:
- complete the Suggests' list in the `DESCRIPTION` file
- update the `V02.1_param_optim` vignette
- update the `.vignettechunkignore` fileWhen the 'hydroPSO' package will be available again on CRAN, we will have to:
- complete the Suggests' list in the `DESCRIPTION` file
- update the `V02.1_param_optim` vignette
- update the `.vignettechunkignore` filev1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/170Move the project in the airGRgalaxy repository2023-02-14T13:02:13+01:00Delaigue OlivierMove the project in the airGRgalaxy repository- [ ] Move the project into the [airGRgalaxy group](https://gitlab.irstea.fr/HYCAR-Hydro/airgrgalaxy)
- [ ] Update the **URL** and **BugReports** items in the DESCRIPTION file- [ ] Move the project into the [airGRgalaxy group](https://gitlab.irstea.fr/HYCAR-Hydro/airgrgalaxy)
- [ ] Update the **URL** and **BugReports** items in the DESCRIPTION filev1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/164Using Epsilon in CreateInputsCrit2023-10-26T11:24:26+02:00Thebault CyrilUsing Epsilon in CreateInputsCritI have some issues with the use of epsilon in CreateInputsCrit.
The RDocumentation says:
(optional) [numeric (atomic or list)] small value to add to all observations and simulations **when "log" or "inv" transformations are used** [same...I have some issues with the use of epsilon in CreateInputsCrit.
The RDocumentation says:
(optional) [numeric (atomic or list)] small value to add to all observations and simulations **when "log" or "inv" transformations are used** [same unit as Obs]. See details
However when we go to the details the epsilon value have an effect on **every transformation except for "boxcox"**.
It's a bit contradictory...
In addition, only "log" and "inv" transformations are checked for the warning "zeroes detected in Obs: the corresponding time-steps will be excluded by the 'ErrorCrit*' functions as the epsilon argument was set to NULL". We should expand this warning to any power function < 0 (ex: transfo = -0.5).v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/163Allow using CreateInputsCrit_Lavenne with composite criteria2023-10-26T11:24:21+02:00Thirel GuillaumeAllow using CreateInputsCrit_Lavenne with composite criteriaWe could modify airGR::CreateInputsCrit_Lavenne to allow using composite criteria when a list of Weights is given. The Weights given by the CreateInputsCrit_Lavenne outputs would then be Weights = c((1 - k)*Weights[1], ..., (1 - k)*Weigh...We could modify airGR::CreateInputsCrit_Lavenne to allow using composite criteria when a list of Weights is given. The Weights given by the CreateInputsCrit_Lavenne outputs would then be Weights = c((1 - k)*Weights[1], ..., (1 - k)*Weights[n], k * max(0, AprCrit)) instead of Weights = c(1 - k, k * max(0, AprCrit)).v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/162Add the streamflow-streamflow (Q-Q) model within airGR2022-08-04T18:31:53+02:00Pierre BRIGODEAdd the streamflow-streamflow (Q-Q) model within airGRAdd the streamflow-streamflow (Q-Q) model used by [Andréassian et al. (2012)](https://doi.org/10.1016/j.jhydrol.2011.10.007) in the airGR package (and then, in the airGRteaching) ?Add the streamflow-streamflow (Q-Q) model used by [Andréassian et al. (2012)](https://doi.org/10.1016/j.jhydrol.2011.10.007) in the airGR package (and then, in the airGRteaching) ?https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/161RunModel_Lag: proposal for a better transformation and screening of the param...2023-02-02T14:04:02+01:00Dorchies DavidRunModel_Lag: proposal for a better transformation and screening of the parametersThe work of Enola Henrotin highlights some issues with the calibration of the lag model. These issues are essentially due to an inadequate transformation of the celerity parameter.
The document below summarizes these issues and proposes...The work of Enola Henrotin highlights some issues with the calibration of the lag model. These issues are essentially due to an inadequate transformation of the celerity parameter.
The document below summarizes these issues and proposes a new transformation and a set of screening values from experimental measurements of flow velocities in a various rivers:
[Sensibility-of-celerity-parameter-on-Lag-model.html](/uploads/ea137265ad43a30113926721c4497ca1/Sensibility-of-celerity-parameter-on-Lag-model.html)
The proposed formulas are (respectively for the transformed and the real parameter):
```math
C_{T} = \dfrac{120}{299C_{0}} - \dfrac{3010}{299} \\
C_0 = \dfrac{120}{299 (C_T + 3010 / 299)}
```
The proposed screening values of transformed parameter are: -9.7; -8.7; -2.0
Sources of the document:
- [Sensibility_of_celerity_parameter_on_Lag_model.Rmd](/uploads/504b8cafa8763657fa1ee9036dbd9349/Sensibility_of_celerity_parameter_on_Lag_model.Rmd)
- [celerity_sensibility.bib](/uploads/484d9de749caec8781c72fb71ee774a1/celerity_sensibility.bib)v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/150Implemente Daniela Peredo's work2022-07-19T08:50:53+02:00Thirel GuillaumeImplemente Daniela Peredo's workThat could be useful to add Daniela's work in airGR (see https://www.tandfonline.com/doi/full/10.1080/02626667.2022.2030864).
Maybe @paul.astagneau you have already implented it by the way?That could be useful to add Daniela's work in airGR (see https://www.tandfonline.com/doi/full/10.1080/02626667.2022.2030864).
Maybe @paul.astagneau you have already implented it by the way?https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/135Regularisation: handle composite criterion2021-11-03T14:22:18+01:00Dorchies DavidRegularisation: handle composite criterionTest and implement the possibility to use composite criteria (e.g.: KGE(sqrt(Q)) mixed with KGE(1/Q)) with Lavenne regularisation.Test and implement the possibility to use composite criteria (e.g.: KGE(sqrt(Q)) mixed with KGE(1/Q)) with Lavenne regularisation.v1.8Dorchies DavidDorchies Davidhttps://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/130Aggregation on a selected period of time with SeriesAggreg2023-10-26T11:26:37+02:00Thirel GuillaumeAggregation on a selected period of time with SeriesAggregIt would be useful to allow users to provide a selection of dates on which the aggregation is wanted.It would be useful to allow users to provide a selection of dates on which the aggregation is wanted.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/126Add a parameter to the plot.OutputsModel function in order to choose the comp...2023-10-26T11:26:32+02:00Delaigue OlivierAdd a parameter to the plot.OutputsModel function in order to choose the comparison period between dischargeIt might be a good idea to add an argument to choose either the simulated flows corresponding to the period in common with the observed flows, or all the simulated flows. This for two graphs:
- regimes
- classified flows
It would be nic...It might be a good idea to add an argument to choose either the simulated flows corresponding to the period in common with the observed flows, or all the simulated flows. This for two graphs:
- regimes
- classified flows
It would be nice to specify it directly on both graphs.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/125Remove warnings about parameter threshold during GR5H calibration2022-07-07T14:10:40+02:00Dorchies DavidRemove warnings about parameter threshold during GR5H calibrationTry this:
```r
library(airGR)
example("RunModel_GR5H")
str(RunOptions) # Line ignored when all lines are copy-paste together. Don't know why
CalibOptions <- CreateCalibOptions(RunModel_GR5H)
OutputsCalib <- Calibration(InputsModel = Inp...Try this:
```r
library(airGR)
example("RunModel_GR5H")
str(RunOptions) # Line ignored when all lines are copy-paste together. Don't know why
CalibOptions <- CreateCalibOptions(RunModel_GR5H)
OutputsCalib <- Calibration(InputsModel = InputsModel, RunOptions = RunOptions,
InputsCrit = InputsCrit, CalibOptions = CalibOptions,
FUN_MOD = RunModel_GR5H)
```
You get:
```
Grid-Screening in progress (0% 20% 40% 60% 80% 100%)
Screening completed (243 runs)
Param = 55.147, -0.400, 228.149, 11.050, 0.126
Crit. NSE[Q] = 0.0650
Steepest-descent local search in progress
Calibration completed (68 iterations, 913 runs)
Param = 451.901, -0.494, 143.170, 3.555, 0.188
Crit. NSE[Q] = 0.9184
There were 24 warnings (use warnings() to see them)
```
And then:
```
> warnings()
Warning messages:
1: In FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, ... :
Param[4] (X4: unit hydrograph time constant [h]) < 0.50
X4 set to 0.50
2: In FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, ... :
Param[4] (X4: unit hydrograph time constant [h]) < 0.50
X4 set to 0.50
...
```
I suppose that the bounds of the parameter should be correctly handled in the calibration to avoid this kind of warnings.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/121Calculate test coverage for the package2021-11-03T14:13:07+01:00Delaigue OlivierCalculate test coverage for the packageMaybe it would be good to add a package coverage test to get an idea of missing or inchoate tests (even if it doesn't make sense to reach 100 %).
I did a test to get an idea of the results (not everything seems right: e.g. 'frun_PE.f90...Maybe it would be good to add a package coverage test to get an idea of missing or inchoate tests (even if it doesn't make sense to reach 100 %).
I did a test to get an idea of the results (not everything seems right: e.g. 'frun_PE.f90')
```
> covr::package_coverage(type = "all")
airGR Coverage: 68.78%
R/PEdaily_Oudin.R: 0.00%
R/RunModel_CemaNeigeGR4H.R: 0.00%
R/RunModel_CemaNeigeGR5H.R: 0.00%
R/TransfoParam_CemaNeige.R: 0.00%
R/TransfoParam_CemaNeigeHyst.R: 0.00%
R/TransfoParam_GR1A.R: 0.00%
R/TransfoParam_GR2M.R: 0.00%
R/TransfoParam_GR4H.R: 0.00%
R/TransfoParam_GR5H.R: 0.00%
R/TransfoParam_GR5J.R: 0.00%
R/TransfoParam_GR6J.R: 0.00%
src/frun_PE.f90: 0.00%
R/CreateCalibOptions.R: 41.04%
R/CreateInputsModel.R: 53.55%
R/PE_Oudin.R: 54.55%
R/CreateRunOptions.R: 65.72%
R/CreateIniStates.R: 68.16%
R/UtilsErrorCrit.R: 69.41%
R/TransfoParam_Lag.R: 70.59%
R/RunModel_GR6J.R: 71.26%
R/RunModel_GR1A.R: 71.67%
R/RunModel_GR4H.R: 72.29%
R/RunModel_GR5J.R: 72.29%
R/CreateInputsCrit.R: 72.43%
R/RunModel_GR2M.R: 73.08%
R/Imax.R: 74.07%
R/RunModel_GR5H.R: 74.19%
R/DataAltiExtrapolation_Valery.R: 76.09%
R/Utils.R: 77.14%
R/RunModel_CemaNeigeGR6J.R: 77.56%
R/RunModel_CemaNeigeGR4J.R: 78.29%
R/RunModel_CemaNeigeGR5J.R: 78.29%
R/RunModel_GR4J.R: 78.31%
R/ErrorCrit_KGE2.R: 79.31%
src/frun_GR5H.f90: 79.41%
R/RunModel_CemaNeige.R: 79.59%
R/plot.OutputsModel.R: 80.37%
R/SeriesAggreg.list.R: 83.19%
R/RunModel_Lag.R: 83.33%
R/SeriesAggreg.data.frame.R: 84.56%
R/UtilsSeriesAggreg.R: 87.50%
R/ErrorCrit_KGE.R: 87.76%
R/TransfoParam_GR4J.R: 88.00%
src/utils_D.f90: 88.57%
R/Calibration_Michel.R: 89.43%
R/Calibration.R: 90.00%
R/ErrorCrit_RMSE.R: 90.48%
R/ErrorCrit_NSE.R: 91.30%
R/ErrorCrit.R: 93.88%
src/frun_GR6J.f90: 98.35%
R/RunModel.R: 100.00%
R/SeriesAggreg.InputsModel.R: 100.00%
R/SeriesAggreg.OutputsModel.R: 100.00%
R/SeriesAggreg.R: 100.00%
R/TransfoParam.R: 100.00%
src/airGR.c: 100.00%
src/frun_CEMANEIGE.f90: 100.00%
src/frun_GR1A.f90: 100.00%
src/frun_GR2M.f90: 100.00%
src/frun_GR4H.f90: 100.00%
src/frun_GR4J.f90: 100.00%
src/frun_GR5J.f90: 100.00%
src/utils_H.f90: 100.00%
```v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/116Manage the number of days by a year according to the complete leap cycle of 4...2021-11-03T14:11:43+01:00Delaigue OlivierManage the number of days by a year according to the complete leap cycle of 400 yearsIt's not important, but it doesn't cost anything to change (except the temporary setting in the .regressionignore file).
Currently airGR use `365.25` day by a year. According to the complete leap cycle of 400 years, he true value should...It's not important, but it doesn't cost anything to change (except the temporary setting in the .regressionignore file).
Currently airGR use `365.25` day by a year. According to the complete leap cycle of 400 years, he true value should be `365.2425`.
Have to be take into account in the following functions:
- `CreateRunOptions()`
- `plot.OutputsModel()`
- `.GetFeatModel()`v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/115Add PCICt date format management2023-09-05T09:54:33+02:00Delaigue OlivierAdd PCICt date format managementTom Chitso & Katie A. Smith from CEH
Friday, March 5, 2021 11:17:28 AM
> I am replying on behalf of Katie and I, as I am running the airGR package as part of our ongoing research.
> The error comes when using `POSIXct` dates with 360-d...Tom Chitso & Katie A. Smith from CEH
Friday, March 5, 2021 11:17:28 AM
> I am replying on behalf of Katie and I, as I am running the airGR package as part of our ongoing research.
> The error comes when using `POSIXct` dates with 360-day years. `POSIXct` does not accept the 29th and 30th February as dates, so gives them NA values. When I use this with `CreateInputsModel` I get the error:
```
“Error in CreateInputsModel(FUN_MOD = get(paste0("RunModel_", model)), :
'DatesR' must not include duplicated values”
```
> I have tried running CreateInputsModel with PCICt dates (which accepts 360 day years), but this gives the error:
```
“Error in CreateInputsModel(FUN_MOD = get(paste0("RunModel_", model)), :
'DatesR' must be defined as 'POSIXlt' or 'POSIXct'”
```
> I have run the model successfully using a dummy set of `POSIXct` dates, and then converted back to the original dates at the end of the process. Is this approach acceptable?
> I have also seen your previous conversation with Katie, but could not quite understand the solution. Do you suggest duplicating the 28th February data to act as in-fill data for the 29th and 30th February?v2.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/98Calculate computation times for each CRAN version2021-11-03T14:13:11+01:00Thirel GuillaumeCalculate computation times for each CRAN versionIn order to keep trace of the evolution of the computing times after modifications of the packages, I think we should automatically calculate the computation times in a similar way as done in Coron et al. (2017) (https://doi.org/10.1016/...In order to keep trace of the evolution of the computing times after modifications of the packages, I think we should automatically calculate the computation times in a similar way as done in Coron et al. (2017) (https://doi.org/10.1016/j.envsoft.2017.05.002), Table B.3.
I propose that:
- each former CRAN version is tested now
- each future new version of the package is tested (before submission for detecting problems(?) and after publication on the CRAN)
- all tests done in Tab. B.3 are performed (i.e. runs and calibrations over 10 years for each hydrological + snow model combinations, 100 tries)
- other functions like `Imax`, `PE_Oudin`, `DataAltiExtrapolation_Valery` are tested (configuration to determine)
- at least one Windows machine and one Linux machine are tested, Mac if possible.v1.8https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/97Parallelize CemaNeige2021-03-02T09:59:34+01:00Thirel GuillaumeParallelize CemaNeigeSimilarly to https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/96, the computation done on several altitude bands of CemaNeige could be parallelized. This remark is potentially valid both for `RunModel_CemaNeige*` calculation but also ...Similarly to https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/96, the computation done on several altitude bands of CemaNeige could be parallelized. This remark is potentially valid both for `RunModel_CemaNeige*` calculation but also for `DataAltiExtrapolation_Valery`.https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/72Add a CONTRIBUTING.md file to the repository2022-02-11T18:28:14+01:00Dorchies DavidAdd a CONTRIBUTING.md file to the repositoryAs several developers work on airGR, it would be a good idea to write development directives in an unified file.
Open source projects use a file named `CONTRIBUTING.md` which include these useful information.
For details about the conte...As several developers work on airGR, it would be a good idea to write development directives in an unified file.
Open source projects use a file named `CONTRIBUTING.md` which include these useful information.
For details about the content of such a file, please have a look to: https://mozillascience.github.io/working-open-workshop/contributing/
It would be great to write some important information such as:
* the workflow: the reporter create a ticket, the developper create a branch and a merge request and work on this branch, the manager merge the branch when the job is done
* the syntax of the commit comments and the policy for versioning with how to fill the files `DESCRIPTION` and `NEWS.md`
* the code syntax: "Capital CamelCase" for variables and functions, 2 spaces tabs, max line length, brackets on `if` statements...
* the testing environment: how to test the package locally and how it is tested by Gitlab-CI
* the release procedure: how to publish the package on CRAN?https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/58T gradient in DataAltiExtrapolation_Valery only valid in Northern hemisphere2021-01-11T12:02:48+01:00Thirel GuillaumeT gradient in DataAltiExtrapolation_Valery only valid in Northern hemisphereI suspect that the DataAltiExtrapolation_Valery T gradient defined in GradT_Valery2010() is only valid for the Northern hemisphere.I suspect that the DataAltiExtrapolation_Valery T gradient defined in GradT_Valery2010() is only valid for the Northern hemisphere.v2.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/46Add vignette about airGRmaps2022-07-18T17:40:11+02:00Delaigue OlivierAdd vignette about airGRmapsIt is probably interesting to write a vignette about the parameter maps of the GR4J, GR5J and GR6J models. These maps are available on the [airGRmaps](https://sunshine.irstea.fr/app/airGRmaps) shiny app. May be it could be mixed in the v...It is probably interesting to write a vignette about the parameter maps of the GR4J, GR5J and GR6J models. These maps are available on the [airGRmaps](https://sunshine.irstea.fr/app/airGRmaps) shiny app. May be it could be mixed in the vignette whose title is *Generalist parameter sets for the GR4J model*.v2.0https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/45Deprecate verbose and warning arguments2021-01-11T18:14:55+01:00Delaigue OlivierDeprecate verbose and warning arguments@guillaume.thirel, are `warning` and `verbose` arguments really useful?
The use of the `suppresseMessages()` and `suppressWarnings()` functions allows you to do the same thing.
Furthermore, in some functions the argument is named `verbos...@guillaume.thirel, are `warning` and `verbose` arguments really useful?
The use of the `suppresseMessages()` and `suppressWarnings()` functions allows you to do the same thing.
Furthermore, in some functions the argument is named `verbose`, but it is used to suppress warning messages (e.g. `SeriesAggreg()`)...v2.0