View source: R/Get_Ocean_Prod2.R
Get_Ocean_Prod2 | R Documentation |
Download SeaWiFS or MODIS HDF4 file from Ocean Productivity Web page and then convert to a raster object
Get_Ocean_Prod2(url, outdir = NULL)
url |
A character string naming the URL of a HDF4 file to be downloaded |
outdir |
output directory to write raster file |
x |
Raster* object defining the spatial extent, resolution and projection of climatology data to be retrived. If not provide, returning full data set. |
plot |
Logical, whether or not to plot the output raster |
This function dowloads HDF4 file from Ocean Productivity Web page http://www.science.oregonstate.edu/ocean.productivity/
This is an R wrapper for the nc_open
and ncvar_get
functions. Detailed description of the usage
can be found in https://hdfeos.org/software/r.php
a raster object
Chih-Lin Wei <chihlinwei@gmail.com>
https://hdfeos.org/software/r.php
# Download July 2002 VGPM as example
url <- "http://orca.science.oregonstate.edu/data/2x4/monthly/vgpm.r2018.m.chl.m.sst/hdf/vgpm.2002182.hdf.gz"
Get_Ocean_Prod2(url)
# Download July 2002 chl as example
url <- "http://orca.science.oregonstate.edu/data/1x2/monthly/chl.modis.r2018/hdf/chl.2002182.hdf.gz"
Get_Ocean_Prod2(url)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.