diff --git a/dev/articles/V04_Closed-loop_regulated_withdrawal.html b/dev/articles/V04_Closed-loop_regulated_withdrawal.html index 0dfb1b2..7422058 100644 --- a/dev/articles/V04_Closed-loop_regulated_withdrawal.html +++ b/dev/articles/V04_Closed-loop_regulated_withdrawal.html @@ -582,7 +582,7 @@

The control logic function
 str(as.list(environment(fIrrigation)))
 #> List of 4
-#>  $ supervisor          :Classes 'Supervisor', 'environment' <environment: 0x564aea28f698> 
+#>  $ supervisor          :Classes 'Supervisor', 'environment' <environment: 0x562393ddf888> 
 #>  $ irrigationObjective :'data.frame':    12 obs. of  4 variables:
 #>   ..$ month: num [1:12] 1 2 3 4 5 6 7 8 9 10 ...
 #>   ..$ 54001: num [1:12] 0 0 0.4 0.8 1 1.2 1.2 1 0.6 0 ...
diff --git a/dev/articles/seinebasin/V04_Open-loop_influenced_flow.html b/dev/articles/seinebasin/V04_Open-loop_influenced_flow.html
index 32fffbf..ab5bc34 100644
--- a/dev/articles/seinebasin/V04_Open-loop_influenced_flow.html
+++ b/dev/articles/seinebasin/V04_Open-loop_influenced_flow.html
@@ -207,38 +207,23 @@ 

Add co (reservoir inflows) while AUBE_R3 will propagate positive flows downstream (reservoir releases).

The configuration on the lake Seine is similar:

-
#> Warning in utils::download.file(link, file.dest, quiet = TRUE, mode = "wb"):
-#> URL
-#> 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJislTUHByDNINjjcwU9DVtasxy86tUQh29fRzjQ8wB8nC2GBZYyOEdJAFujSEowEmNeGScAkUHUEWYANNDPXMQUb6ugZF6sYbGYEUFJdU5qQiDE7LzMmxUk5LTkaXAxqBSw4qkZycFpOnpKOUm1qUm5iZomRVrVSSkZoLCoKU1LTE0pwSpdpaAN4PU1k?type=png':
-#> Timeout of 60 seconds was reached
-#> Warning in plot.mermaid("\ngraph LR\n  BAR-S_06 -->|6km| SEINE_P7\n  SEINE_P7 -->|32km| SEINE_R8\n  SEINE_P7 --> SEINE(SEINE)\n  SEINE--> SEINE_R8\n  SEINE_R8 -->|41.7km| MERY-_22\n  style SEINE_P7 fill:#fcc\n  style SEINE_R8 fill:#fcc\n  style SEINE fill:#ccf\n"): Mermaid diagram generation failed with error:
-#> cannot open URL 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJislTUHByDNINjjcwU9DVtasxy86tUQh29fRzjQ8wB8nC2GBZYyOEdJAFujSEowEmNeGScAkUHUEWYANNDPXMQUb6ugZF6sYbGYEUFJdU5qQiDE7LzMmxUk5LTkaXAxqBSw4qkZycFpOnpKOUm1qUm5iZomRVrVSSkZoLCoKU1LTE0pwSpdpaAN4PU1k?type=png'
+

which can be translated as:

The Pannecière lake is an inline reservoir:

-
#> Warning in utils::download.file(link, file.dest, quiet = TRUE, mode = "wb"):
-#> URL
-#> 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJiskL0Ahw9PNzdfZ0DXLVjMlz9nAM9Y03MFfQ1bWrMcjOrVEIAKoB8RRqDE2NQQLuoUHukfEGRjF5xSWVOakKAQppmTk5VsrJyWkxeUo6SrmpRbmJmSlKVtVKJRmpuSALU1LTEktzSpRqawGXySnl?type=png':
-#> Timeout of 60 seconds was reached
-#> Warning in plot.mermaid("\ngraph LR\nP(PANNECIERE)\nCHAUM_07 -->|0km| P\nP --> |153km| GURGY_02\nstyle P fill:#ccf\n"): Mermaid diagram generation failed with error:
-#> cannot open URL 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJiskL0Ahw9PNzdfZ0DXLVjMlz9nAM9Y03MFfQ1bWrMcjOrVEIAKoB8RRqDE2NQQLuoUHukfEGRjF5xSWVOakKAQppmTk5VsrJyWkxeUo6SrmpRbmJmSlKVtVKJRmpuSALU1LTEktzSpRqawGXySnl?type=png'
+

