Commit c63f3cfe authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Mise en forme des examples

parent 6f152d24
...@@ -18,12 +18,12 @@ InputsCrit <- CreateInputsCrit(FUN_CRIT=ErrorCrit_NSE,InputsModel=InputsModel, ...@@ -18,12 +18,12 @@ InputsCrit <- CreateInputsCrit(FUN_CRIT=ErrorCrit_NSE,InputsModel=InputsModel,
RunOptions=RunOptions,Qobs=BasinObs$Qmm[Ind_Run]) RunOptions=RunOptions,Qobs=BasinObs$Qmm[Ind_Run])
## preparation of CalibOptions object ## preparation of CalibOptions object
CalibOptions <- CreateCalibOptions(FUN_MOD=RunModel_GR4J,FUN_CALIB=Calibration_HBAN) CalibOptions <- CreateCalibOptions(FUN_MOD=RunModel_GR4J,FUN_CALIB=Calibration_Michel)
## calibration ## calibration
OutputsCalib <- Calibration(InputsModel=InputsModel,RunOptions=RunOptions,InputsCrit=InputsCrit, OutputsCalib <- Calibration(InputsModel=InputsModel,RunOptions=RunOptions,InputsCrit=InputsCrit,
CalibOptions=CalibOptions,FUN_MOD=RunModel_GR4J,FUN_CRIT=ErrorCrit_NSE, CalibOptions=CalibOptions,FUN_MOD=RunModel_GR4J,FUN_CRIT=ErrorCrit_NSE,
FUN_CALIB=Calibration_HBAN) FUN_CALIB=Calibration_Michel)
## simulation ## simulation
Param <- OutputsCalib$ParamFinalR Param <- OutputsCalib$ParamFinalR
......
require(airGR) require(airGR)
## transformation Real->Transformed for the GR4J model ## transformation Raw->Transformed for the GR4J model
Xreal <- matrix( c( 221.41, -3.63, 30.00, 1.37, Xraw <- matrix( c( 221.41, -3.63, 30.00, 1.37,
347.23, -1.03, 60.34, 1.76, 347.23, -1.03, 60.34, 1.76,
854.06, -0.10, 148.41, 2.34), 854.06, -0.10, 148.41, 2.34),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xtran <- TransfoParam(ParamIn=Xreal,Direction="RT",FUN_TRANSFO=TransfoParam_GR4J) Xtran <- TransfoParam(ParamIn=Xraw ,Direction="RT",FUN_TRANSFO=TransfoParam_GR4J)
## transformation Transformed->Real for the GR4J model ## transformation Transformed->Raw for the GR4J model
Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10, Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10,
+3.90, -0.90, +4.10, -8.70, +3.90, -0.90, +4.10, -8.70,
+4.50, -0.10, +5.00, -8.10), +4.50, -0.10, +5.00, -8.10),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xreal <- TransfoParam(ParamIn=Xtran,Direction="TR",FUN_TRANSFO=TransfoParam_GR4J) Xraw <- TransfoParam(ParamIn=Xtran,Direction="TR",FUN_TRANSFO=TransfoParam_GR4J)
require(airGR) require(airGR)
## transformation Real->Transformed for the CemaNeige module ## transformation Raw->Transformed for the CemaNeige module
Xreal <- matrix( c( 0.19, 1.73, Xraw <- matrix( c( 0.19, 1.73,
0.39, 2.51, 0.39, 2.51,
0.74, 4.06), 0.74, 4.06),
ncol=2,byrow=TRUE) ncol=2,byrow=TRUE)
Xtran <- TransfoParam_CemaNeige(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_CemaNeige(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the CemaNeige module ## transformation Transformed->Raw for the CemaNeige module
Xtran <- matrix( c( -6.26, +0.55, Xtran <- matrix( c( -6.26, +0.55,
-2.13, +0.92, -2.13, +0.92,
+4.86, +1.40) +4.86, +1.40)
,ncol=2,byrow=TRUE) ,ncol=2,byrow=TRUE)
Xreal <- TransfoParam_CemaNeige(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_CemaNeige(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR1A model ## transformation Raw->Transformed for the GR1A model
Xreal <- matrix( c( 0.625, Xraw <- matrix( c( 0.625,
1.250, 1.250,
1.875), 1.875),
ncol=1,byrow=TRUE) ncol=1,byrow=TRUE)
Xtran <- TransfoParam_GR1A(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR1A(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR1A model ## transformation Transformed->Raw for the GR1A model
Xtran <- matrix( c( -5.00, Xtran <- matrix( c( -5.00,
+0.00, +0.00,
+5.00), +5.00),
ncol=1,byrow=TRUE) ncol=1,byrow=TRUE)
Xreal <- TransfoParam_GR1A(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR1A(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR2M model ## transformation Raw->Transformed for the GR2M model
Xreal <- matrix( c( 221.41, -1.00, Xraw <- matrix( c( 221.41, -1.00,
347.23, +0.00, 347.23, +0.00,
854.01, +1.00), 854.01, +1.00),
ncol=2,byrow=TRUE) ncol=2,byrow=TRUE)
Xtran <- TransfoParam_GR2M(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR2M(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR2M model ## transformation Transformed->Raw for the GR2M model
Xtran <- matrix( c( +3.60, -5.00, Xtran <- matrix( c( +3.60, -5.00,
+3.90, +0.00, +3.90, +0.00,
+4.50, +5.00), +4.50, +5.00),
ncol=2,byrow=TRUE) ncol=2,byrow=TRUE)
Xreal <- TransfoParam_GR2M(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR2M(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR4H model ## transformation Raw->Transformed for the GR4H model
Xreal <- matrix( c( 221.41, -3.63, 30.00, 1.37, Xraw <- matrix( c( 221.41, -3.63, 30.00, 1.37,
347.23, -1.03, 60.34, 1.76, 347.23, -1.03, 60.34, 1.76,
854.06, -0.10, 148.41, 2.34), 854.06, -0.10, 148.41, 2.34),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xtran <- TransfoParam_GR4H(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR4H(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR4H model ## transformation Transformed->Raw for the GR4H model
Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10, Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10,
+3.90, -0.90, +4.10, -8.70, +3.90, -0.90, +4.10, -8.70,
+4.50, -0.10, +5.00, -8.10), +4.50, -0.10, +5.00, -8.10),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xreal <- TransfoParam_GR4H(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR4H(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR4J model ## transformation Raw->Transformed for the GR4J model
Xreal <- matrix( c( 221.41, -3.63, 30.00, 1.37, Xraw <- matrix( c( 221.41, -3.63, 30.00, 1.37,
347.23, -1.03, 60.34, 1.76, 347.23, -1.03, 60.34, 1.76,
854.06, -0.10, 148.41, 2.34), 854.06, -0.10, 148.41, 2.34),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xtran <- TransfoParam_GR4J(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR4J(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR4J model ## transformation Transformed->Raw for the GR4J model
Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10, Xtran <- matrix( c( +3.60, -2.00, +3.40, -9.10,
+3.90, -0.90, +4.10, -8.70, +3.90, -0.90, +4.10, -8.70,
+4.50, -0.10, +5.00, -8.10), +4.50, -0.10, +5.00, -8.10),
ncol=4,byrow=TRUE) ncol=4,byrow=TRUE)
Xreal <- TransfoParam_GR4J(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR4J(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR5J model ## transformation Raw->Transformed for the GR5J model
Xreal <- matrix( c( 221.41, -2.65, 27.11, 1.37, -0.76, Xraw <- matrix( c( 221.41, -2.65, 27.11, 1.37, -0.76,
347.23, -0.64, 60.34, 1.76, 0.30, 347.23, -0.64, 60.34, 1.76, 0.30,
854.01, -0.10, 148.41, 2.34, 0.52), 854.01, -0.10, 148.41, 2.34, 0.52),
ncol=5,byrow=TRUE) ncol=5,byrow=TRUE)
Xtran <- TransfoParam_GR5J(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR5J(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR5J model ## transformation Transformed->Raw for the GR5J model
Xtran <- matrix( c( +3.60, -1.70, +3.30, -9.10, -0.70, Xtran <- matrix( c( +3.60, -1.70, +3.30, -9.10, -0.70,
+3.90, -0.60, +4.10, -8.70, +0.30, +3.90, -0.60, +4.10, -8.70, +0.30,
+4.50, -0.10, +5.00, -8.10, +0.50), +4.50, -0.10, +5.00, -8.10, +0.50),
ncol=5,byrow=TRUE) ncol=5,byrow=TRUE)
Xreal <- TransfoParam_GR5J(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR5J(ParamIn=Xtran,Direction="TR")
require(airGR) require(airGR)
## transformation Real->Transformed for the GR6J model ## transformation Raw->Transformed for the GR6J model
Xreal <- matrix( c( 221.41, -1.18, 27.11, 1.37, -0.18, 20.09, Xraw <- matrix( c( 221.41, -1.18, 27.11, 1.37, -0.18, 20.09,
347.23, -0.52, 60.34, 1.76, 0.02, 54.60, 347.23, -0.52, 60.34, 1.76, 0.02, 54.60,
854.06, 0.52, 148.41, 2.34, 0.22, 148.41), 854.06, 0.52, 148.41, 2.34, 0.22, 148.41),
ncol=6,byrow=TRUE) ncol=6,byrow=TRUE)
Xtran <- TransfoParam_GR6J(ParamIn=Xreal,Direction="RT") Xtran <- TransfoParam_GR6J(ParamIn=Xraw ,Direction="RT")
## transformation Transformed->Real for the GR6J model ## transformation Transformed->Raw for the GR6J model
Xtran <- matrix( c( +3.60, -1.00, +3.30, -9.10, -0.90, +3.00, Xtran <- matrix( c( +3.60, -1.00, +3.30, -9.10, -0.90, +3.00,
+3.90, -0.50, +4.10, -8.70, +0.10, +4.00, +3.90, -0.50, +4.10, -8.70, +0.10, +4.00,
+4.50, +0.50, +5.00, -8.10, +1.10, +5.00), +4.50, +0.50, +5.00, -8.10, +1.10, +5.00),
ncol=6,byrow=TRUE) ncol=6,byrow=TRUE)
Xreal <- TransfoParam_GR6J(ParamIn=Xtran,Direction="TR") Xraw <- TransfoParam_GR6J(ParamIn=Xtran,Direction="TR")
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