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
)

Arguments

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 extent, see Details

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 raadtools

inputfiles

input the files data base to speed up initialization

readall

FALSE by default

Value

raster object

See also

icefiles for details on the repository of data files, raster for the return value

Examples

if (FALSE) {
## 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)
}