Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • airGR airGR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 8
    • Merge requests 8
  • 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
  • HYCAR-HydroHYCAR-Hydro
  • airGRairGR
  • Issues
  • #57
Closed
Open
Issue created May 14, 2020 by Thirel Guillaume@guillaume.thirelOwner

Set number of IniStates and StateEnd values when only CemaNeige is used

For initial states (e.g. RunOptions$IniStates) or final states (OutputsModel$StateEnd, we store 7 + 60(*24) + Nlayers*4 states at the daily or hourly time steps. This is not useful when only CemaNeige is used. For exemple, for GR2M we store only 2 states, not 7 + 60. I propose to modify CreateRunOptions lines accordingly:

  NState <- NULL
  if ("GR" %in% ObjectClass | "CemaNeige" %in% ObjectClass) {
    if ("hourly"  %in% ObjectClass) {
      NState <- 7 + 3 * 24 * 20+ 4 * NLayers
    }
    if ("daily"   %in% ObjectClass) {
      NState <- 7 + 3 * 20 + 4 * NLayers
    }
    if ("monthly" %in% ObjectClass) {
      NState <- 2
    }
    if ("yearly"  %in% ObjectClass) {
      NState <- 1
    }
  }

should become :

  NState <- 0
  if ("GR" %in% ObjectClass) {
    if ("hourly"  %in% ObjectClass) {
      NState <- 7 + 3 * 24 * 20
    }
    if ("daily"   %in% ObjectClass) {
      NState <- 7 + 3 * 20
    }
    if ("monthly" %in% ObjectClass) {
      NState <- 2
    }
    if ("yearly"  %in% ObjectClass) {
      NState <- 1
    }
  }  
  if ("CemaNeige" %in% ObjectClass) {
    if (!"yearly"  %in% ObjectClass) {
      NState <- NState + 4 * NLayers
    }
  }

In addition, RunModel_CemaNeige.R and CreateIniStates.R should be modified accordingly. This will ease the implementation of RunModel_CemaNeigeGR2M.

Edited Nov 03, 2021 by Delaigue Olivier
Assignee
Assign to
Time tracking