Commit 335f313f authored by Dorchies David's avatar Dorchies David
Browse files

fix: saved plots on VCN10 for RCP 4.5 and 8.5

parent d599413d
Pipeline #31850 passed with stages
in 47 minutes and 17 seconds
......@@ -11,7 +11,7 @@ cfg <- loadConfig()
L'exécution des simulations avec les projections DRIAS 2020 entre 1950 (ou 1951) et 2100 et l'enregistrement des résultats au format définis à la section \@ref(desinfluencement-simulation) s'effectue avec la fonction suivante qui regroupe toutes les opérations à effectuer pour lancer et sauvegarder la simulation d'un scénario climatique&nbsp;:
```{r}
```{r, eval=!cfg$data$cloud}
LoadRunSave <- function(rcp, scenario) {
message("Processing ", rcp, " scenario ", scenario, "...")
file <- paste0(paste("BasinObs", rcp, scenario, sep = "_"), ".RDS")
......@@ -133,15 +133,18 @@ Enregistrement des graphiques pour toutes les stations sur le cloud&nbsp;:
```{r, eval=!cfg$data$cloud}
apply(hydratec$stations, 1, function(station) {
CdSiteHydro <- station["CdSiteHydro"]
p <- plotVCN(CdSiteHydro, dfVCN10)
path <- getDataPath(cfg$Qnat$path, "Analyses/Drias2020/Qnat-v1")
filename <- paste0(
paste("VCN10",
CdSiteHydro,
iconv(gsub(" |:|\\.|'", "_", station["nom"]), from = "UTF-8", to = "ASCII//TRANSLIT"),
sep = "_"),
".png" )
ggsave(filename = filename, plot = p, path = path)
lapply(cfg$hydroclim$drias$rcp[-1], function(rcp) {
p <- plotVCN(CdSiteHydro,
dfVCN10[grep(paste0("Hydratec|Inrae|", gsub("\\.", "\\\\.", rcp)), dfVCN10$source), ])
path <- getDataPath(cfg$Qnat$path, "Analyses/Drias2020/Qnat-v1", rcp)
filename <- paste0(
paste("VCN10",
CdSiteHydro,
iconv(gsub(" |:|\\.|'", "_", station["nom"]), from = "UTF-8", to = "ASCII//TRANSLIT"),
sep = "_"),
".png" )
ggplot2::ggsave(filename = filename, plot = p, path = path)
})
})
```
......
Markdown is supported
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