downloadEnv: Download Environmental Data

Description Usage Arguments Value Author(s) Examples

View source: R/downloadEnv.R

Description

Downloads environmental data matching the coordinates in a set of data

Usage

1
downloadEnv(data, edinfo, fileName = NULL, buffer = c(0, 0, 0))

Arguments

data

Data containing Longitude, Latitude, and UTC to download matching environmental data for

edinfo

either a edinfo object from getEdinfo or erddapToEdinfo or an ERDDAP dataset ID

fileName

name of the file to save downloaded data. If left as the default NULL, data will be saved to a temporary folder

buffer

numeric vector of the amount to buffer the Longitude, Latitude, and UTC coordinates by

Value

if download is successful, invisibly returns the filename. If it fails returns FALSE.

If successful, the file name of downloaded data. If not, returns FALSE

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data <- data.frame(Latitude = 32, Longitude = -117,
                   UTC = as.POSIXct('2000-01-01 00:00:00', tz='UTC'))
## Not run: 
# not run because download could take time
# download jplMURSST41 dataset
edi <- erddapToEdinfo('jplMURSST41')
ncFile <- downloadEnv(data, edi, 'sstData.nc')

# browse suggested sst datasets, then download
edi <- browseEdinfo(var='sst')
ncFile <- downloadEnv(data, edi, 'sstData.nc')

## End(Not run)

PAMmisc documentation built on Oct. 8, 2021, 9:08 a.m.