sdsm {seas} | R Documentation |
Reads and writes the data format used in SDSMs ‘DAT’ and ‘OUT’ extensions.
# reading read.sdsm(file, start = 1961, end = 2000, year.length = 366) read.sdsm(file) # writing write.sdsm(dat, var, start, end, file) write.sdsm(dat, var)
file |
name of ‘DAT’ or ‘OUT’ file |
dat |
data.frame of variables to be written |
start |
starting year |
end |
ending year |
var |
name of variable to be written from dat |
year.length |
maximum allowable year length; this is usually 366 for measured data, 365 for CCCma model data and 360 for Hadley model data |
This function readings and writes climate data with the Statistical Downscaling Model, or SDSM. The model uses ‘DAT’ extensions for input data, such as daily observations of mean temperature, and ‘OUT’ extensions for modeled output.
Since the files used by SDSM do not have any meta-data,
read.sdsm
attempts to interpret this from the filename,
otherwise this needs to be specified. The following table shows how
this decision is made:
grep | start | end | year.length |
Cal | 1961 | 2000 | 366 |
Cur | 1961 | 2000 | 365 |
2020 | 2010 | 2039 | 365 |
2050 | 2040 | 2069 | 365 |
2050 | 2070 | 2099 | 365 |
read.sdsm
returns a data.frame
of the measured
variables. The variables are named V1
...Vn
,
for n ensembles.
M.W. Toews
Wilby, R.L., Dawson, C.W. and Barrow, E.M. 2002, ‘SDSM - a decision support tool for the assessment of regional climate change impacts’, Environmental Modelling Software, 77, 473–471.
SDSM can be downloaded free-of-charge for Windows platforms from http://www-staff.lboro.ac.uk/~cocwd/SDSM/
CGCM1 and HADCM3 model data for SDSM can be downloaded from the Canadian Climate Impacts and Scenarios website: http://www.cics.uvic.ca/scenarios/sdsm/select.cgi
## Not run: # reading gf50 <- read.sdsm("GF_2050s_precip.OUT") gf50.ss <- seas.sum(gf50,var=paste("V",1:20,sep=""),name="Grand Forks") # analysis image(gf50.ss,var="V1") image(gf50.ss,var="V2") image(gf50.ss,var="V3") # writing data(mscdata) hj <- mksub(mscdata,id=2100630) write.sdsm(hj,"precip",1961,2000,"HJ_Obs_prcp.DAT") ## End(Not run)