NordklimData {nordklimdata1} | R Documentation |
The Nordklim Dataset
Description
The NORDKLIM data set - monthly data for 7 climatic elements from 114 stations in 5 Nordic countries.
Usage
data(NordklimData)
Format
A data frame with 71329 observations on the following 16 variables.
- NordklimNumber
Nordklim number identifier
- ClimateElement
Climate element identifier
- FirstYear
First year of the dataset
- January
Readings for January
- February
Readings for February
- March
Readings for March
- April
Readings for April
- May
Readings for May
- June
Readings for June
- July
Readings for July
- August
Readings for August
- September
Readings for September
- October
Readings for October
- November
Readings for November
- December
Readings for December
- CountryCode
Country code
Details
The NORDKLIM data set has 16 columns, the first three columns are the Nordklim number, climate element number and first year of the dataset, the next 12 columns are twelve months of readings, from January to December and the last column is the country code. Monthly climatic elements in the NORDKLIM data set:
Element number | Climatic element | Unit | Abbreviation |
101 | Mean temperature | 0.1 C | T |
111 | Mean maximum temperature | 0.1 C | Tx |
112 | Highest maximum temperature | 0.1 C | Th |
113 | Day of Th | date | Thd |
121 | Mean minimum temperature | 0.1 C | Tn |
122 | Lowest minimum temperature | 0.1 C | Tl |
123 | Day of Tl | date | Tld |
401 | Mean Pressure | 0.1 hPa | P |
601 | Precipitation Sum | 0.1 mm | R |
602 | Maximum 1-day precipitation | 0.1 mm | Rx |
701 | Number of days with snow cover (> 50% covered) | days | dsc |
801 | Mean cloud cover | % | N |
Source
http://www.smhi.se/hfa_coord/nordklim
References
Nordklim dataset 1.0 - description and illustrations Norwegian meteorological institute, 08/01 KLIMA, 2001
Examples
## Not run:
data(NordklimData)
str(NordklimData)
# get all the country codes
countries <- unique(NordklimData$CountryCode)
# earliest and latest year of data collection
minFirstYear<- min(NordklimData$FirstYear)
maxFirstYear<- max(NordklimData$FirstYear)
allyears <- min(NordklimData$FirstYear):max(NordklimData$FirstYear)
# get the yearly average of all records
avgNordk <- cbind(NordklimData[,c('CountryCode','ClimateElement','FirstYear',
'NordklimNumber')],
YrAvg=apply(NordklimData[,c('January','February','March','April','May','June',
'July','August','September', 'October','November','December')],1,function(x)
{x[x==-9999]<-NA;mean(x,na.rm = TRUE)}))
str(avgNordk)
# plot the Danish mean temperatures for its 5 stations (for a quick visual
# inspection, no need for labels or legends)
DanavgNordk <- avgNordk[which(avgNordk$CountryCode=='DK' &
avgNordk$ClimateElement==101),c('FirstYear','YrAvg','NordklimNumber')]
p <- unique(DanavgNordk$NordklimNumber)
for (Dp in p) { plot(DanavgNordk[which(DanavgNordk$NordklimNumber==Dp),
c('FirstYear','YrAvg')],type='l',col=( which(Dp==p)),
xlim=c(min(DanavgNordk$FirstYear), max(DanavgNordk$FirstYear)),
ylim=c(60,120)); if (Dp != p[length(p)]) par(new=T)}
# average each country
avgNordkCountry=aggregate(YrAvg ~ CountryCode+ClimateElement+FirstYear ,
data = avgNordk, function(x) {x[x==-9999]<-NA;mean(x,na.rm = TRUE)})
str(avgNordkCountry)
# plot the temperatures (mean of all stations) for each country
for (country in countries) { plot(avgNordkCountry[
which(avgNordkCountry$CountryCode==country & avgNordkCountry$ClimateElement==101),
c('FirstYear','YrAvg')],type='l',col=( which(country==countries)),
xlim=c(minFirstYear, maxFirstYear),ylim=c(0,120),
main='Mean of yearly means of all stations for each country',
xlab='Years',ylab='Mean temperature');
if (country != countries[length(countries)]) par(new=T)}
legend('topleft', legend = countries, col=1:5, pch=1, lty=1, merge=TRUE)
## End(Not run)