-
Notifications
You must be signed in to change notification settings - Fork 30
8.1 Demos and training material
Rasmus E. Benestad edited this page Jan 7, 2022
·
7 revisions
The demos included in esd include scripts that plot the European temperature reconstruction from Luterbacher et al (2004) and run experiment 1 of CORDEX-ESD.
To plot the European temperature reconstruction:
demo(EuropeT2mRconstr,ask=FALSE)
To run the CORDEX experiment:
demo(CORDEX.ESD.exp.1.pr,ask=FALSE)
demo(CORDEX.ESD.exp.1.tx,ask=FALSE)
demo(CORDEX.ESD.exp.1.tn,ask=FALSE)
- Part 1: How to work with climate station data.
- Part 2: How to work with gridded climate data (fields).
- "Heavy MET talk" on Downscaling: Part I and Part II.
- Smart data in R.
- A comprehensive strategy for downscaling global climate models.
- Estimating approximate intensity-duration-frequency curves for rainfall.
- R training for climate analysis
- Heavy MET talk - Regional climate information for adaptation
- Demonstration of common EOFs
The R-code used in the part1 demo is as following:
## Demonstration of the esd-package: part 1 - working with climate station data
##
## @RasmusBenestad, Oslo, Norway, 2019-01-07
library(esd)
Y <- station(param='precip',src='ghcnd',cntr='Mozambique')
map(Y,FUN='nv',new=FALSE)
diagnose(Y,new=FALSE)
y <- subset(Y,is='BEIRA')
summary(y)
plot(y,new=FALSE)
plot(annual(y,FUN='sum',n.min=200),new=FALSE)
vis(y)
ss <- select.station(src='ghcnd',param='tmax',lon=c(-30,-10),lat=c(-10,10))
map(ss,new=FALSE)
Z <- station(ss)
plot(anomaly(Z),map.show=FALSE,new=FALSE)
X <- retrieve('~/OpenClimateData/data/precip.Asia.nc')
map(X,FUN='max',new=FALSE)
wheel(subset(X,is=1))
diagnose(X,new=FALSE)
The R-code used in the part2 demo is as following:
## Demonstration of the esd-package: part 2 - working with gridded climate data
## The gridded data are referred to as 'fields'
## @RasmusBenestad, Oslo, Norway, 2019-01-07
library(esd)
## Retreive data from a netCDF file
X <- retrieve('~/Downloads/air.mon.mean.nc')
## Use the annual mean of the reanalysis of the temperature
X <- annual(X)
map(g2dl(X),FUN='mean',new=FALSE)
## PLot the global mean temperature
plot(subset(X,it=c(1948,2017)),map.show=FALSE,new=FALSE)
x <- subset(X,is=list(lon=c(-30,50),lat=c(-40,40)))
## Use empirical orthogonal functions to study patterns of covariance
eof <- EOF(x)
plot(eof,ip=2)
Z <- regrid(X,is=X)
## Compare the field data with the gridded reanalysis
data(Oslo)
y <- regrid(X,is=Oslo)
plot(anomaly(combine.stations(annual(Oslo),y)),map.show=FALSE,new=FALSE)
Z <- retrieve('~/data/CMIP5.monthly/rcp45/tas_Amon_ens_rcp45_000.nc')
z <- regrid(Z,is=x)
map(z,new=FALSE)
Copyright of MET Norway 2022