Commit fbe8fd2d authored by Dorchies David's avatar Dorchies David
Browse files

feat(vignette): add plot of calibrated run

Refs #3
Showing with 33 additions and 3 deletions
+33 -3
...@@ -44,4 +44,34 @@ str(CalibOptions) ...@@ -44,4 +44,34 @@ str(CalibOptions)
OutputsCalib <- Calibration(InputsModel, RunOptions, InputsCrit, CalibOptions) OutputsCalib <- Calibration(InputsModel, RunOptions, InputsCrit, CalibOptions)
``` ```
```{r}
save(OutputsCalib, file = "_cache/V03.RData")
```
## Run model with Michel calibration
```{r}
giropMichel <- girop
for(id in giropMichel$id) {
giropMichel$params[giropMichel$id == id] <- list(OutputsCalib[[id]]$Param)
}
OutputsModels <- RunModel(
InputsModel = InputsModel,
RunOptions = RunOptions,
girop = giropMichel
)
```
## Plot the result for each basin
```{r, fig.height = 5, fig.width = 8}
htmltools::tagList(lapply(
names(OutputsModels),
function(x) {
plot(OutputsModels[[x]], Qobs = gits[[x]]$Qobs[RunOptions[[x]]$IndPeriod_Run] , main = x)
}
))
```
...@@ -104,7 +104,7 @@ RunOptions <- CreateRunOptions( ...@@ -104,7 +104,7 @@ RunOptions <- CreateRunOptions(
## Run the SD model for the whole basin ## Run the SD model for the whole basin
```{r} ```{r}
OutputsModels <- RunModel( OutputsModelsClimAware <- RunModel(
InputsModel = InputsModel, InputsModel = InputsModel,
RunOptions = RunOptions, RunOptions = RunOptions,
girop girop
...@@ -121,9 +121,9 @@ save(RunOptions, file = "_cache/V02.RData") ...@@ -121,9 +121,9 @@ save(RunOptions, file = "_cache/V02.RData")
```{r, fig.height = 5, fig.width = 8} ```{r, fig.height = 5, fig.width = 8}
htmltools::tagList(lapply( htmltools::tagList(lapply(
names(OutputsModels), names(OutputsModelsClimAware),
function(x) { function(x) {
plot(OutputsModels[[x]], Qobs = gits[[x]]$Qobs[IndPeriod_Run] , main = x) plot(OutputsModelsClimAware[[x]], Qobs = gits[[x]]$Qobs[IndPeriod_Run] , main = x)
} }
)) ))
``` ```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment