mscdata {climate.plot}R Documentation

Meteorological Survey of Canada sample climate data

Description

Sample climate data from Meteorological Survey of Canada (MSC) climate stations in western Canada.

Usage

data(mscdata)

Format

A data.frame with 26358 daily observations on the following 10 variables (metric units of degrees C and mm/day):

id
factor used to distinguish multiple stations within a single data frame
year
integer year
jday
integer Julian day; 1-365 or 1-366
date
Date class; useful for plotting a continuous time-series
max_t
Maximum daily temperature
min_t
Minimum daily temperature
mean_t
Mean daily temperature
precip
Total daily precipitation
rain
Total daily liquid-phase precipitation
snow
Total daily solid-phase precipitation

There are three climate stations in this data frame from:
ID Station Location Province
1096450 Prince George BC
1108447 Vancouver BC
2100630 Haines Junction YT

All data spans from 1975 to 2004 for each station.

Details

To use the functions in climate.plot, build a data.frame similar to this one.

The field id is optional, but very handy when handling multiple stations. The date column was made using dat$date <- as.Date(paste(dat$year,dat$jday),"%Y %j").

Author(s)

M.W. Toews

Source

Data provided by the Meteorological Survey of Canada (http://www.msc.ec.gc.ca/), with permission. This data may only be reproduced for personal use; any other reproduction is permitted only with the written consent of Environment Canada (http://climate.weatheroffice.ec.gc.ca/contacts/).

See Also

mscstn, mksub, mkfact, read.msc

Examples

data(mscstn)
data(mscdata)

head(mscdata)
stnids <- levels(mscdata$id)

# show stations and station names available in this data frame
data.frame(stnids, name=getstnname(stnids))
dat <- mksub(mscdata, id=1108447)
dat$fact <- mkfact(dat, "mon")
plot(mean_t ~ date, data=dat, type="l")
plot(mean_t ~ date, data=dat, subset=fact=="Dec", type="l")
plot.seas.temp(dat)
plot.year(dat)

[Package climate.plot version 0.1-2 Index]