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

feat: Add observed flows to vignette 02_First_run.Rmd

Refs #2
Showing with 9 additions and 1 deletion
+9 -1
...@@ -71,6 +71,9 @@ l <- lapply(urls, load_ts) ...@@ -71,6 +71,9 @@ l <- lapply(urls, load_ts)
gits <- Gits(ginet$id[1], l[[ginet$id[1]]], cols = list(date = "Date", Precip = "Ptot", PotEvap = "ETP", Qobs = "Qnat")) gits <- Gits(ginet$id[1], l[[ginet$id[1]]], cols = list(date = "Date", Precip = "Ptot", PotEvap = "ETP", Qobs = "Qnat"))
for(id in ginet$id) { for(id in ginet$id) {
l[[id]]$Qnat
l[[id]]$Qnat <- l[[id]]$Qnat * 86.4 / girop$area[girop$id == id]
l[[id]]$Qnat[l[[id]]$Qnat < 0] <- NA
gits <- merge(gits, Gits(id, l[[id]], cols = list(date = "Date", Precip = "Ptot", PotEvap = "ETP", Qobs = "Qnat"))) gits <- merge(gits, Gits(id, l[[id]], cols = list(date = "Date", Precip = "Ptot", PotEvap = "ETP", Qobs = "Qnat")))
} }
``` ```
......
...@@ -55,7 +55,12 @@ OutputsModels <- RunModelGriwrm( ...@@ -55,7 +55,12 @@ OutputsModels <- RunModelGriwrm(
## Plot the result for each basin ## Plot the result for each basin
```{r, fig.height = 5, fig.width = 8} ```{r, fig.height = 5, fig.width = 8}
htmltools::tagList(lapply(names(OutputsModels), function(x) plot(OutputsModels[[x]], main = x))) htmltools::tagList(lapply(
names(OutputsModels),
function(x) {
plot(OutputsModels[[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