Commit dd7ef429 authored by Dorchies David's avatar Dorchies David
Browse files

feat: add `Param` to `OutputsModel`

Refs #111
parent 265725dc
......@@ -295,7 +295,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel,
##check_Outputs_Cal_and_Sim
##Outputs_all
Outputs_all <- c("DatesR", unlist(FortranOutputs), "WarmUpQsim", "StateEnd")
Outputs_all <- c("DatesR", unlist(FortranOutputs), "WarmUpQsim", "StateEnd", "Param")
##check_Outputs_Sim
if (!is.vector(Outputs_Sim)) {
......
......@@ -167,5 +167,6 @@ RunModel_CemaNeigeGR4H <- function(InputsModel, RunOptions, Param) {
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers)
}
......@@ -166,5 +166,6 @@ RunModel_CemaNeigeGR4J <- function(InputsModel, RunOptions, Param) {
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers)
}
......@@ -177,5 +177,6 @@ RunModel_CemaNeigeGR5H <- function(InputsModel, RunOptions, Param) {
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers)
}
......@@ -164,5 +164,6 @@ RunModel_CemaNeigeGR5J <- function(InputsModel, RunOptions, Param) {
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers)
}
......@@ -169,6 +169,7 @@ RunModel_CemaNeigeGR6J <- function(InputsModel, RunOptions, Param) {
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers)
}
......@@ -47,5 +47,6 @@ RunModel_GR1A <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -69,5 +69,6 @@ RunModel_GR2M <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -74,5 +74,6 @@ RunModel_GR4H <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -69,5 +69,6 @@ RunModel_GR4J <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -88,5 +88,6 @@ RunModel_GR5H <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -74,5 +74,6 @@ RunModel_GR5J <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -79,5 +79,6 @@ RunModel_GR6J <- function(InputsModel, RunOptions, Param) {
.GetOutputsModelGR(InputsModel,
RunOptions,
RESULTS,
LInputSeries)
LInputSeries,
Param)
}
......@@ -4,6 +4,7 @@
#' @param RunOptions output of [CreateRunOptions]
#' @param RESULTS outputs of [.Fortran]
#' @param LInputSeries number of time steps of warm-up + run periods
#' @param Param [numeric] vector of model parameters
#' @param CemaNeigeLayers outputs of Cemaneige pre-process
#'
#' @return OutputsModel object
......@@ -13,6 +14,7 @@
RunOptions,
RESULTS,
LInputSeries,
Param,
CemaNeigeLayers = NULL) {
IndPeriod2 <- (length(RunOptions$IndPeriod_WarmUp)+1):LInputSeries
......@@ -46,6 +48,10 @@
OutputsModel$StateEnd <- RESULTS$StateEnd
}
if ("Param" %in% RunOptions$Outputs_Sim) {
OutputsModel$Param <- Param
}
class(OutputsModel) <- c("OutputsModel", class(RunOptions)[-1])
return(OutputsModel)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment