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 60
    • Issues 60
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 7
    • Merge requests 7
  • 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
  • #137
Closed
Open
Issue created Oct 11, 2021 by Delaigue Olivier@olivier.delaigueOwner

Fix .ExtractOutputsModel function to manage the new elements of OutputsModel

The .ExtractOutputsModel() function no longer works because of the addition of the Param and WarmUpQsim elements in the OutputsModel object.

There are several solutions to solve the problem:

  • handle each exception in the function .ExtractOutputsModel() (not recommended from my point of view)
  • manage the Param and WarmUpQsim elements as the different elements of StateEnd, i.e. in a list

If the second solution is chosen, we need to mange the .GetOutputsModelGR() (UtilsRunModel.R) as following. But the fact that the WarmUpQsim element has a specific "WarmUpOutputsModelItem" class is also a problem.

if ("WarmUpQsim" %in% RunOptions$Outputs_Sim) {
  OutputsModel$RunOptions$WarmUpQsim <- RESULTS$Outputs[seq_len(length(RunOptions$IndPeriod_WarmUp)),
                                                        which(FortranOutputs == "Qsim")]
  class(OutputsModel$RunOptions$WarmUpQsim) <- c("WarmUpOutputsModelItem", class(OutputsModel$RunOptions$WarmUpQsim))
}

if ("Param" %in% RunOptions$Outputs_Sim) {
  OutputsModel$RunOptions$Param <- Param
}

.ExtractOutputsModel():

if (!is.null(x$RunOptions)) {
  res$RunOptions <- x$RunOptions
}
Assignee
Assign to
Time tracking