read.nasaoc: Read ocean data from NASA's Oceancolor web files

View source: R/read.nasaoc.R

read.nasaocR Documentation

Read ocean data from NASA's Oceancolor web files

Description

Read, for a user defined area, data from netCDF files downloaded from NASA's Oceancolor web page.

Usage

read.nasaoc(nc, lons, lats)

Arguments

nc

name of the netCDF file(s) to be read.

lons

a vector with western- and eastern-most longitudes.

lats

a vector with southern- and northern-most latitudes.

Details

This function can read data from one or multiple netCDF files downloaded from NASA's oceancolor web page (https://oceancolor.gsfc.nasa.gov/l3/). It has been tested mainly with sea surface temperature and chlorophyll concentration data from MODIS-Aqua and SeaWiFS sensors. It also works with Pathfinder AVHRR files v 5.2 and 5.3 (https://www.ncei.noaa.gov/products/avhrr-pathfinder-sst). The user must specify the minimum and maximum longitude and latitude limits within the interval (-180, 180) and (-90, 90) respectively.

Value

An object of class "satin". See satin-class for details.

Author(s)

Héctor Villalobos and Eduardo González-Rodríguez

See Also

read.ghrsst for JPL MUR SST data, read.osunpp for reading ocean productivity data, and read.cmems for data from Copernicus Marine Service.

Examples

if(interactive()){
 # read a single file, look at it and plot
 sst <- read.nasaoc("A20130892013096.L3m_8D_SST4_sst4_4km.nc", 
                        lats=c(20, 30), lons=c(-130, -105))
 sst
 str(sst)
 plot(sst)

 # read several files residing in the working directory 
 files <- list.files(pattern = glob2rx("*.nc"))
 lats <- c(20, 30)
 lons <- c(-130, -105)
 mSST <- read.nasaoc(files, lats, lons)      

 # plotting the first processed file
 plot(mSST) 

 # plotting the second processed file
 plot(mSST, period = 2)
}

satin documentation built on Sept. 23, 2022, 1:06 a.m.