These is a group of R data sets for monthly min/max temperatures and precipitation over the period 1895-1997. It is created from the more extensive US data record described in Observed monthly precipitation, min and max temperatures for the coterminous US 1895-1997
In R:
attach("RData_USmonthly_met")This workspace will contain the objects:
"CO.elev" "CO.id" "CO.loc" "CO.ppt" "CO.tmax" "CO.tmin" "get.station"CO.id are alphanumeric station id codes. CO.elev are station elevations in meters. CO.loc are station locations as a 2 column matrix of longitude /latitude.
The following data matrices have dimension 1236X367
where the
columns index stations and the rows index time.
CO.ppt monthly total precipitation in millimeters.
CO.tmin monthly average of the daily minimum temperature
in tenths of a degree C.
CO.tmax monthly average of the daily maxmium
temperature
in tenths of a degree C.
library( fields) attach("RData.COmonthly.met") ppt.season <- tmax.season <- tmin.season <- matrix( NA, ncol=ncol(CO.tmin), nrow=12) M <- ncol(CO.tmin) months <- rep( 1:12,103) for( kk in 1:M){ # loop over stations find means and note conversion to English # units! tmin.season[,kk]<-stats(CO.tmin[,kk], by=months)[2,]*.1*(9/5) +32 tmax.season[,kk]<-stats(CO.tmax[,kk], by=months)[2,]*.1*(9/5) +32 ppt.season[,kk]<-stats(CO.ppt[,kk], by=months)[2,]/10*2.54 cat( kk, " ") }Now plot up monthly averages for July and December coding values at station locations using a color bar.
set.panel( 2,3) image.plot(as.image( c(tmin.season[7,]) , x= CO.loc)) title("July mean Tmin (F)") image.plot(as.image( c(tmax.season[7,]), x= CO.loc)) title("July mean Tmax (F)") image.plot(as.image( c(ppt.season[7,]), x= CO.loc)) title("July mean precip (inches)") image.plot(as.image( c(tmin.season[12,]) , x= CO.loc)) title("Dec mean Tmin (F)") image.plot(as.image( c(tmax.season[12,]), x= CO.loc)) title("Dec mean Tmax (F)") image.plot(as.image( c(ppt.season[12,]), x= CO.loc)) title("Dec mean precip (inches)")