Semi-distributed version of airGR models
A semi-distributed version of the models present in airGr have been mentioned several times in the past and recently:
- requests from external/internal users
- possibility of discarding GRSD for having a more flexible and user-friendly semi-distributed modelling framework
- need for an HYDRO intern to have rapidly the possibility to model simple catchments with one or two upstream nested catchments.
We brainstormed (Olivier, Charles, Mamoun and myself) 2 days ago. Here is a summary of an option of semi-distribution of airGR models we could easily and somehow rapidly implement: Concept:
- the user would be supposed to know the dependency between catchments
- the user would implement a loop that browses the dependency tree
- for upstream catchments, run/calibrate normally the GR models
- for downstream catchments, run/calibrate GR models on the downstream contributive area only, and add the lagged upstream simulated discharge
- it means that for each subcatchment, specifying the specific InputsModel, RunOptions and CalibOptions would still be necessary
Implementation:
- Upgrade the CreateInputsModel function to add the following (optional for catchments that have upstream catchments): a matrix of upstream simulated discharges, a matrix of upstream areas + downstream area (to convert discharges from mm to m3/s), a matrix of upstream hydraulic lengths
- create a RunModel_SD (or preferably upgrade the RunModel function) that takes into account the upgraded InputsModel and a Param vector that also contains the LAG parameter: this RunModel_SD function would simply be the addition of downstream discharge and the convolution product between lag and upstream discharge (see code below)
- Upgrade the CreateCalibOptions function to add 1 to the number of parameters for the SD case, add quantiles and a transformation for this parameter and add a "SD" type
- Create a TransfoParam_Lag function (same transfo as X4?).
This options would work well for sequential calibration of catchments (not for conjoint calibration of clusters of catchments).
Old RunModel
function (InputsModel, RunOptions, Param, FUN_MOD)
{
FUN_MOD <- match.fun(FUN_MOD)
return(FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param))
}
New RunModel
function (InputsModel, RunOptions, Param, FUN_MOD)
{
FUN_MOD <- match.fun(FUN_MOD)
Q_down <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param)
if (SEMI_Distributed) {
Q_tot <- Q_down + SUM(of lagged (cf Param$LAG) upstream discharges given in InputsModel)
} else {
return(Q_down)
}
}