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

Merge branch '50-test-fail-after-airgr-update-on-outputing-warm-up-qsim-2' into 'dev'

Resolve "Test fail after airGR update on outputing warm-up Qsim"

Closes #50

See merge request !20
parents 47d4dc4e 495105b9
Pipeline #24500 failed with stages
in 7 minutes and 57 seconds
......@@ -5,7 +5,7 @@ stages:
default:
tags: [docker]
image: rocker/tidyverse:3.6.3
image: rocker/verse:latest
cache:
paths:
......@@ -23,14 +23,14 @@ cache:
before_script:
- mkdir -p $R_LIBS_USER $BUILD_LOGS_DIR
- echo "R_LIBS='$R_LIBS_USER'" > .Renviron
- R -e 'install.packages("rcmdcheck")'
- R -e 'devtools::install_deps(dep = T)'
.check:
stage: checks
script:
- if [[ $NOT_CRAN == "false" ]]; then sudo apt-get update && sudo apt-get install -y qpdf; fi
- R -e 'devtools::check(check_dir = Sys.getenv("CHECK_DIR"), cran = !as.logical(Sys.getenv("NOT_CRAN")), env_vars = c(NOT_CRAN = Sys.getenv("NOT_CRAN")))'
- R -e 'if (length(devtools::check_failures(path = Sys.getenv("BUILD_LOGS_DIR"), note = FALSE)) > 0) stop()'
- if [[ $NOT_CRAN == "false" ]]; then sudo apt-get update && sudo apt-get install -y --no-install-recommends texlive-fonts-recommended qpdf; fi
- R -e 'rcmdcheck::rcmdcheck(args = ifelse(as.logical(Sys.getenv("NOT_CRAN")), "--no-manual", "--as-cran"), error_on = "warning")'
check_not_cran:
variables:
......@@ -44,10 +44,11 @@ check_as_cran:
website:
stage: website
# only:
# refs:
# - master
# - tags
only:
refs:
- master
- dev
- tags
script:
- R -e 'remotes::install_gitlab("in-wop/seinebasin", host = "gitlab.irstea.fr")'
- R -e 'pkgdown::build_site()'
......
......@@ -55,6 +55,19 @@ RunModel.Supervisor <- function(x, RunOptions, Param, ...) {
})
)
# Initialisation of model states by running the model with no supervision on warm-up period
RunOptionsWarmUp <- RunOptions
for(id in names(x$InputsModel)) {
RunOptionsWarmUp[[id]]$IndPeriod_Run <- RunOptionsWarmUp[[id]]$IndPeriod_WarmUp
RunOptionsWarmUp[[id]]$IndPeriod_WarmUp <- 0L
RunOptionsWarmUp[[id]]$Outputs_Sim <- c("StateEnd", "Qsim")
}
x$OutputsModel <- suppressMessages(
RunModel.GRiwrmInputsModel(x$InputsModel,
RunOptions = RunOptionsWarmUp,
Param = Param)
)
# Adapt RunOptions to step by step simulation
for(id in getSD_Ids(x$InputsModel)) {
RunOptions[[id]]$IndPeriod_WarmUp <- 0L
......
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