GR4J

Streamfall.reset!Method
reset!(node::GR4JNode)::Nothing

Reset node. Clears all states back to their initial values.

source
Streamfall.run_gr4jMethod
run_gr4j(
    P::F, E::F, X1::F, X2::F, X3::F, X4::F, area::F,
    UH1::Vector{Float64}, UH2::Vector{Float64},
    uh1_ordinates::Vector{Float64}, uh2_ordinates::Vector{Float64};
    p_store=0.0, r_store=0.0
)::Tuple where {F<:Float64}

Generated simulated streamflow for given rainfall and potential evaporation.

Parameters

  • P : Catchment average rainfall
  • E : Catchment average potential evapotranspiration
  • X1 : Maximum capacity of production store (in mm; > 0)
  • X2 : Groundwater exchange coefficient (in mm; value < and > 0 possible)
  • X3 : Maximum capacity of routing store (in mm; > 0)
  • X4 : Time base of the unit hydrograph (in days, > 0.5)
  • area : Catchment area
  • UH1 : Quickflow store
  • UH2 : Baseflow store
  • uh1_ordinates : The proportion of rainfall converted to quickflow for each timestep
  • uh2_ordinates : The proportion of rainfall converted to slowflow for each timestep
  • p_store : Initial production store
  • r_store : Initial state store

Returns

Tuple of:

  • Simulated outflow [ML/day]
  • intermediate states:
    • p_store (initial production / percolation)
    • r_store (initial state)
    • UH1 (Quickflow)
    • UH2 (Slowflow)
source
Streamfall.run_timestep!Method
run_timestep!(
    node::GR4JNode, climate::Climate, timestep::Int;
    inflow=nothing, extraction=nothing, exchange=nothing
)
run_timestep!(
    node::GR4JNode, rain::Float64, et::Float64, ts::Int64;
    inflow=nothing, extraction=nothing, exchange=nothing
)

Run given GR4J node for a time step.

source
Streamfall.s_curveMethod
s_curve(t::Float64, x4::Float64, uh2::Bool = false)::Float64

Determine unit hydrograph ordinates.

source
Streamfall.update_params!Method
update_params!(node::GR4JNode, X1::Float64, X2::Float64, X3::Float64, X4::Float64)::Nothing

Update parameters for GR4J.

source
Streamfall.update_state!Method
update_state!(node::GR4JNode, ps, rs, q, UH1, UH2)::Nothing
update_state!(node::GR4JNode, ts::Int64, ps, rs, q, UH1, UH2)::Nothing

Update GR4J node state.

source
Streamfall.GR4JNodeType

GR4J Node

A four-parameter model with two stores.

Parameters

  • x1 : maximum capacity of the production store (mm) (> 0)
  • x2 : groundwater exchange coefficient (mm) (value < and > 0 possible)
  • x3 : one day ahead maximum capacity of the routing store (mm, > 0)
  • x4 : time base of unit hydrograph UH1 (days, > 0.5)

References

  1. Perrin, C., Michel, C., Andréassian, V., 2003. Improvement of a parsimonious model for streamflow simulation. Journal of Hydrology 279, 275-289. https://doi.org/10.1016/S0022-1694(03)00225-7

  2. MacDonald, A. 2014. Python GR4J https://github.com/amacd31/gr4j

source