rainrun

package
v0.0.0-...-0f7942d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 16 Imported by: 0

README

rainrun

this go package contains a variety of lumped-parameter, catchment-based continuous rainfall-runoff models using a common interface. This package include the ability for Monte Carlo integration and optimization.

Included models

  • The Atkinson simple storage model (Atkinson et.al., 2002, 2003; Wittenberg and Sivapalan, 1999)
  • The Dawdy and O'Donnell (1965) model
  • The GR4J model (Perrin et.al., 2003)
  • The HBV model (Bergström, 1976, 1992; Seibert and McDonnell, 2010)
  • The Manabe (1969) simple storage model with an added linear groundwater reservoir
  • The multilayer capacitance model (Struthers et.al., 2003)
  • The Quinn simple storage model (Quinn and Beven, 1993)
  • The SIXPAR/TWOPAR model (Gupta and Sorooshian, 1983; Duan et.al., 1992)
  • The simple parallel linear reservoir model (Buytaert and Beven, 2011)

References

Atkinson S.E., R.A. Woods, M. Sivapalan, 2002. Climate and landscape controls on water balance model complexity over changing timescales. Water Resource Research 38(12): 1314.

Atkinson, S.E., M. Sivapalan, N.R. Viney, R.A. Woods, 2003. Predicting space-time variability of hourly streamflow and the role of climate seasonality: Mahurangi Catchment, New Zealand. Hydrological Processes 17: 2171-2193.

Bergström, S., 1976. Development and application of a conceptual runoff model for Scandinavian catchments. SMHI RHO 7. Norrköping. 134 pp.

Bergström, S., 1992. The HBV model - its structure and applications. SMHI RH No 4. Norrköping. 35 pp.

Buytaert, W., and K. Beven, 2011. Models as multiple working hypotheses: hydrological simulation of tropical alpine . Hydrological Processes 25. pp. 1784–1799.

Dawdy, D.R., and T. O'Donnell, 1965. Mathematical Models of Catchment Behavior. Journal of Hydraulics Division, ASCE, Vol. 91, No. HY4: 123-137.

Duan, Q., S. Sorooshian, V. Gupta, 1992. Effective and Efficient Global Optimization for Conceptual Rainfall-Runoff Models. Water Resources Research 28(4): 1015-1031.

Gupta V.K., S. Sorooshian, 1983. Uniqueness and Observability of Conceptual Rainfall-Runoff Model Parameters: The Percolation Process Examined. Water Resources Research 19(1): 269-276.

Manabe, S., 1969. Climate and the Ocean Circulation 1: The Atmospheric Circulation and The Hydrology of the Earth's Surface. Monthly Weather Review 97(11): 739-744.

Perrin C., C. Michel, V. Andreassian, 2003. Improvement of a parsimonious model for streamflow simulation. Journal of Hydrology 279: 275-289.

Quinn P.F., K.J. Beven, 1993. Spatial and temporal predictions of soil moisture dynamics, runoff, variable source areas and evapotranspiration for Plynlimon, mid-Wales. Hydrological Processes 7: 425-448.

Seibert, J. and J.J. McDonnell, 2010. Land-cover impacts on streamflow: a change-detection modelling approach that incorporates parameter uncertainty. Hydrological Sciences Journal 55(3): 316-332.

Struthers, I., C. Hinz, M. Sivapalan, G. Deutschmann, F. Beese, R. Meissner, 2003. Modelling the water balance of a free-draining lysimeter using the downward approach. Hydrological Processes (17): 2151-2169.

Wittenberg H., M. Sivapalan, 1999. Watershed groundwater balance equation using streamflow recession analysis and baseflow separation. Journal of Hydrology 219: 20-33.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalPNG

func EvalPNG(m Lumper, frc *Frc, prfx string) string

EvalPNG prints model output to a png

func SumHydrograph

func SumHydrograph(frc *Frc, o, s, g []float64, prfx string)

func SumMonthly

func SumMonthly(dt []time.Time, o, s []float64, ts, ca float64, prfx string)

Types

type Atkinson

type Atkinson struct {
	// contains filtered or unexported fields
}

Atkinson simple storage model, meant for hourly timesteps based on formulation given in: Atkinson, S.E., M. Sivapalan, N.R. Viney, R.A. Woods, 2003. Predicting space-time variability of hourly streamflow and the role of climate seasonality: Mahurangi Catchment, New Zealand. Hydrological Processes 17. pp. 2171-2193. original ref: Atkinson S.E., R.A. Woods, M. Sivapalan, 2002. Climate and landscape controls on water balance model complexity over changing timescales. Water Resource Research 38(12): 1314. additional ref: Wittenberg H., M. Sivapalan, 1999. Watershed groundwater balance equation using streamflow recession analysis and baseflow separation. Journal of Hydrology 219, pp.20-33. sto: current storage; sint current interception storage; cov: fractional forest cover; kb = 1/Tcbf

func (*Atkinson) New

func (m *Atkinson) New(p ...float64)

New Atkinson constructor [sbc, sfc, coverdense, intcap, kb, a, b]

func (*Atkinson) Storage

func (m *Atkinson) Storage() float64

Storage returns total storage

func (*Atkinson) Update

func (m *Atkinson) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

func (*Atkinson) UpdateHourly

func (m *Atkinson) UpdateHourly(p, ep float64) (float64, float64, float64)

UpdateHourly update state at the intended hourly interval

type CCFGR4J

type CCFGR4J struct {
	GR4J
	SP snowpack.CCF
	SI *solirrad.SolIrad
}

CCFGR4J model Perrin C., C. Michel, V. Andreassian, 2003. Improvement of a parsimonious model for streamflow simulation. Journal of Hydrology 279. pp. 275-289.

func (*CCFGR4J) New

func (m *CCFGR4J) New(p ...float64)

New CCFGR4J contructor [stocap, gwstocap, x4, unitHydrographPartition, x2] [tindex, ddfc, baseT, tsf]

func (*CCFGR4J) Update

func (m *CCFGR4J) Update(v *Dset) (y, a, r, g float64)

Update state for daily inputs

type CCFHBV

type CCFHBV struct {
	HBV
	SP snowpack.CCF
	SI *solirrad.SolIrad
}

CCFHBV model Bergström, S., 1976. Development and application of a conceptual runoff model for Scandinavian catchments. SMHI RHO 7. Norrköping. 134 pp. Bergström, S., 1992. The HBV model - its structure and applications. SMHI RH No 4. Norrköping. 35 pp

func (*CCFHBV) New

func (m *CCFHBV) New(p ...float64)

New CCFHBV constructor [fc, lp, beta, uzl, k0, k1, k2, ksat, maxbas, lakeCoverFrac, tindex, ddfc, baseT, tsf]

func (*CCFHBV) Update

func (m *CCFHBV) Update(v *Dset) (y, a, r, g float64)

Update state

type DawdyODonnell

type DawdyODonnell struct {
	// contains filtered or unexported fields
}

DawdyODonnell model ref: Dawdy, D.R., and T. O'Donnell, 1965. Mathematical Models of Catchment Behavior. Journal of Hydraulics Division, ASCE, Vol. 91, No. HY4, pp. 123-137. see: pg.34 in Dooge and O'Kane (2003)

func (*DawdyODonnell) New

func (m *DawdyODonnell) New(p ...float64)

New DawdyODonnell constructor [ksat, depintCap, upszCap, gwCap, olfk, bfk]

func (*DawdyODonnell) Storage

func (m *DawdyODonnell) Storage() float64

Storage returns total storage

func (*DawdyODonnell) Update

func (m *DawdyODonnell) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type Dset

type Dset struct {
	Q, Tx, Tn, Ep float64
	// contains filtered or unexported fields
}

func ReadOWRC

func ReadOWRC(csvfp string, cakm2, latitude float64) ([]time.Time, []Dset)

func (*Dset) Runoff

func (d *Dset) Runoff() float64

func (*Dset) Yeild

func (d *Dset) Yeild() float64

type Frc

type Frc struct {
	// Dat      [][]float64 // holds forcing data // tx, tn, r, s := v[0], v[1], v[2], v[3]
	D   []Dset    // holds forcing data
	Loc []float64 // contains location info (coordinates, catchment properties, etc.)
	// DOY      []int       // holds the day of year
	DT       []time.Time // dates
	Timestep float64     // timestep in seconds
	Ndt      int         // Ndt number of timesteps
	FilePath string
}

type GR4J

type GR4J struct {
	// contains filtered or unexported fields
}

GR4J model Perrin C., C. Michel, V. Andreassian, 2003. Improvement of a parsimonious model for streamflow simulation. Journal of Hydrology 279. pp. 275-289.

func (*GR4J) New

func (m *GR4J) New(p ...float64)

New GR4J constructor

func (*GR4J) Storage

func (m *GR4J) Storage() float64

Storage returns total storage

func (*GR4J) Update

func (m *GR4J) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type HBV

type HBV struct {
	// contains filtered or unexported fields
}

HBV model Bergström, S., 1976. Development and application of a conceptual runoff model for Scandinavian catchments. SMHI RHO 7. Norrköping. 134 pp. Bergström, S., 1992. The HBV model - its structure and applications. SMHI RH No 4. Norrköping. 35 pp

func (*HBV) New

func (m *HBV) New(p ...float64)

New HBV constructor [fc, lp, beta, uzl, k0, k1, k2, ksat, maxbas, lakeCoverFrac]

func (*HBV) Storage

func (m *HBV) Storage() float64

Storage returns total storage

func (*HBV) Update

func (m *HBV) Update(pn, ep float64) (float64, float64, float64)

