addReservoirsGRiwrm.R 1.08 KiB
#' Add Seine lakes-reservoirs to the `GRiwrm` object
#'
#' @param griwrm Network description (See [CreateGRiwrm])
#'
#' @return `GRiwrm` object with connections of the reservoirs to the Seine network
#' @export
#'
addReservoirsGRiwrm <- function(griwrm) {
    dfConnect <- data.frame(
        id = c(
            "P_BLAISE",
            "P_MARNE",
            "R_MARNE",
            "P_AUBE",
            "R_AUBE",
            "P_SEINE",
            "R_SEINE",
            "P_PANN",
            "R_PANN"
        down = c(
            "H5091010",
            "H5071010",
            "H5091010",
            "H1231010",
            "H1231010",
            "H0800010",
            "H0800010",
            "H2021010",
            "H2021010"
        length = c(47.3, 3.4, 19.9, 24.1, 2.7, 22, 4, 3, 3),
        model = NA,
        area = NA,
        nom = NA,
        lambert2.x = NA,
        lambert2.y = NA
    griwrmLac <- rbind(griwrm,
                       dfConnect)
    griwrmLac$model[!is.na(griwrmLac$area)] <-
        "RunModel_CemaNeigeGR4J"
    return(griwrmLac)