Commit f7afad4e authored by unknown's avatar unknown
Browse files

v1.0.3 new function plot.OutputsModel() replaces plot_OutputsModel() (s3method...

v1.0.3 new function plot.OutputsModel() replaces plot_OutputsModel() (s3method and new chart with temperature for CemaNeige) #4490 #4198
parent 19c70740
......@@ -5,6 +5,13 @@ useDynLib(airGR)
#####################################
## S3 methods ##
#####################################
S3method("plot", "OutputsModel")
#####################################
## Export ##
#####################################
......@@ -41,6 +48,7 @@ export(TransfoParam_GR4H)
export(TransfoParam_GR4J)
export(TransfoParam_GR5J)
export(TransfoParam_GR6J)
export(plot.OutputsModel)
export(plot_OutputsModel)
......
......@@ -142,7 +142,7 @@ CreateRunOptions <- function(FUN_MOD,InputsModel,IndPeriod_WarmUp=NULL,IndPeriod
if(identical(FUN_MOD,RunModel_GR1A)){
Outputs_all <- c(Outputs_all,"PotEvap","Precip","Qsim"); }
if("CemaNeige" %in% ObjectClass){
Outputs_all <- c(Outputs_all,"Pliq","Psol","SnowPack","ThermalState","Gratio","PotMelt","Melt","PliqAndMelt"); }
Outputs_all <- c(Outputs_all,"Pliq","Psol","SnowPack","ThermalState","Gratio","PotMelt","Melt","PliqAndMelt", "Temp"); }
##check_Outputs_Sim
if(!is.vector( Outputs_Sim)){ stop("Outputs_Sim must be a vector of characters \n"); return(NULL); }
......
RunModel_CemaNeigeGR4J <- function(InputsModel,RunOptions,Param){
NParam <- 6;
FortranOutputsCemaNeige <- c("Pliq","Psol","SnowPack","ThermalState","Gratio","PotMelt","Melt","PliqAndMelt");
FortranOutputsCemaNeige <- c("Pliq","Psol","SnowPack","ThermalState","Gratio","PotMelt","Melt","PliqAndMelt", "Temp");
FortranOutputsMod <- c("PotEvap","Precip","Prod","AE","Perc","PR","Q9","Q1","Rout","Exch","AExch","QR","QD","Qsim");
##Arguments_check
......
This diff is collapsed.
This diff is collapsed.
\encoding{UTF-8}
\name{plot_OutputsModel}
\name{plot.OutputsModel}
\alias{plot.OutputsModel}
\alias{plot_OutputsModel}
\title{Default preview of model outputs}
\usage{
plot_OutputsModel(OutputsModel, Qobs = NULL, IndPeriod_Plot = NULL,
BasinArea = NULL, PlotChoice = "all", log_scale = FALSE, verbose = TRUE)
\method{plot}{OutputsModel}(x, Qobs = NULL, IndPeriod_Plot = NULL,
BasinArea = NULL, which = "all", log_scale = FALSE, verbose = TRUE, ...)
}
\arguments{
\item{OutputsModel}{[object of class \emph{OutputsModel}] list of model outputs (which must at least include DatesR, Precip and Qsim) [POSIXlt, mm, mm]}
\item{x}{[object of class \emph{OutputsModel}] list of model outputs (which must at least include DatesR, Precip and Qsim) [POSIXlt, mm, mm]}
\item{Qobs}{(optional) [numeric] time series of observed flow (for the same time steps than simulated) [mm/time step]}
......@@ -15,11 +16,13 @@ plot_OutputsModel(OutputsModel, Qobs = NULL, IndPeriod_Plot = NULL,
\item{BasinArea}{(optional) [numeric] basin area [km2], used to plot flow axes in m3/s}
\item{PlotChoice}{(optional) [character] choice of plots \cr (e.g. c(\code{"Precip"}, \code{"SnowPack"}, \code{"Flows"}, \code{"Regime"}, \code{"CumFreq"}, \code{"CorQQ"})), default = \code{"all"}}
\item{which}{(optional) [character] choice of plots \cr (e.g. c(\code{"Precip"}, \code{"Temp"}, \code{"SnowPack"}, \code{"Flows"}, \code{"Regime"}, \code{"CumFreq"}, \code{"CorQQ"})), default = \code{"all"}}
\item{log_scale}{(optional) [boolean] boolean indicating if the flow axis is to be logarithmic, default = \code{FALSE}}
\item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, default = \code{TRUE}}
\item{...}{other parameters to be passed through to plotting functions}
}
\value{
screen plot window
......
......@@ -122,6 +122,7 @@ c Outputs = -999.999 !initialisation made in R
IF(IndOutputs(I).EQ.6) Outputs(k,I)=PotMelt
IF(IndOutputs(I).EQ.7) Outputs(k,I)=Melt
IF(IndOutputs(I).EQ.8) Outputs(k,I)=PliqAndMelt
IF(IndOutputs(I).EQ.9) Outputs(k,I)=InputsTemp(k)
ENDDO
ENDDO
......
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