get.bath.data: Download bathymetry data

Description Usage Arguments Value Note Examples

View source: R/get.bath.data.r

Description

Download ETOPO bathymetry. Resolution is either 30 second or one minute resolution

Usage

1
2
get.bath.data(lonlow, lonhigh, latlow, lathigh, folder = tempdir(),
  seaonly = T, res = c(0.5), raster = TRUE)

Arguments

lonlow

numeric indicating minimum longitude extent of desired download (-180 to 180).

lonhigh

see lonlow

latlow

see lonlow

lathigh

see lonlow

folder

is destination folder. Default is a temporary directory.

seaonly

is logical indicating whether you want to download only bathymetry below sea level.

res

is numeric indicating resolution in minutes. Choices currently are 0.5 or 1minute.

raster

is logical indicating whether you want the function to return a raster or not (a list will be returned).

Value

Downloads a NetCDF file containing ETopo bathymetry. If raster=TRUE, a raster is generated from the downloaded NetCDF. Otherwise, the file is just downloaded.

Note

Be patient! The download can take a few minutes!

Examples

1
2
3
4
5
6
7
## Not run: 
# Not run to prevent actual data download
sp.lim <- list(lonmin = -82, lonmax = -25, latmin = 15, latmax = 50)
bathy <- get.bath.data(sp.lim$lonmin, sp.lim$lonmax, sp.lim$latmin, 
sp.lim$latmax, folder = tempdir())

## End(Not run)

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