c_GR4J — Function to simulate runoff series from rainfall and evapotranspiration with GR4J model
[Qcalc,[S,R,ECH,ER,PR]] = c_GR4J(TimeSteps,Param,RAINFALL,EVAPOT,INI)
Length of time series time step expressed in hour. Ex : for a daily model, TimeSteps = 24.
The GR4J model has been optimised to run on daily values but the present function permits to utilise it with any time-step length.
The four parameter values
Param(1) = Soil moisture accounting reservoir capacity (mm). Current values pertain to [400..600].
Param(2) = losses parameter (dimensionless). Current values pertain to [-2..2].
Param(3) = Routing store reservoir capacity (mm). Current values pertain to [50..150].
Param(4) = Time constant of the unit hydrograph (expressed in time step unit). Values can be very variable...
Rainfall expressed in mm (matrix [Nx1] where N is the number of time steps)
Evapotranspiration expressed in mm (matrix [Nx1])
Initial filling of soil moisture accounting and routing store reservoir (matrix [2x1] with values ranging from 0 to 1)
Catchment outlet discharge expressed in mm (matrix [Nx1])
Soil moisture accounting reservoir content expressed in mm (matrix [Nx1])
Routing store reservoir content expressed in mm (matrix [Nx1])
Water exchanges (matrix [Nx1])
Effective evaporation, sum of max(0,E-P) and Es (see Perrin et al.,2003)
Effective rainfall in mm (matrix [Nx1])
CAUTION : DURING THE FIRST YEAR OF SIMULATION (365*24 / TimeSteps), THE EFFECT OF THE INITIAL CONDITION (initial filling of soil moisture accounting and routing store reservoirs) IS NOT NEGLIGEABLE. IT IS RECOMMENDED TO START EVALUATION OF MODEL RESULT AFTER ONE YEAR OF SIMULATION.
WARNING : This function is written in C language and interfaced with SCILAB (HYDROGR.dll).
The GR4J model (which stands for modele du Genie Rural a 4 parametres Journalier) is a daily lumped four-parameter rainfall-runoff model. It belongs to the family of soil moisture accounting models. The GR4J model is the last modified version of the GR3J model originally proposed by Edijatno and Michel (1989).
Important features of the GR4J implementation in SCILAB :
(1) The calculated discharges are expressed in mm ! To get values expressed in m3/s, one has to multiply this time-series by S/[3.6xTimeSteps] (S = Catchment surface in km2).
(3) All values of rainfall or evopotranspiration inferior to 0 will be considered by the model as missing data.
(4) 5 consecutive missing data are tolerated. The model affects 0 to the missing data.
(5) With more than 5 consecutive missing data, the 2 internal variables (soil moisture accounting and routing store) are reinitialised.
(6) The percolation factor used in the percolation formula is 2.25 if 'TimeSteps' is greater or equal to 12 and 4 if 'TimeSteps' is lower than 12. This improves the model performance for short time steps.
(7) The exponent used in the formulation of the unit hydrograph is 1.25 if 'TimeSteps' is lower or equal to 6 and 2.5 if 'TimeSteps' is greater than 12. This improves the model performance for short time steps.
To calibrate GR4J, the usual procedure is to use a "Pas à Pas" routine (cf function PasaPas).
// P is a vector containing daily rainfall values P = max(0,exp(convol(1/3*ones(1,3),rand(4998,1)+0.2).^5)*10-12)'; // (fictious data on 5000 days) // Generation of ETP daily time series (5000 days), latitude = 45deg, start = 1/1/1980 T = [0.687;0.498;2.774;6.086;10.565;13.702;16.159;15.585;12.619;8.486;3.300;0.778]; ETP = c_ETP(5000,24,%pi/4,T,198001010000,1); // GR4J parameters X =[665;1.18;90;3.8;0]; // GR4J simulation [Qsim,Ssim,Rsim]=c_GR4J(24,X,P,ETP,[0.6;0.7]); // Plots x=(1:size(P,1))'; subplot(3,1,1),plot(x,Qsim); // Calculated discharge subplot(3,1,2),plot(x,Ssim); // Production store filling level subplot(3,1,3),plot(x,Rsim); // Routing store filling level