Functions to read point meteorological data from the disks in different formats.
readmeteorologypoint(file, dates = NULL, format = "meteoland/txt", sep="\t")
readmeteorologypointfiles(points, files=NULL, dates = NULL, format="meteoland/txt",
sep="\t")
readmeteorologypoints(files, dates = NULL, stations = NULL, format = "netCDF",
varmapping = NULL, verbose = FALSE)
A string of the file to be read.
An object of class SpatialPoints-class
(in this case files
cannot be NULL
) or object of class SpatialPointsDataFrame-class
with two data columns: 'dir
' and 'filename
' (and possibly 'format
').
A vector of strings to be read (when points
is of class SpatialPoints-class
). Length and order must match points
.
Object of class "Date"
describing a subset of dates to be extracted from meteorological series. If NULL
the whole period read from files is kept.
Format of meteorological data. Current accepted formats for readmeteorologypoint
and readmeteorologypointfiles
are "meteoland/txt"
, "meteoland/rds"
, "castanea/txt"
and "castanea/rds"
. The only accepted format for readmeteorologypoints
is "netCDF"
.
The field separator character for ascii text files (see read.table
).
An integer vector or string vector identifying point indices or station names in the netCDF.
Named character vector specifying a mapping of variables in the NetCDF into variables used in meteoland (e.g. c(MinTemperature = "tmn")
specifies a map of variable 'tmn' to MinTemperature).
A logical flag to output process information in the console.
Function readmeteorologypoint
reads data series of a single location from an ascii or rds file and returns a data frame. Function readmeteorologypointfiles
can be used to read multiple ascii/rds files and build an object of SpatialPointsMeteorology-class
. This is done by supplying an points
object of class SpatialPointsDataFrame-class
with point meta data. In readmeteorologypointfiles
the value of format
is used as default but can be overloaded if points
includes a column 'format
'.
Function readmeteorologypoints
is used to read multiple point data from a netCDF. In this case, a mapping can be supplied to map variable names in the netCDF to variables used in meteoland.
writemeteorologypoint
, read.table
, SpatialPointsMeteorology-class