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
  • #204
Closed
Open
Issue created Jan 06, 2026 by Dorchies David@david.dorchiesDeveloper

Intempestive warnings in CreateRunOptions since v1.7.8

Resolution of #167 (closed) and especially the commit 6b9a35fb introduced a bug.

There is now a systematic call to CreateIniStates when IniStates in NULL in CreateRunOptions in order to standardize the creation of the vectorized IniStates instead of creating manually in CreateRunOptions.

Unfortunately, this call is global for all possible GR models and provides default values for all possible states:

    IniStates <- CreateIniStates(
      FUN_MOD = FUN_MOD,
      InputsModel = InputsModel,
      IsHyst = IsHyst,
      IsIntStore = IsIntStore,
      ExpStore = 0,
      IntStore = 0,
      GCemaNeigeLayers = rep(0, NLayers),
      eTGCemaNeigeLayers = rep(0, NLayers),
      GthrCemaNeigeLayers = rep(0, NLayers),
      GlocmaxCemaNeigeLayers = rep(0, NLayers),
      verbose = warnings
    )

This results in intempestive warnings for all models that don't need such initial states.

For example in https://forge.inrae.fr/airgriwrm/airgriwrm/-/issues/195 with these kind of warnings:

Warning ('test-UpdateQsimUpstream.R:2:1'): (code run outside of `test_that()`)
'RunModel_GR4J' does not require 'GCemaNeigeLayers' 'GCemaNeigeLayers', 'GthrCemaNeigeLayers' and 'GlocmaxCemaNeigeLayers'. Values set to NA
Warning ('test-UpdateQsimUpstream.R:2:1'): (code run outside of `test_that()`)
'RunModel_GR4J' does not require 'IntStore'. Values set to NA
Warning ('test-UpdateQsimUpstream.R:2:1'): (code run outside of `test_that()`)
'RunModel_GR4J' does not require 'ExpStore'. Value set to NA

As this call is always done when IniStates in NULL, a simple solution would be to change the call as follow:

    IniStates <- CreateIniStates(
      FUN_MOD = FUN_MOD,
      InputsModel = InputsModel,
      IsHyst = IsHyst,
      IsIntStore = IsIntStore,
      ExpStore = 0,
      IntStore = 0,
      GCemaNeigeLayers = rep(0, NLayers),
      eTGCemaNeigeLayers = rep(0, NLayers),
      GthrCemaNeigeLayers = rep(0, NLayers),
      GlocmaxCemaNeigeLayers = rep(0, NLayers),
      verbose = FALSE
    )

In order to shut down all irrelevant warnings.

Assignee
Assign to
Time tracking