read.osunpp | R Documentation |
Read, for a user defined area, net primary production data from hdf files downloaded from OSU's Ocean Productivity home page.
read.osunpp(h5, lons, lats)
h5 |
name of the hdf file(s) to be read. |
lons |
a vector with western- and eastern-most longitudes. |
lats |
a vector with southern- and northern-most latitudes. |
This function reads Oregon State University ocean productivity data files (http://sites.science.oregonstate.edu/ocean.productivity/standard.product.php). However, downloaded files should be first converted from hdf version 4 to version 5 with h4h5tools (https://portal.hdfgroup.org/display/support/Download+h4h5tools). The user must specify the minimum and maximum latitude and longitude limits within the interval (-90, 90) and (-180, 180) respectively.
An object of class "satin"
. See satin-class
for details.
Héctor Villalobos and Eduardo González-Rodríguez
read.nasaoc
for reading NASA's oceancolor web page data, read.ghrsst
for JPL MUR SST data, and read.cmems
for data from Copernicus Marine Service.
if(interactive()){ # read a single file, look at its structure and plot npp <- read.osunpp("vgpm.2013089.h5", lats=c(20, 30), lons=c(-130, -105)) npp str(npp) plot(npp) # read several files residing in the working directory files <- list.files(pattern = glob2rx("*.h5")) lats <- c(20, 30) lons <- c(-130, -105) mNPP <- read.osunpp(files, lats, lons) # plotting the first processed file plot(mNPP) # plotting the second processed file plot(mNPP, period = 2) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.