Skip to content
GitLab
Projects Groups Topics 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 64
    • Issues 64
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 9
    • Merge requests 9
  • 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

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous recommandons d'y créer tous vos nouveaux projets.

  • HYCAR-HydroHYCAR-Hydro
  • airGRairGR
  • Issues
  • #73
Closed
Open
Issue created Dec 03, 2020 by Delaigue Olivier@olivier.delaigueOwner

Check conditionnal test in Calibration

@guillaume.thirel and @david.dorchies, I'm not sure to understand the following bug. I'm a little lost in the conditions of the Calibration_Michel() function (not a surprise!).

library(airGR)

## data.frame of daily observed data of a low-land basin
data(L0123001, package = "airGR")
BV_L0123001 <- BasinObs[0001:6000, c("DatesR", "P", "E", "Qmm", "T")]
BI_L0123001 <- BasinInfo
BasinObs <- SeriesAggreg(BV_L0123001[BV_L0123001$DatesR < "2000-06-01",], Format = "%Y%m")

## preparation of the InputsModel object with daily time step data
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR2M, DatesR = BasinObs$DatesR,
                                 Precip = BasinObs$P, PotEvap = BasinObs$E)

## conversion of InputsModel to monthly time step
InputsModel <- SeriesAggreg(InputsModel, Format = "%Y%m")

## run period selection
Ind_Run <- seq(which(format(InputsModel$DatesR, format = "%Y-%m") == "1994-01"),
               which(format(InputsModel$DatesR, format = "%Y-%m") == "1998-12"))


RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR2M, InputsModel = InputsModel, 
                               IndPeriod_WarmUp = NULL, IndPeriod_Run = Ind_Run, verbose = FALSE) 


InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, 
                               RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run], transfo = "")


CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR2M, FUN_CALIB = Calibration_Michel)


OutputsCalib <- Calibration_Michel(InputsModel = InputsModel, RunOptions = RunOptions, 
                                   InputsCrit = InputsCrit, CalibOptions = CalibOptions, 
                                   FUN_MOD = RunModel_GR2M)
Error in Calibration_Michel(InputsModel = InputsModel, RunOptions = RunOptions,  : 
  'FUN_TRANSFO' was not found (in 'Calibration' function)

The function stops at the condition of line 189.

> traceback()
2: stop("'FUN_TRANSFO' was not found (in 'Calibration' function)") at Calibration_Michel.R#189
1: Calibration_Michel(InputsModel = InputsModel, RunOptions = RunOptions, 
       InputsCrit = InputsCrit, CalibOptions = CalibOptions, FUN_MOD = RunModel_GR2M)
Edited Jan 06, 2021 by Delaigue Olivier
Assignee
Assign to
Time tracking