Title: | Vegetated Filter Strip and Erosion Model |
---|---|
Description: | Empirical models for runoff, erosion, and phosphorus loss across a vegetated filter strip, given slope, soils, climate, and vegetation (Gall et al., 2018) <doi:10.1007/s00477-017-1505-x>. It also includes functions for deriving climate parameters from measured daily weather data, and for simulating rainfall. Models implemented include MUSLE (Williams, 1975) and APLE (Vadas et al., 2009 <doi:10.2134/jeq2008.0337>). |
Authors: | Sarah Goslee [aut, cre], Heather Gall [aut], Tamie Veith [aut] |
Maintainer: | Sarah Goslee <[email protected]> |
License: | GPL-3 |
Version: | 1.0.4 |
Built: | 2025-02-26 06:01:44 UTC |
Source: | https://github.com/sarahgoslee-usda/vfs |
Empirical models for runoff, erosion, and phosphorus loss across a vegetated filter strip, given slope, soils, climate, and vegetation (Gall et al., 2018) <doi:10.1007/s00477-017-1505-x>. It also includes functions for deriving climate parameters from measured daily weather data, and for simulating rainfall. Models implemented include MUSLE (Williams, 1975) and APLE (Vadas et al., 2009 <doi:10.2134/jeq2008.0337>).
The DESCRIPTION file:
Package: | VFS |
Title: | Vegetated Filter Strip and Erosion Model |
Version: | 1.0.4 |
Date: | 2018-10-01 |
Authors@R: | c(person("Sarah", "Goslee", role = c("aut", "cre"), email = "[email protected]"), person("Heather", "Gall", role = "aut"), person("Tamie", "Veith", role = "aut")) |
Depends: | R (>= 3.4.0) |
Imports: | stats, graphics, e1071, nleqslv (>= 3.3.0) |
Suggests: | knitr, rmarkdown, testthat |
VignetteBuilder: | knitr |
Description: | Empirical models for runoff, erosion, and phosphorus loss across a vegetated filter strip, given slope, soils, climate, and vegetation (Gall et al., 2018) <doi:10.1007/s00477-017-1505-x>. It also includes functions for deriving climate parameters from measured daily weather data, and for simulating rainfall. Models implemented include MUSLE (Williams, 1975) and APLE (Vadas et al., 2009 <doi:10.2134/jeq2008.0337>). |
License: | GPL-3 |
BugReports: | https://github.com/sgoslee/VFS/issues |
LazyData: | true |
Repository: | https://sarahgoslee-usda.r-universe.dev |
RemoteUrl: | https://github.com/sarahgoslee-usda/vfs |
RemoteRef: | HEAD |
RemoteSha: | f2592289308916a3a0d781fe8e4bb63a8e489602 |
Author: | Sarah Goslee [aut, cre], Heather Gall [aut], Tamie Veith [aut] |
Maintainer: | Sarah Goslee <[email protected]> |
Index of help topics:
APLE Agricultural Phosphorus Loss Estimator MUSLE Modified Universal Soil Loss Equation MUSLE.K Estimate soil erodibility factor K. MUSLE.LS Estimate landscape factor LS USC00368449.dly GHCN Data for State College, PA, 1980-2009 VFS Vegetated filter strip and erosion model VFS-package Vegetated Filter Strip and Erosion Model VFSAPLE Link the VFS and APLE models. bufferdat Parameters for vegetated buffers peak Rational method to calculate peak discharge print.APLE Printing the result of APLE print.VFS Printing the result of VFS rainfall Generate simulated daily rainfall read.dly Read GHCN DLY daily weather file into a data frame soildat Soil texture class properties summary.APLE Summarize the result of APLE summary.VFS Summarize the result of VFS temperature Generate simulated mean temperature weather Ten years of daily weather data wth.param Calculate weather parameters from daily data for use in climate simulations
This package implements runoff, erosion, filter strip, and phosphorus loss models in R.
Sarah Goslee [aut, cre], Heather Gall [aut], Tamie Veith [aut]
Maintainer: Sarah Goslee <[email protected]>
Gall, H. E., Schultz, D., Veith, T. L, Goslee, S. C., Mejia, A., Harman, C. J., Raj, C. and Patterson, P. H. (2018) The effects of disproportional load contributions on quantifying vegetated filter strip sediment trapping efficiencies. Stoch Environ Res Risk Assess 32(8), 2369–2380. doi:10.1007/s00477-017-1505-x
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*3, weather.param) temp.compare <- temperature(365*3, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil vfs.CL <- VFS(nyears = 3, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b =1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*3, weather.param) temp.compare <- temperature(365*3, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil vfs.CL <- VFS(nyears = 3, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b =1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
Agricultural loss of phosphorus based on soil phosphorus level, additions of fertilizer and manure, and erosion.
APLE(soilP, clay, OM, precip, runoff, erosion, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
APLE(soilP, clay, OM, precip, runoff, erosion, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
soilP |
soil test Mehlich 3 phosphorus (mg/kg). |
clay |
soil clay (%). |
OM |
soil organic matter (%). |
precip |
annual precipitation (in). |
runoff |
annual runoff (in) |
erosion |
annual erosion (ton/ac). |
manureP |
manure P applied (kg/ha). |
manureSolids |
manure solids (%). |
manureWEP |
manure water-extractable phosphorus/TP (%). |
manureIn |
manure incorporated (%). |
fertP |
fertilizer phosphorus applied (kg/ha). |
fertIn |
fertilizer incorporated (%). |
This function implements the basic version of the spreadsheet-based Agricultural Phosphorus Loss Estimator model (APLE) in R, and is vectorized. This model calculates annual phosphorus loss by compartment (due to erosion, dissolved soil phosphorus, dissolved manure, dissolved fertilizer) based rainfall, soil properties, and management. The units match those of the original spreadsheet.
lossErosion |
soil erosion phosphorus loss (kg/ha). |
lossDissolvedSoil |
soil dissolved phosphorus loss (kg/ha). |
lossDissolvedManure |
manure dissolved phosphorus loss (kg/ha). |
lossDissolvedFertilizer |
fertilizer dissolved phosphorus loss (kg/ha). |
lossTotal |
total phosphorus loss (kg/ha). |
Sarah Goslee
Vadas, P. A., Good, L. W., Moore, P. A., Jr. and Widman, N. (2009) Estimating phosphorus loss in runoff from manure and fertilizer for a phosphorus loss quantification tool. J Environ Qual 38, 1645–1653. doi:10.2134/jeq2008.0337
APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
Contains parameters describing vegetated filter strips for use in VFS modeling.
data("bufferdat")
data("bufferdat")
A data frame with 2 observations on the following 3 variables.
Species
Type of buffer
bg
Average stem spacing (cm)
n
Manning's roughness coefficient (s m^(-1/3))
Currently contains data for a cool-season and a warm-season grass buffer.
Haan CT, Barfield BJ, Hayes JC (1994) Design hydrology and sedimentology for small catchments. Acad. Press, San Diego
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
Simulation of soil erosion on a daily timestep.
MUSLE(Q, qp, A, K, LS, C = 0.085, P = 0.40, a = 11.8, b = 0.56)
MUSLE(Q, qp, A, K, LS, C = 0.085, P = 0.40, a = 11.8, b = 0.56)
Q |
Runoff volume (m^3/d). |
qp |
Runoff peak discharge (m^3/s). |
A |
Field area (ha). |
K |
Soil erodibility factor. |
LS |
Landscape factor. |
C |
Crop management factor. Default is for a corn field. |
P |
Erosion control practice factor. |
a |
Location coefficient. Default value from Williams 1975. |
b |
Location coefficient. Default value from Williams 1975. |
Uses the Modified Universal Soil Loss Equation to estimate daily sediment yield. If K and LS are not known, they can be estimated from soil or field properties using MUSLE.K
and MUSLE.LS
.
If the location coefficients are known from measured sedimentation data, more accurate estimates can be made.
Sediment yield (t/day).
Sarah Goslee
Williams, J. R. (1975) Sediment-yield prediction with universal equation using runoff energy factor. Pp. 244–251 in: Present and prospective technology for predicting sediment yield and sources. ARS.S-40, US Gov. Print. Office, Washington, DC. 244-252.
Wischmeier, W. H. and Smith, D. D. (1978) Predicting rainfall erosion losses-a guide to conservation planning. U.S. Department of Agriculture, Agriculture Handbook No. 537.
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
Estimates MUSLE soil erodibility from a multiple regression model of soil texture.
MUSLE.K(fc, fm, ff)
MUSLE.K(fc, fm, ff)
fc |
Fraction of coarse material (sand) in the soil (0-1). |
fm |
Fraction of medium material (silt) in the soil (0-1). |
ff |
Fraction of fine material (clay) in the soil (0-1). |
If K is not available from other sources, it can be estimated from soil texture (Goslee, in review).
Returns the soil erodibility factor K.
Sarah Goslee
Wischmeier, W. H. and Smith, D. D. (1978) Predicting rainfall erosion losses-a guide to conservation planning. U.S. Department of Agriculture, Agriculture Handbook No. 537.
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
Estimates MUSLE landscape factor for a homogeneous field from the field length and slope.
MUSLE.LS(FieldLength, FieldSlope)
MUSLE.LS(FieldLength, FieldSlope)
FieldLength |
Field length (ft). |
FieldSlope |
Field slope (ft/ft). |
MUSLE landscape factor LS.
Sarah Goslee
Wischmeier, W. H. and Smith, D. D. (1978) Predicting rainfall erosion losses-a guide to conservation planning. U.S. Department of Agriculture, Agriculture Handbook No. 537.
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
# Approximate erodibility factor from soil texture. Kf <- MUSLE.K(.3, .5, .2) # Calculate landscape factor from field size and shape. # 100-m field length with 2% slope # note that MUSLE.LS takes feet LS <- MUSLE.LS(100 * 3.28, .02) # assume 0.4 ha cornfield with known rainfall intensity peakd <- peak(intensity = 55, area = 0.4) SedYield <- MUSLE(85, qp = peakd, A = .4, K = Kf, LS = LS)
Very simple estimate of peak discharge.
peak(intensity, area, c = 0.25)
peak(intensity, area, c = 0.25)
intensity |
Precipitation intensity (mm/hr). |
area |
Field area (ha). |
c |
Runoff coefficient, related to slope, soil type, and land cover (0-1). Forest may be 0.05 - 0.25, while paved surfaces may be 0.95. |
Peak discharge (m^3/s).
Sarah Goslee
Hromadka, T. V, II and Whitley, R. J. (1994) The rational method for peak flow rate estimation. Water Res Bull 30(6), 1001–1009.
# peak discharge from a grassy meadow peakd.meadow <- peak(intensity = 55, area = 1, c = 0.1) # peak discharge from an urban area peakd.urban <- peak(intensity = 55, area = 1, c = 0.8)
# peak discharge from a grassy meadow peakd.meadow <- peak(intensity = 55, area = 1, c = 0.1) # peak discharge from an urban area peakd.urban <- peak(intensity = 55, area = 1, c = 0.8)
Print method for APLE objects.
## S3 method for class 'APLE' print(x, ...)
## S3 method for class 'APLE' print(x, ...)
x |
An APLE object produced by |
... |
Other arguments to print. |
Prints the annual mean for erosion, soil dissolved, manure dissolved, fertilizer dissolved, and total phosphorus losses.
Returns the APLE object x invisibly.
Sarah Goslee
x <- APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40) print(x) summary(x)
x <- APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40) print(x) summary(x)
Print method for VFS objects.
## S3 method for class 'VFS' print(x, ...)
## S3 method for class 'VFS' print(x, ...)
x |
A VFS x produced by VFS(). |
... |
Other arguments to print. |
If the VFS object has a modeled filter strip, the mean annual loads in and out, as well as removal efficiencies are printed. Otherwise only the erosion values from the field are printed.
It returns the VFS object invisibly.
Sarah Goslee
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL)
Generates simulated daily rainfall based on parameters derived from daily weather data.
rainfall(ndays, thiswth, months)
rainfall(ndays, thiswth, months)
ndays |
Number of days to simulate. |
thiswth |
Output of |
months |
If the rainfall simulation method uses monthly statistics (Markov), a vector of month numbers of |
The rainfall simulation currently offers choice of two methods: the simple Poisson model of Rodriguez-Iturbe et al. (1999), and the Markov chain model of Nicks (1974). The latter rainfall calculation is used by the APEX farm model, among others, and is based on monthly statistics.
A vector of daily rainfall totals.
Heather Gall and Sarah Goslee
Rodriguez-Iturbe, I., Porporato, A., Ridolfi, L., Isham, V. and Coxi, D. R. (1999) Probabilistic modelling of water balance at a point: the role of climate, soil and vegetation. Proc Royal Soc A 455, 269–288.
Nicks, A. D. (1974) Stochastic generation of the occurrence, pattern and location of maximum amount of daily rainfall. Pp. 154–171 in: Proceedings Symposium on Statistical Hydrology. USDA Agricultural Research Service Miscellaneous Publication No. 1275, Washington, DC.
# GHCN daily weather file for State College, PA # subset of data (2000-2009) for station USC00368449 # data("weather") # same object # calculate parameters for the poisson model # using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate ten years of rainfall rain10.p <- rainfall(365*10, weather.param.p) # increase per-event rainfall by 5 mm weather.param.p5 <- weather.param.p weather.param.p5$params$depth <- weather.param.p5$params$depth + 5 rain10.p5 <- rainfall(365*10, weather.param.p5) # calculate parameters for the Markov chain model # using 0.3 mm as the lower limit for wet days. weather.param.m <- wth.param(weather, method = "markov", llim = 0.3) # rainfall() selects Markov model based on input parameter types rain10.m <- rainfall(365*10, weather.param.m) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)
# GHCN daily weather file for State College, PA # subset of data (2000-2009) for station USC00368449 # data("weather") # same object # calculate parameters for the poisson model # using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate ten years of rainfall rain10.p <- rainfall(365*10, weather.param.p) # increase per-event rainfall by 5 mm weather.param.p5 <- weather.param.p weather.param.p5$params$depth <- weather.param.p5$params$depth + 5 rain10.p5 <- rainfall(365*10, weather.param.p5) # calculate parameters for the Markov chain model # using 0.3 mm as the lower limit for wet days. weather.param.m <- wth.param(weather, method = "markov", llim = 0.3) # rainfall() selects Markov model based on input parameter types rain10.m <- rainfall(365*10, weather.param.m) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)
Imports daily data files from the Global Historical Climatology Network (GHCN), replaces nodata values with NA, and converts precipitation to mm and temperature to C.
read.dly(filename)
read.dly(filename)
filename |
Filename or URL of a GHCN DLY file. |
All GHCN DLY files should have these five elements: PRCP (precipitation, originally tenths of a mm but mm in the function output); SNOW (snowfall, mm); SNWD (snow depth, mm), TMAX (maximum temperature, originally tenths of degree C but C in the function output), and TMIN (minimum temperature, originally tenths of degree C but C in the function output).
Depending on the station, there may be many other recorded variables. Each variable is accompanied by a series of quality flags, which are preserved from the original file.
Data are in a complex fixed-width format. Please see the GHCN readme for details.
Returns a data frame with date as three columns, YEAR, MONTH, DAY, and each data value present in the original file along with its quality flags. Please see the GHCN readme for details.
Note that units for temperature and precipitation have been converted from the GHCN values.
These columns will always be present in the output:
YEAR
Year.
MONTH
Month number.
DAY
Day of month.
PRCP
Precipitation (mm).
TMAX
Maximum temperature (C).
TMIN
Minimum temperature (C).
Sarah Goslee
GHCN data comprises both current and historical weather station data world-wide.
# ten years of daily weather data, 2000-2009, for State College, PA weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) # could also use: # weather <- read.dly("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all/USC00368449.dly") # weather <- subset(weather, YEAR >= 2000 & YEAR <= 2009) # daily precipitation summary(weather$PRCP.VALUE) # monthly average maximum temperature aggregate(TMAX.VALUE ~ MONTH, FUN = mean, data = weather) # generate simulation values weather.params <- wth.param(weather)
# ten years of daily weather data, 2000-2009, for State College, PA weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) # could also use: # weather <- read.dly("ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all/USC00368449.dly") # weather <- subset(weather, YEAR >= 2000 & YEAR <= 2009) # daily precipitation summary(weather$PRCP.VALUE) # monthly average maximum temperature aggregate(TMAX.VALUE ~ MONTH, FUN = mean, data = weather) # generate simulation values weather.params <- wth.param(weather)
Basic hydrologic properties for twelve soil texture classes.
data("soildat")
data("soildat")
A data frame with 12 observations on the following 9 variables.
Soil
Texture class abbreviation.
SoilName
Texture class name.
Ksat
Saturated hydraulic conductivity (mm d^(-1)).
ThetaSAT
Water potential at saturation.
ThetaFC
Water potential at field capacity.
ThetaWP
Water potential at wilt point.
ff
Fraction of fine (clay) particles.
fm
Fraction of medium (silt) particles.
fc
Fraction of coarse (sand) particles.
Clapp, RB, Hornberger, GM. 1978. Empirical equations for some soil hydraulic properties. Water Resour Res 14:601-604. DOI: 10.1029/WR014i004p00601.
Karkanis, PG. 1983. Determining field capacity and wilting point using soil saturation by capillary rise. Can Agr Eng 25:19-21.
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
Summary method for APLE objects.
## S3 method for class 'APLE' summary(object, ...)
## S3 method for class 'APLE' summary(object, ...)
object |
APLE object produced by |
... |
Other arguments to summary |
Calculates means for phosphorus loss.
Summary of APLE object.
Sarah Goslee
x <- APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40) print(x) summary(x)
x <- APLE(soilP = 127, clay = 17, OM = 6, precip = 35, runoff = 6, erosion = 7, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40) print(x) summary(x)
Summary method for VFS objects.
## S3 method for class 'VFS' summary(object, ...)
## S3 method for class 'VFS' summary(object, ...)
object |
A VFS object produced by VFS(). |
... |
Other arguments to summary |
Calculates means and standard deviations for annual removal efficiencies. If model type is erosion-only (no vegetated filter strip simulated), then only the relevant variables describing erosion from the field are returned.
ALR |
Annual load reduction. |
ALRsd |
SD of annual load reduction. |
ALR1000 |
Load reduction across full timespan. |
ALR1000sd |
SD of load reduction across full timespan. |
APEA |
Annual per-event average reduction. |
APEAsd |
SD of annual per-event average reduction. |
SedIn |
Sediment entering the vegetated filter strip per year. |
SedInsd |
SD of sediment entering the vegetated filter strip per year. |
SedLoss |
Sediment lost per year. |
SedLosssd |
SD of sediment lost per year. |
TLR |
Total load reduction. |
RunoffDays |
Days per year with runoff. |
RunoffDayssd |
SD of days per year with runoff. |
Days |
Total number of days. |
Sarah Goslee
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL)
Generates simulated daily temperature minimum and maximum based on parameters derived from daily weather data.
temperature(ndays, thiswth)
temperature(ndays, thiswth)
ndays |
number of days to simulate |
thiswth |
list output of |
This is a very simple temperature simulation, using three parameters derived from daily weather data and the day of year to calculate a smooth annual temperature change derived from the first harmonic of a Fourier function.
Returns a vector of daily mean temperature (X).
Heather Gall and Sarah Goslee
Grimenes, A. and Nissen, O. (2004) Mathematical modeling of the annual temperature wave based on monthly mean temperatures, and comparisons between local climate trends at seven Norwegian stations. Theor Appl Climatol 78, 229–246. doi:10.1007/s00704-004-0036-9
# A sample GHCN daily weather file for State College, PA, is included with this package. # This file contains a subset of data (1980-2009) for station USC00368449 data("weather") # calculate parameters for the poisson model, using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)
# A sample GHCN daily weather file for State College, PA, is included with this package. # This file contains a subset of data (1980-2009) for station USC00368449 data("weather") # calculate parameters for the poisson model, using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)
A ten-year sample of Global Historical Climatology Network (GHCN) daily weather data for State College, PA (station USC00368449). This is in a complex fixed-width format. Please see the GHCN readme for details.
"USC00368449.dly"
"USC00368449.dly"
A complex fixed-width ASCII file.
GHCN data comprises both current and historical weather station data world-wide.
# A sample DLY file for State College, PA, is included with this package. # This file contains a subset of data (1980-2009) for station USC00368449 # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) # identical to data("weather")
# A sample DLY file for State College, PA, is included with this package. # This file contains a subset of data (1980-2009) for station USC00368449 # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) # identical to data("weather")
Simulated erosion and runoff given climate and soil texture, with or without a vegetated filter strip in place.
VFS(nyears = 1000, thissoil, thisbuffer, rain, temperature, Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, FieldSlope, z = 1000, a = 1, b = 1.5, carrysoilwater = TRUE, runoffcalc = TRUE)
VFS(nyears = 1000, thissoil, thisbuffer, rain, temperature, Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, FieldSlope, z = 1000, a = 1, b = 1.5, carrysoilwater = TRUE, runoffcalc = TRUE)
nyears |
Number of years to simulate. |
thissoil |
Soil properties for the site, as from soildat. |
thisbuffer |
Vegetation properties for the buffer strip, as from bufferdat. |
rain |
Daily rainfall (mm). |
temperature |
Daily mean temperature (C). |
Duration |
Rainfall event length. Default is 2 hours. |
FieldArea |
Field area (m^2). |
VFSwidth |
Filter strip width (m). |
VFSslope |
Filter strip slope (m/m). |
FieldSlope |
Optional field slope (m/m). If missing, VFSslope will be used. |
z |
Rooting zone depth (mm). Default is 1000 mm. |
a |
Empirical parameter that relates concentration and flow in the concentration-discharge relationship, C = aQ^b. |
b |
Empirical parameter that relates concentration and flow in the concentration-discharge relationship, C = aQ^b. May be a single value or a vector of values. |
carrysoilwater |
Boolean describing whether to store soil water; if FALSE, soil is always at field capacity. This option allows the effect of soil water storage to be quantified. |
runoffcalc |
Boolean describing whether to use intensity and saturation exceedances; if FALSE, all rainfall becomes runoff. This option allows the effect of runoff calculation to be quantified. |
The concentration-discharge (C-Q) model of erosion is intended to produce relative erosion values, rather than absolute values, but will produce absolute values if a and b are known.
The MUSLE field erosion model is run alongside the C-Q model. The K factor is estimated from soil texture data using MUSLE.K
, and the LS factor from field properties using MUSLE.LS
.
Blaney-Criddle coefficients for evapotranspiration calculations from a cornfield are hard-coded; a future update will allow for varying the type of field.
Returns an object of class VFS, comprising:
daily |
Daily output of all public variables that change as a function of time. The data frame has columns: |
rain: precipitation (mm).
temperature: mean temperature (C).
S: soil water storage, (mm).
kt: Blaney-Criddle temperature coefficient.
ET: evapotranspiration (mm).
intensity: rainfall intensity (mm).
runoff: runoff (mm).
Q: discharge (ft^3/s).
fd: flow depth through VFS (ft).
R: hydraulic radius of filter strip (ft).
Vm: Manning's velocity (ft/s).
Re: Reynold's number.
Va: actual shear stress (ft/s).
Nfc: Fall number for coarse particles.
Nfm: Fall number for medium particles.
Nff: Fall number for fine particles.
fdc: Trapping efficiency for coarse particles.
fdm: Trapping efficiency for medium particles.
fdf: Trapping efficiency for fine particles.
Ft: Total trapping efficiency of filter strip.
peakflow: peak flow (m^3/s).
field |
Data on the field being modeled: |
clay: soil clay content (%.)
area: field area (m^2).
Conc |
Sediment concentration (in mass/volume) as calculated by the relationship C = aQ^b; specific units depend on units conversions included in the value of a. |
MassIn |
Sediment load (mass) from the C-Q model, as calculated by multiplying concentration and runoff volume. If concentration is assumed to be in g/L, then the load is calculated in g. |
MassOut |
Sediment mass from the C-Q model that leaves the vegetated filter strip at the end of a runoff event (i.e., the mass that is not removed). |
MassRemoved |
Sediment mass from the C-Q model that remains in the vegetated filter strip at the end of a runoff event. |
AnnualMassIn |
Sum of the sediment loads from the C-Q model entering the vegetated filter strip over the course of one year. |
AnnualMassOut |
Sum of the sediment loads from the C-Q model leaving the vegetated filter strip over the course of one year. |
AnnualRemovalEfficiency |
The removal effficiency from the C-Q model of the vegetated filter strip at an annual time scale (%). |
MassInMUSLE |
Sediment mass from the MUSLE model leaving the crop field . |
MassOutMUSLE |
Sediment mass from the MUSLE model that leaves the vegetated filter strip at the end of a runoff event (t/day). |
MassRemovedMUSLE |
Sediment mass that remains in the vegetated filter strip at the end of a runoff event (t/day). |
AnnualMassInMUSLE |
Sum of the sediment loads entering the vegetated filter strip over the course of one year (t). |
AnnualMassOutMUSLE |
Sum of the sediment loads leaving the vegetated filter strip over the course of one year (t). |
AnnualRemovalEfficiencyMUSLE |
The removal effficiency of the vegetated filter strip at an annual time scale (%). |
Ftannual |
Filter strip removal efficiency. |
Ftannualavg |
The average of all per-event trapping efficiencies over the course of one year. |
Heather Gall, Sarah Goslee, and Tamie Veith
Gall, H. E., Schultz, D., Veith, T. L, Goslee, S. C., Mejia, A., Harman, C. J., Raj, C. and Patterson, P. H. (2018) The effects of disproportional load contributions on quantifying vegetated filter strip sediment trapping efficiencies. Stoch Environ Res Risk Assess 32(8), 2369–2380. doi:10.1007/s00477-017-1505-x
Haan C. T., Barfield B. J. and Hayes J. C. (1994) Design hydrology and sedimentology for small catchments. Acad Press, San Diego.
Williams, J. R. (1975) Sediment-yield prediction with universal equation using runoff energy factor. Pp. 244–251 in: Present and prospective technology for predicting sediment yield and sources. ARS.S-40, US Gov. Print. Office, Washington, DC. 244-252.
Wischmeier, W. H. and Smith, D. D. (1978) Predicting rainfall erosion losses-a guide to conservation planning. U.S. Department of Agriculture, Agriculture Handbook No. 537.
print.VFS
, summary.VFS
, wth.param
, soildat
, bufferdat
,
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
Uses the erosion and runoff output of VFS as input to APLE.
VFSAPLE(x, soilP, OM, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
VFSAPLE(x, soilP, OM, manureP = 25, manureSolids = 25, manureWEP = 50, manureIn = 40, fertP = 10, fertIn = 40)
x |
VFS object. |
soilP |
soil test Mehlich 3 phosphorus (mg/kg). |
OM |
soil organic matter (%). |
manureP |
manure P applied (kg/ha). |
manureSolids |
manure solids (%). |
manureWEP |
manure water-extractable phosphorus/TP (%). |
manureIn |
manure incorporated (%). |
fertP |
fertilizer phosphorus applied (kg/ha). |
fertIn |
fertilizer incorporated (%). |
The VFSAPLE
function handles unit conversion and parameter estimation. Erosion, precipitation, runoff, and field parameters from VFS
are passed to APLE
. It also runs APLE
for both pre- and post-filter strip erosion values, so the efficacy of the filter strip at phosphorus removal can be calculated.
preVFS |
APLE object for pre-filter strip erosion values. |
postVFS |
APLE object for post-filter strip erosion values. |
pErosion |
Efficacy of the filter strip at removing erosion phosphorus (%). |
pTotal |
Efficacy of the fiter strip at removing total phosphorus (%). |
Sarah Goslee
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
# state college GHCN data # # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*2, weather.param) temp.compare <- temperature(365*2, weather.param) data(soildat) data(bufferdat) # bluegrass buffer, clay loam soil # short simulation to cut down on time required vfs.CL <- VFS(nyears = 2, thissoil = subset(soildat, Soil == "CL"), rain=rain.compare, temperature=temp.compare, thisbuffer = subset(bufferdat, Species == "bluegrass"), Duration = 2, FieldArea = 4000, VFSwidth = 10.7, VFSslope = 0.02, z = 1000, b = 1.5) print(vfs.CL) summary(vfs.CL) aple.CL <- VFSAPLE(vfs.CL, soilP = 120, OM = 2) print(aple.CL) summary(aple.CL)
The VFS
offers the capability of importing weather data from the GHCN, either from local files or the online repository, but this import is slow, so the result of the import is saved as an R object for those examples that need it.
The original GHCN file has many more columns.
data("weather")
data("weather")
A data frame with 3653 observations on the following 8 variables.
YEAR
a numeric vector
MONTH
a numeric vector
DAY
a numeric vector
PRCP.VALUE
a numeric vector
SNOW.VALUE
a numeric vector
SNWD.VALUE
a numeric vector
TMAX.VALUE
a numeric vector
TMIN.VALUE
a numeric vector
GHCN data comprises both current and historical weather station data world-wide.
# state college GHCN data # # created by: # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object: 10 years of daily weather data weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*3, weather.param) temp.compare <- temperature(365*3, weather.param)
# state college GHCN data # # created by: # weather <- read.dly(system.file("extdata", "USC00368449.dly", package = "VFS")) data("weather") # same object: 10 years of daily weather data weather.param <- wth.param(weather, method="markov") rain.compare <- rainfall(365*3, weather.param) temp.compare <- temperature(365*3, weather.param)
The climate generation functions for rainfall and temperature require parameters calculated from GHCN daily weather data, or from any data frame with columns containing year, month, day, precipitation, and minimum and maximum temperature. Partial years at the beginning or end of the dataset are removed. Leap days are also removed to standardize day-of-year calculation.
wth.param(dly, llim = 0, method = "poisson", year.col = "YEAR", month.col = "MONTH", day.col = "DAY", prcp.col = "PRCP.VALUE", tmin.col = "TMIN.VALUE", tmax.col = "TMAX.VALUE")
wth.param(dly, llim = 0, method = "poisson", year.col = "YEAR", month.col = "MONTH", day.col = "DAY", prcp.col = "PRCP.VALUE", tmin.col = "TMIN.VALUE", tmax.col = "TMAX.VALUE")
dly |
A data frame, such as the output of |
llim |
The minimum daily rainfall for a wet day to be counted. |
method |
Choice of model for which to calculate parameters, either "poisson" or "markov". |
year.col |
Name of the column containing year number. |
month.col |
Name of the column containing month number. |
day.col |
Name of the column containing day number. |
prcp.col |
Name of the column containing daily precipitation. |
tmin.col |
Name of the column containing daily minimum temperature. |
tmax.col |
Name of the column containing daily maximum temperature. |
The rainfall simulation currently offers choice of two methods: the simple Poisson model of Rodriguez-Iturbe et al. (1999), and the Markov chain model of Nicks (1974). The latter rainfall calculation is used by the APEX farm model, among others, and is based on monthly statistics. NOTE: For reasons of time and space, the example contains only ten years of daily weather data. We suggest using thirty years for estimating parameter values.
params |
Parameters for simulating long-term point rainfall. For
For
|
temperature |
Parameters for simulating long-term daily temperature. |
llim |
Minimum daily rainfall for a wet day. |
start |
First full year of weather data |
end |
Last full year of weather data |
Sarah Goslee
Rodriguez-Iturbe, I., Porporato, A., Ridolfi, L., Isham, V. and Coxi, D. R. (1999) Probabilistic modelling of water balance at a point: the role of climate, soil and vegetation. Proc Royal Soc A 455, 269–288.
Nicks, A. D. (1974) Stochastic generation of the occurrence, pattern and location of maximum amount of daily rainfall. Pp. 154–171 in: Proceedings Symposium on Statistical Hydrology. USDA Agricultural Research Service Miscellaneous Publication No. 1275, Washington, DC.
read.dly
,
rainfall
,
temperature
# GHCN daily weather file for State College, PA # subset of data (2000-2009) for station USC00368449 # data("weather") # calculate parameters for the poisson model # using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate ten years of rainfall rain10.p <- rainfall(365*10, weather.param.p) # increase per-event rainfall by 5 mm weather.param.p5 <- weather.param.p weather.param.p5$params$depth <- weather.param.p5$params$depth + 5 rain10.p5 <- rainfall(365*10, weather.param.p5) # calculate parameters for the Markov chain model # using 0.3 mm as the lower limit for wet days. weather.param.m <- wth.param(weather, method = "markov", llim = 0.3) # rainfall() selects Markov model based on input parameter types rain10.m <- rainfall(365*10, weather.param.m) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)
# GHCN daily weather file for State College, PA # subset of data (2000-2009) for station USC00368449 # data("weather") # calculate parameters for the poisson model # using 0.3 mm as the lower limit for wet days. weather.param.p <- wth.param(weather, method = "poisson", llim = 0.3) # simulate ten years of rainfall rain10.p <- rainfall(365*10, weather.param.p) # increase per-event rainfall by 5 mm weather.param.p5 <- weather.param.p weather.param.p5$params$depth <- weather.param.p5$params$depth + 5 rain10.p5 <- rainfall(365*10, weather.param.p5) # calculate parameters for the Markov chain model # using 0.3 mm as the lower limit for wet days. weather.param.m <- wth.param(weather, method = "markov", llim = 0.3) # rainfall() selects Markov model based on input parameter types rain10.m <- rainfall(365*10, weather.param.m) # simulate 10 years of temperature temp10 <- temperature(365*10, weather.param.p)