calib_swat_ex: A function demostrate an example series of steps to calibrate...

Description Usage Arguments Details Value Author(s) Examples

View source: R/calib_swat_ex.R

Description

A function demostrate an example series of steps to calibrate a reach in the SWAT2005 watershed model. This should act only as a simple demonstration, and should be modified to inidivduals use.

Usage

1
calib_swat_ex(flowgage, rch = 3)

Arguments

flowgage

A list in the format that would be returned from the get_usgs_gage

rch

The reach in the output.rch file you wish to calibrate against.

Details

This should act only as a simple demonstration, and should be modified to inidivduals use.

Value

List (of length 2) containing the results of the internally called DEoptim function. See DEoptim for more information.

Author(s)

Daniel R. Fuka

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Not run: 
#
install.packages("SWATmodel")
#
# Load library, test SWAT numerics, define a flow gage id for USGS gage, or build similar list
# of data as presented in ?get_usgs_gage
#
library(SWATmodel)
testSWAT2005()
flowgage_id="04216500"
flowgage=get_usgs_gage(flowgage_id)
#
# Obtain basic set of historical forcing data from TAMU/Cornell/IWMI CFSR repository
#
hist_wx=get_cfsr_latlon(flowgage$declat,flowgage$declon)
#
# Build a generic 9 HRU SWAT initialization, which builds and changes into directory
# named as flowgage_id above.
#
build_swat_basic(dirname=flowgage_id,iyr="1979",nbyr=6,flowgage$area,
flowgage$elev,flowgage$declat,flowgage$declon,hist_wx=hist_wx)
#
# Simple calibration based on the outflow from RCH 3 of the simple SWAT initialization
#
calib_swat_results=calib_swat_ex(flowgage,rch=3)
#
# Graph output as hydro graph and pred/obs graphics
plot(calib_swat_results$flowdata,flowgage$flowdata)


## End(Not run)

EcoHydRology documentation built on March 29, 2021, 3:01 p.m.