Skip to contents

read_weather reads '*.wth' weather CENTURY files and gives a wide-format data.frame

Usage

read_weather(pathname = pathname, filename = filename)

Arguments

pathname

character string containing a valid path to a *.sch file.

filename

character string with the name of the weather file. It must include the extension '.wth'.

Value

A data.frame containing the monthly climatic data for the site.

Details

The output data.frame is presented in wide format with 5 columns, namely 'year', 'month', 'prec', 'tmax' and 'tmin'. Columns are sorted in ascending order by year and month.

NA values in CENTURY weather files are identified by -99.99 by default.

Examples

# See example in \code{\link{century_run}}.