if(interactive()){
# read a single file, look at its structure and plot
sst1km <- read.nasaoc("20130101090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.nc",
lats=c(20, 30), lons=c(-130, -105))
sst1km
str(sst1km)
plot(sst1km)
# read several files residing in the working directory
files <- list.files(pattern = glob2rx("*.nc"))
lats <- c(20, 30)
lons <- c(-130, -105)
mSST <- read.ghrsst(files, lats, lons)
# plotting the first processed file
plot(mSST)
# plotting the second processed file
plot(mSST, period = 2)
}
Run the code above in your browser using DataLab