sdsm                  package:seas                  R Documentation

_R_e_a_d _a_n_d _w_r_i_t_e _f_r_o_m _S_D_S_M

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

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

_A_r_g_u_m_e_n_t_s:

    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'

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     '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.

_A_u_t_h_o_r(_s):

     M.W. Toews

_R_e_f_e_r_e_n_c_e_s:

     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 
      <URL: 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: 
      <URL: http://www.cics.uvic.ca/scenarios/sdsm/select.cgi>

_S_e_e _A_l_s_o:

     'read.msc', 'change'

_E_x_a_m_p_l_e_s:

     ## 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)

