Coerces a dataset into a met dataset. This fills in only a few of the typical data fields, so the returned object is much sparser than the output from read.met(). Also, almost no metadata fields are filled in, so the resultant object does not store station location, units of the data, data-quality flags, etc. Anyone working with data from Environment Canada (reference 2) is advised to use read.met() instead of the present function.

as.met(time, temperature, pressure, u, v, filename = "(constructed from data)")

Arguments

time

Either a vector of observation times (or character strings that can be coerced into times) or the output from canadaHCD::hcd_hourly (see reference 1).

temperature

vector of temperatures.

pressure

vector of pressures.

u

vector of eastward wind speed in m/s.

v

vector of northward wind speed in m/s.

filename

optional string indicating data source

Value

A met object.

References

  1. The canadaHCD package is in development by Gavin Simpson; see https://github.com/gavinsimpson/canadaHCD for instructions on how to download and install from GitHub.

  2. Environment Canada website for Historical Climate Data http://climate.weather.gc.ca/index_e.html

See also