get.env: Download and Read Oceanographic Data

Description Usage Arguments Value Examples

View source: R/get.env.r

Description

get.env accesses oceanographic data like sea surface temperature from a remote server and downloads the temporal and spatial extent of interest for further use

Usage

1
2
3
get.env(uniqueDates = NULL, filename = NULL, type = NULL,
  spatLim = NULL, resol = NULL, save.dir = getwd(), sst.type = NULL,
  depLevels = NULL)

Arguments

uniqueDates

is a POSIXct vector of desired dates

filename

is first part of the filename specified to the download function. For example, if downloaded files were specific to a particular dataset, you may want to identify that with a name like 'tuna' or 'shark1'. This results in a downloaded filename of, for example, 'tuna_date.nc'.

type

is a character string indicating whether you're after sea surface temperature 'sst', hybrid coordinate ocean model 'hycom', or world ocean atlas 'woa' data

spatLim

is a list of spatial limits as list(xmin, xmax, ymin, ymax)

resol

is character describing the desired resolution in degrees if type = 'woa', otherwise NULL. Choices are 'one' or 'quarter'.

save.dir

is the directory to save the downloaded data to

sst.type

is character indicating type of desired SST product. Choices are currently Optimum Interpolation ('oi') https://www.ncdc.noaa.gov/oisst or a high-resolution composite ('ghr') https://www.ghrsst.org/.

depLevels

is an integer describing which depth levels to download from Hycom (e.g. 1=surface). Default is NULL and all levels are downloaded.

Value

nothing, just downloads the data to your local machine

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Not run to prevent actual data download
sp.lim <- list(lonmin = -82, lonmax = -25, latmin = 15, latmax = 50)
# FOR OI SST DATA
get.env(as.Date('2015-10-01'), filename='oisst', type = 'sst', 
sst.type='oi', spatLim = sp.lim, save.dir = tempdir())

# FOR HYCOM DATA
get.env(as.Date('2015-10-01'), filename='hycom', type = 'hycom', 
spatLim = sp.lim, save.dir = tempdir())

# FOR WORLD OCEAN ATLAS DATA
get.env(type = 'woa', resol = 'quarter', save.dir = woa.dir)

## End(Not run)

HMMoce documentation built on Nov. 17, 2017, 5:57 a.m.