sdsm: Read and write from SDSM

sdsmR Documentation

Read and write from SDSM

Description

Reads and writes the data format used in SDSM's ‘DAT’ and ‘OUT’ extensions.

Usage

# reading
read.sdsm(file, start = 1961, end = 2000, calendar)

# writing
write.sdsm(dat, var, start, end, file = "")

Arguments

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

calendar

calender used for data; if unspecified, this is assumed to be proleptic Gregorian (normal); however, for CCCma models this should be "365_day", and for Hadley models this should be "360_day"; see year.length

Details

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.

Value

read.sdsm returns a data.frame of the measured variables. The variables are named V1...Vn, for n ensembles.

If a calendar is specified, this is stored as an attribute in the date data frame column.

Author(s)

Mike Toews

References

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, 17 (2), 145–157, doi: 10.1016/S1364-8152(01)00060-3

SDSM can be downloaded free-of-charge for Windows platforms from
https://www.sdsm.org.uk/

CGCM1 and HADCM3 model data for SDSM can be downloaded from the Canadian Climate Impacts and Scenarios website:
https://web.archive.org/web/20120218192015/http://www.cics.uvic.ca/scenarios/sdsm/select.cgi (archived)

See Also

read.msc, change

Examples

## Not run: 
# reading
fname <- system.file("extdata", "GF_2050s_precip.OUT", package="seas")
gf50 <- read.sdsm(fname)
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)
fname <- paste(tempdir(), "HJ_Obs_prcp.DAT", sep="/")
write.sdsm(hj, "precip", 1961, 2000, fname)

## End(Not run)

seas documentation built on May 2, 2022, 5:08 p.m.