Learn R Programming

HMMoce (version 1.0.0)

get.bath.data: Download bathymetry data

Description

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

Usage

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.

Examples

Run this code
# 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())
# }

Run the code above in your browser using DataLab