Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • airGR airGR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • HYCAR-Hydro
  • airGRairGR
  • Issues
  • #137

Closed
Open
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