readsst | R Documentation |
SST data read from files managed by
sstfiles
. Dates are matched to file names by finding
the nearest match in time within a short duration. If date
is greater than length 1 then the sorted set of unique matches is
returned.
see Details in raadtools
readsst(
date,
time.resolution = c("daily", "monthly"),
xylim = NULL,
lon180 = TRUE,
varname = c("sst", "anom", "err", "ice"),
setNA = TRUE,
latest = TRUE,
returnfiles = FALSE,
...,
inputfiles = NULL
)
date |
date or dates of data to read, |
time.resolution |
time resoution data to read, daily or monthly |
xylim |
spatial extents to crop from source data, can be anything accepted by |
lon180 |
defaults to TRUE, to "rotate" Pacific view 0, 360 data to Atlantic view -180, 180 |
varname |
variable to return from the data files, default is "sst" or "anom", "err", "ice" |
setNA |
mask out land values (only applies to monthly time.resolution) |
latest |
if TRUE (and date not supplied) return the latest time available |
returnfiles |
ignore options and just return the file names and dates |
... |
Arguments passed on to |
inputfiles |
input the files data base to speed up initialization |
readall |
FALSE by default |
raster
object
icefiles
for details on the repository of
data files, raster
for the return value
## Not run:
## read one time slice and plot it up in preparation for reading a time series
d <- readsst()
plot(d)
## this step is interactive, draw a boundary on the plot
ext <- drawExtent()
## these can be created manually with xmin,xmax,ymin,ymax
## ext <- extent(-100, 150, -75, -30)
## now read a big chunk of data for this small region
dts <- seq(as.Date("2001-01-03"), by = "1 week", length = 100)
sst <- readsst(dts, xylim = ext)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.