Here's how to use the new surf routine in S+
From the shell, do:
set_project
the new version of set_project sets two new environ
variables:
SURF_NETCDF_DIR
SURF_NETCDF_FILE
Splus
> iod <- surf(c("u","v","u:w","p","u.csat"))
> d <- read(iod,"1997 apr 23 00:00","1997 apr 23 01:00")
> close(iod)
There are two other arguments to read(): dt and avgperiod.
dt is the desired resolution of the data. If any variables in
the file are higher resolution than dt, then they are averaged
to dt, with the specified average period (see average.ats).
If you do a read of a combination of 5 and 1 minute data, and
specify dt=60:
iod <- surf(c("u","v","u.prop","v.prop"))
d <- read(iod,"1997 apr 23 00:00","1997 apr 23 01:00",dt=60)
the resulting matrix will contain 1 minute data, with NA's inserted
into the sonic data - no interpolation, or last-value-repeated
support yet.
If you do:
iod <- surf(c("u","v","u.prop","v.prop"))
d <- read(iod,"1997 apr 23 00:00","1997 apr 23 01:00")
then you'll get 5 minute data, with block averages of the 1 minute
data, because the default for dt is 300 secs.
More to come...