gr4j_wrapper: Wrapper for running hydrological model

Description Usage Arguments Value Examples

View source: R/model_wrapper.R

Description

The hydrological model is the GR4J model.

Usage

1
gr4j_wrapper(indata)

Arguments

indata

A list with the following items:

  • Prec Vector with precipitation, dimensions Ntimes

  • PET Vector with potential evapotranspiration, dimensions Ntimes

  • St Initial state of storages

  • StUH1 Initial state of first unit hydrograph

  • StUH2 Initial state of second unit hydrograph

  • Param Model parameters

Value

A list with state variables and simulated runoff

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
iwsh <- 3

indata = list(Prec   = rowMeans(sample_data[[iwsh]]$Prec),
              PET    = rep(0, nrow(sample_data[[iwsh]]$Prec)),
              St     = matrix(0, nrow = 2, ncol = 1),
              StUH1  = matrix(0, 20, ncol = 1),
              StUH2  = matrix(0, 40, ncol = 1),
              Param  = c(74.59, 0.81, 214.98, 1.24))

res_sim <- gr4j_wrapper(indata)

plot(res_sim$Q, col = 'red', type ="l")

jmgnve/HMOD documentation built on May 19, 2019, 1:53 p.m.