read.met {oce} | R Documentation |
Reads a comma-separated value file in the format used by the Meteorological Service of Canada (MSC). The agency does not publish a format for these files, so this function was based on a study of a few sample files, and it may fail for other files, if MSC changes the format.
read.met(file, type = NULL, skip, tz = getOption("oceTz"), debug = getOption("oceDebug"), processingLog, ...)
file |
a connection or a character string giving the name of the file to load. |
type |
if |
skip |
optional number of lines of header that occur before the actual
data. If this is not supplied, |
tz |
timezone assumed for time data |
debug |
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more. |
processingLog |
if provided, the action item to be stored in the log. (Typically only provided for internal calls; the default that it provides is better for normal calls by a user.) |
... |
additional arguments, passed to called routines. |
An object of class
"met"
, of which the
data
slot contains vectors time
, temperature
,
pressure
, u
, and v
. The velocity components have units
m/s and are the components of the vector of wind direction. In other words,
the oceanographic convention on velocity is employed, not the meteorological
one; the weather forecaster's "North wind" has positive v
and zero
u
. In addition to these things, data
also contains items
called wind
(in km/h) and direction
(in tenths of a degree),
taken straight from the data file.
There seem to be several similar formats in use, so this function may not work in all cases.
Dan Kelley
Other things related to met
data: [[,met-method
,
[[<-,met-method
, as.met
,
met-class
, met
,
plot,met-method
,
subset,met-method
,
summary,met-method
## Not run: library(oce) met <- read.met("ile-rouge-eng-hourly-06012008-06302008.csv") plot(met, which=3:4) ## End(Not run)