read_sed: read_sed

Description Usage Arguments Author(s) See Also

View source: R/read_sed.R

Description

Function for reading the ‘output.sed’ files of SWAT 2009 and not in SWAT 2005 (regarding sediment loads), and giving as output a data.frame with the columns of the read file.

The ‘output.sed’ file has 1 row representing the header, 4 columns with the text ‘RCH’, ‘GIS’, ‘MON’, ‘AREA’, and 19 additional colums with results regarding sediments loads on reaches.

Usage

1
2
read_sed(file="output.sed", rchID=NA, col.names=NULL, tstep,                    
         Date.Ini, Date.Fin, date.fmt="%Y-%m-%d", verbose=TRUE)

Arguments

file

the name of the file which the data are to be read from. If it does not contain an _absolute_ path, the file name is _relative_ to the current working directory, 'getwd()'. Tilde-expansion is performed where supported.

rchID

OPTIONAL. Integer with the number of the reach for which the results will be provided.
If this argument is not provided, the results will be given for all the reaches in ‘output.sed’

col.names

OPTIONAL. character with the column name in file that stores the results that the user wants to convert into a zoo object

tstep

Time step used for the simulation that created the ‘output.sed’ file.
It must be one of the following values: c("daily", "monthly", "annual"),

Date.Ini

OPTIONAL, only used when rchID is provided AND it is a unique number.
character with the starting date for the results that are stored in file, which is used to provide a zoo object as output.

Date.Fin

OPTIONAL, only used when rchID is provided AND it is a unique number.
character with the ending date for the results that are stored in file, which is used to provide a zoo object as output.

date.fmt

character, with the format used to define Date.Ini, Date.Fin. See 'format' in 'as.Date'.

verbose

logical; if TRUE, progress messages are printed

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail.com

See Also

read_rch, read_sub, read_hru, read_rsv


hzambran/SWAT2R documentation built on May 17, 2019, 10:07 p.m.