Commit 1c724095 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

style: add missing argument names and indent code

Refs #123
parent 8055e5ef
Pipeline #24071 passed with stage
in 7 minutes and 52 seconds
......@@ -318,7 +318,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel,
Outputs_Sim <- Outputs_Sim[!duplicated(Outputs_Sim)]
##check_Outputs_Cal
##check_Outputs_Cal
if (is.null(Outputs_Cal)) {
if ("GR" %in% ObjectClass) {
Outputs_Cal <- c("Qsim")
......
......@@ -73,8 +73,8 @@ RunModel_Lag <- function(InputsModel, RunOptions, Param, QcontribDown) {
seq_len(NbUpBasins),
function(iUpBasins) {
iWarmUp <- seq.int(
max(1, RunOptions$IndPeriod_WarmUp[length(RunOptions$IndPeriod_WarmUp)] - floor(PT[iUpBasins])),
max(1, RunOptions$IndPeriod_WarmUp[length(RunOptions$IndPeriod_WarmUp)])
from = max(1, RunOptions$IndPeriod_WarmUp[length(RunOptions$IndPeriod_WarmUp)] - floor(PT[iUpBasins])),
to = max(1, RunOptions$IndPeriod_WarmUp[length(RunOptions$IndPeriod_WarmUp)])
)
ini <- InputsModel$Qupstream[iWarmUp, iUpBasins]
if(length(ini) != floor(PT[iUpBasins] + 1)) {
......
......@@ -10,10 +10,10 @@
#' @noRd
#'
.GetOutputsModelGR <- function(InputsModel,
RunOptions,
RESULTS,
LInputSeries,
CemaNeigeLayers = NULL) {
RunOptions,
RESULTS,
LInputSeries,
CemaNeigeLayers = NULL) {
IndPeriod2 <- (length(RunOptions$IndPeriod_WarmUp)+1):LInputSeries
FortranOutputs <- RunOptions$FortranOutputs$GR
......
......@@ -180,8 +180,8 @@ test_that("1 input with lag of 0.5 time step delay out gives an output delayed o
test_that("Qupstream in different units should return the same result", {
OutputsSD_mm <- RunModel(InputsModel, RunOptions,
Param = ParamSD,
FUN_MOD = RunModel_GR4J)
Param = ParamSD,
FUN_MOD = RunModel_GR4J)
InputsModel_m3 <- CreateInputsModel(
FUN_MOD = RunModel_GR4J,
DatesR = BasinObs$DatesR,
......@@ -208,8 +208,8 @@ test_that("Qupstream in different units should return the same result", {
QupstrUnit = "m3/s"
)
OutputsSD_m3s <- RunModel(InputsModel_m3s, RunOptions,
Param = ParamSD,
FUN_MOD = RunModel_GR4J)
Param = ParamSD,
FUN_MOD = RunModel_GR4J)
expect_equal(OutputsSD_mm$Qsim, OutputsSD_m3s$Qsim)
InputsModel_ls <- CreateInputsModel(
......
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