We can keep the same structure to model it. PANNEC_R corresponds to the flow released by the Pannecière lake, it is acting as an upstream node which means that the flow simulated at CHAUM_07 is no longer routed to downstream.

-
#> Warning in utils::download.file(link, file.dest, quiet = TRUE, mode = "wb"):
-#> URL
-#> 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJislz9nAM9Y03MFfQ1bVTqDHIzq1RCHD083N1jgdKwlgQSUNTY5C0e2iQe2S8gVFMXnFJZU4qXLlCWmZOjpVyWnJyTJ6SjlJualFuYmaKklW1UklGai7I3pTUtMTSnBKl2loAuYMsAg?type=png':
-#> Timeout of 60 seconds was reached
-#> Warning in plot.mermaid("\ngraph LR\nCHAUM_07 --> |0km| PANNEC_R\nPANNEC_R --> |153km| GURGY_02\nstyle PANNEC_R fill:#fcc\n"): Mermaid diagram generation failed with error:
-#> cannot open URL 'https://mermaid.ink/img/pako:eNqrVkrOT0lVslKKyUsvSizIUPAJislz9nAM9Y03MFfQ1bVTqDHIzq1RCHD083N1jgdKwlgQSUNTY5C0e2iQe2S8gVFMXnFJZU4qXLlCWmZOjpVyWnJyTJ6SjlJualFuYmaKklW1UklGai7I3pTUtMTSnBKl2loAuYMsAg?type=png'
+

The Marne lake can be mapped as:

And can be modeled as:

Hence the topological connection to the reservoirs is described in the model as below:

-
+
 reservoir_connections <- read.table(
   file = system.file("seine_data", "network_reservoir_connections.txt", package = "seinebasin"),
   sep = ";", header = TRUE
@@ -254,7 +239,7 @@ 

Add co #> 7 SEINE_P7 73766 MERY-_22 #> 8 SEINE_R8 41766 MERY-_22

Reservoir connections are added to the GRiwrm object:

-
+
 reservoir_connections$length <- reservoir_connections$length / 1000
 reservoir_connections$model <- NA
 reservoir_connections$area <- NA
@@ -266,13 +251,8 @@ 

Add co seine_nodes2$down[seine_nodes2$id == "CHAUM_07"] <- "PANNEC_R" seine_nodes2$length[seine_nodes2$id == "CHAUM_07"] <- 0 griwrm2 <- CreateGRiwrm(seine_nodes2) -plot(griwrm2) -#> Warning in utils::download.file(link, file.dest, quiet = TRUE, mode = "wb"): -#> URL -#> 'https://mermaid.ink/img/pako:eNqdV11vGjEQ_CsnKpQXI90H3w-VSHKlJ1GITIiUupV1Cr7kWiARXNJKSf57Hc5j9txcovYFjdlh7Z2dXYnHxtXtUjWGjWbzMd_kxdB7PCpu1FodDb2jjbovtunq6Nl7bja_bb5trrfp3Y034S84X8pzPppOpR8IgO8mMD8_Tb5Kvy0AEDge8dZc-l0BgMDJ59Hii_R7AsAGFvP5pfT7AuBwxzjm0h8IAATGi2QykYEvABAYJfPLlgwCAYBAfKa_kEFbACDwZTY95zLoCwAEJrPFRSyDgQCwgdF8nsjQFwAIXCTn_FKGHQFweC4f67pCAWC14kmsRY0EANHqWNcVCgASmMxkGAgAW0fMdcFhKACsJPwkmcuwLQAQmM7G-s4gEgCHQKLrCnoCwF4-W_CJDCMBQEXUEnUEgL188mmmRe0KAATORlw_xu8IAPuLxXHckmehAKgGeCQA7OUjPo01MRIWuaG-DfWrIa67ZdHhbdNpfCK5ALB-jJOXJD0BUA3wvgD47oyP12p9fPK6fe_n-skjTXGGqaT1u6Chyc5oGZoPGlruDFpJsyxU40xdyRoEoMGjzgwaWruGhkE0hdIK9v515rOkBX4IHgbAGVdT6cDqZmzkDG9Ji6y8MK4zyu_Ii3kuae12TbMw3e6lTjYIZC612TA7zgowtE4NDToa4YKwnrd_RMkLayWBZUpexz_Qyl3gLI-S1gtqaDia7kfWmGYdOIvFKDc4OLPcAc6aMTV0a7Lh6DrT8QiOhlZzJ7aN61-n99g971jELiJTKWiYc3c9meaHNVayG8p0q1fDw4Qbk3Siupk268t0tV2zR7DMTLHha7SrVbrbeWTTMbKnGFlGjKwcRvYKI8uDkQ3ByBZgZNQZmWdGhpbRyVzc7YqtStfj9P5aLSvvRAsYkYWROWRk2BiRmJHCGek4I_ZnxOOMGJkRtzJiSUZ86CWbQm3XapmnhX -#> [... truncated] -#> Warning in plot.mermaid(diagram, ...): Mermaid diagram generation failed with error: -#> cannot open URL 'https://mermaid.ink/img/pako:eNqdV11vGjEQ_CsnKpQXI90H3w-VSHKlJ1GITIiUupV1Cr7kWiARXNJKSf57Hc5j9txcovYFjdlh7Z2dXYnHxtXtUjWGjWbzMd_kxdB7PCpu1FodDb2jjbovtunq6Nl7bja_bb5trrfp3Y034S84X8pzPppOpR8IgO8mMD8_Tb5Kvy0AEDge8dZc-l0BgMDJ59Hii_R7AsAGFvP5pfT7AuBwxzjm0h8IAATGi2QykYEvABAYJfPLlgwCAYBAfKa_kEFbACDwZTY95zLoCwAEJrPFRSyDgQCwgdF8nsjQFwAIXCTn_FKGHQFweC4f67pCAWC14kmsRY0EANHqWNcVCgASmMxkGAgAW0fMdcFhKACsJPwkmcuwLQAQmM7G-s4gEgCHQKLrCnoCwF4-W_CJDCMBQEXUEnUEgL188mmmRe0KAATORlw_xu8IAPuLxXHckmehAKgGeCQA7OUjPo01MRIWuaG-DfWrIa67ZdHhbdNpfCK5ALB-jJOXJD0BUA3wvgD47oyP12p9fPK6fe_n-skjTXGGqaT1u6Chyc5oGZoPGlruDFpJsyxU40xdyRoEoMGjzgwaWruGhkE0hdIK9v515rOkBX4IHgbAGVdT6cDqZmzkDG9Ji6y8MK4zyu_Ii3kuae12TbMw3e6lTjYIZC612TA7zgowtE4NDToa4YKwnrd_RMkLayWBZUpexz_Qyl3gLI-S1gtqaDia7kfWmGYdOIvFKDc4OLPcAc6aMTV0a7Lh6DrT8QiOhlZzJ7aN61-n99g971jELiJTKWiYc3c9meaHNVayG8p0q1fDw4Qbk3Siupk268t0tV2zR7DMTLHha7SrVbrbeWTTMbKnGFlGjKwcRvYKI8uDkQ3ByBZgZNQZmWdGhpbRyVzc7YqtStfj9P5aLSvvRAsYkYWROWRk2BiRmJHCGek4I_ZnxOOMGJkRtzJiSUZ86

+plot(griwrm2)
+

@@ -280,7 +260,7 @@

Loading reservoir observation

Description of the files, the columns and the type of connection (inlet / outlet) are defined in the list below:

-
+
 lCfgReservoirs <- jsonlite::read_json(system.file("seine_data", "config_reservoirs.json", package = "seinebasin"))
 str(lCfgReservoirs)
 #> List of 4
@@ -322,7 +302,7 @@ 

Loading reservoir observation #> .. .. ..$ type: chr "out"

Then, we load observation data for each reservoir and each connection:

-
+
 library(seinebasin)
 data(QNAT)
 data(Qreservoirs)
@@ -330,7 +310,7 @@

Loading reservoir observation

Create the InputsModel object

-
+
 InputsModel2 <- CreateInputsModel(griwrm2, DatesR, Precip, PotEvap, Qreservoirs)
 #> CreateInputsModel.GRiwrm: Processing sub-basin TRANN_01...
 #> CreateInputsModel.GRiwrm: Processing sub-basin STDIZ_04...
@@ -364,7 +344,7 @@ 

Run simulation with nat

Load calibration parameters

-
+
 # Load RunOptions
 load("_cache/V02.RData")
 # Load calibrated parameters with Michel's method
@@ -376,7 +356,7 @@ 

How to han

A lag parameter is now mandatory for these sub-basins. As no calibration is possible at that stage an arbitrary one will be used (1 m/s).

-
+
 ParamMichel$STDIZ_04 <- c(1, ParamMichel$STDIZ_04)
@@ -384,7 +364,7 @@

Run simulation

We can now run the model, using the parameters previously obtained:

-
+
 RunOptions <- CreateRunOptions(
   InputsModel2,
   IndPeriod_Run = IndPeriod_Run
@@ -481,7 +461,7 @@ 

Compare modeled flows with ob

Load observed flows

-
+
 data(QOBS)
@@ -489,7 +469,7 @@

Comparison with simulated flows

We can compare these simulated flows with influenced discharge measurements:

-
+
 ReduceOutputsModel <- function(OutputsModels, IndPeriod) {
   items <- names(OutputsModels)
   OutputsModelsOut <- sapply(items, function(x) {
@@ -525,7 +505,7 @@ 

Comparison with simulated flows

Save data for next vignettes

-
+
 save(griwrm2, ReduceOutputsModel, file = "_cache/V04.RData")
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 8578dfd..8bbc4e9 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -16,7 +16,7 @@ articles: seinebasin/V05b_Open-loop_influenced_flow_calibration_GR6J: seinebasin/V05b_Open-loop_influenced_flow_calibration_GR6J.html V06_Modelling_regulated_diversion: V06_Modelling_regulated_diversion.html seinebasin/V06_Naturalised_flow_simulation: seinebasin/V06_Naturalised_flow_simulation.html -last_built: 2024-07-31T09:46Z +last_built: 2024-07-31T10:19Z urls: reference: https://inrae.github.io/airGRiwrm/reference article: https://inrae.github.io/airGRiwrm/articles diff --git a/dev/reference/mermaid.html b/dev/reference/mermaid.html index 73213df..da90496 100644 --- a/dev/reference/mermaid.html +++ b/dev/reference/mermaid.html @@ -225,7 +225,7 @@

Examples

#> [1] "https://mermaid.ink/img/pako:eNqrVkrOT0lVslJKy8kvT85ILCpR8AmKyVNQcFTQ1bVTcFLSUcpNLcpNzExRsqpWKslIzQUpTklNSyzNKVGqrQUAjIcUfg?type=png" f <- mermaid(diagram) f -#> [1] "/tmp/RtmpU0uuC0/a0a48ce294b1a6f989506ce145809601.png" +#> [1] "/tmp/RtmpDFUctx/a0a48ce294b1a6f989506ce145809601.png" if (FALSE) { # \dontrun{ # For displaying the diagram in Rmarkdown document knitr::include_graphics(mermaid(diagram))