Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • airGR airGR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 59
    • Issues 59
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge gitlab.irstea.fr sera définitivement arrêtée le 30 juin 2026. Nous vous invitons à migrer vos projets vers la forge INRAE. Vous trouverez plus de détails sur le blog de la forge INRAE.

  • HYCAR-HydroHYCAR-Hydro
  • airGRairGR
  • Issues
  • #208
Closed
Open
Issue created Mar 07, 2026 by Dorchies David@david.dorchiesDeveloper

.GetOutputsModelGR: crash when RunOptions$Outputs_Sim contains "WarmUpQsim"

Try this:

data(L0123001)
InputsModel <- CreateInputsModel(
  FUN_MOD = RunModel_GR4J,
  DatesR = BasinObs$DatesR,
  Precip = BasinObs$P,
  PotEvap = BasinObs$E
)
Param <- c(X1 = 257.238, X2 = 1.012, X3 = 88.235, X4 = 2.208)

  Ind_Run <- seq(
    which(format(BasinObs$DatesR, format = "%Y-%m-%d") == "1990-01-01"),
    which(format(BasinObs$DatesR, format = "%Y-%m-%d") == "1990-12-31")
  )
  RunOptions <- suppressWarnings(CreateRunOptions(
    FUN_MOD = RunModel_GR4J,
    InputsModel = InputsModel,
    IndPeriod_Run = Ind_Run,
    Outputs_Sim = c("WarmUpQsim", "Qsim")
  ))
  OutputsModel <- RunModel(
    FUN_MOD = RunModel_GR4J,
    InputsModel = InputsModel,
    RunOptions = RunOptions,
    Param = Param
  )

... and admire:

Error in `RESULTS$Outputs[seq_len(length(RunOptions$
    IndPeriod_WarmUp)), which(
    FortranOutputs == "Qsim")]`:
! subscript out of bounds

The error is in .GetOutputsModelGR on this assignation:

    OutputsModel$RunOptions$WarmUpQsim <- RESULTS$Outputs[seq_len(length(RunOptions$IndPeriod_WarmUp)),
                                               which(FortranOutputs == "Qsim")]

The column selection should be which(names(seqOutputs) == "Qsim")

Assignee
Assign to
Time tracking