Update state for daily inputs

type Lumper

type Lumper interface {
	New(p ...float64)
	Update(p, ep float64) (float64, float64, float64)
	Storage() float64
}

Lumper : interface to lumped rainfall-runoff models

type MakkinkCCFGR4J

type MakkinkCCFGR4J struct {
	GR4J
	SP            snowpack.CCF
	SI            *solirrad.SolIrad
	Palpha, Pbeta float64
}

MakkinkCCFGR4J model Perrin C., C. Michel, V. Andreassian, 2003. Improvement of a parsimonious model for streamflow simulation. Journal of Hydrology 279. pp. 275-289. with CCF snowmelt model and Makkink PET

func (*MakkinkCCFGR4J) New

func (m *MakkinkCCFGR4J) New(p ...float64)

New CCFGR4J contructor [stocap, gwstocap, x4, unitHydrographPartition, x2] [tindex, ddfc, baseT, tsf] [b, c, alpha, beta]

func (*MakkinkCCFGR4J) Update

func (m *MakkinkCCFGR4J) Update(d *Dset) (y, a, r, g float64)

Update state for daily inputs

type ManabeGW

type ManabeGW struct {
	// contains filtered or unexported fields
}

ManabeGW manabe reserveroir with an added exponential decay reservoir

func (*ManabeGW) New

func (m *ManabeGW) New(p ...float64)

New ManabeGW constructor [capacity, fexposed, minSto, perc, kbf]

func (*ManabeGW) Storage

func (m *ManabeGW) Storage() float64

Storage returns manabe storage

func (*ManabeGW) Update

func (m *ManabeGW) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type MultiLayerCapacitance

type MultiLayerCapacitance struct {
	// contains filtered or unexported fields
}

MultiLayerCapacitance model ref: Struthers, I., C. Hinz, M. Sivapalan, G. Deutschmann, F. Beese, R. Meissner, 2003. Modelling the water balance of a free-draining lysimeter using the downward approach. Hydrological Processes (17). pp. 2151-2169. modification here: _runoff = lateral flow (runoff & subsurface)

func (*MultiLayerCapacitance) New

func (m *MultiLayerCapacitance) New(p ...float64)

New MultiLayerCapacitance constructor [coverDens, szDepth, porosity, fc, a, b, l1, l2, l3]

func (*MultiLayerCapacitance) Storage

func (m *MultiLayerCapacitance) Storage() float64

Storage returns total storage

func (*MultiLayerCapacitance) Update

func (m *MultiLayerCapacitance) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type Quinn

type Quinn struct {
	Zwt float64
	// contains filtered or unexported fields
}

Quinn simple storage model ref: Quinn P.F., K.J. Beven, 1993. Spatial and temporal predictions of soil moisture dynamics, runoff, variable source areas and evapotranspiration for Plynlimon, mid-Wales. Hydrological Processes 7. pp.425-448. used in early formulations of TOPMODEL, neglecting capillary fringe

func (*Quinn) New

func (m *Quinn) New(p ...float64)

New Quinn constructor [intercepCap, impStoCap, gwCap, fImp, ksat, rootZoneDepth, porosity, fieldCap, f, alpha, zwt]

func (*Quinn) Storage

func (m *Quinn) Storage() float64

Storage returns total storage

func (*Quinn) Update

func (m *Quinn) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type SIXPAR

type SIXPAR struct {
	// contains filtered or unexported fields
}

SIXPAR model ref: Gupta V.K., S. Sorooshian, 1983. Uniqueness and Observability of Conceptual Rainfall-Runoff Model Parameters: The Percolation Process Examined. Water Resources Research 19(1). pp.269-276. also see: Duan, Q., S. Sorooshian, V. Gupta, 1992. Effective and Efficient Global Optimization for Conceptual Rainfall-Runoff Models. Water Resources Research 28(4). pp.1015-1031.

func (*SIXPAR) New

func (m *SIXPAR) New(p ...float64)

New SIXPAR constructor [upCap, lowCap, upK, lowK, z, x]

func (*SIXPAR) Storage

func (m *SIXPAR) Storage() float64

Storage returns total storage

func (*SIXPAR) Update

func (m *SIXPAR) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs

type SPLR

type SPLR struct {
	// contains filtered or unexported fields
}

SPLR : Simple Parallel Linear Reservoir Buytaert, W., and K. Beven, 2011. Models as multiple working hypotheses hydrological simulation of tropical alpine. Hydrological Processes 25. pp. 1784–1799. 3-reservoir Tank model

func (*SPLR) New

func (m *SPLR) New(p ...float64)

New SPLR constructor [r12, r23, k1, k2, k3]

func (*SPLR) Storage

func (m *SPLR) Storage() float64

Storage returns total storage

func (*SPLR) Update

func (m *SPLR) Update(p, ep float64) (float64, float64, float64)

Update state for daily inputs, returns excess

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL