load_Bathy: Load Bathymetry data

View source: R/load.R

load_BathyR Documentation

Load Bathymetry data

Description

Download the up-to-date projected GEBCO data from the online CCAMLRGIS (http://gis.ccamlr.org/) and load it to your environment. This functions can be used in two steps, to first download the data and then use it. If you keep the downloaded data, you can then re-use it in all your scripts.

Usage

load_Bathy(LocalFile, Res = 5000)

Arguments

LocalFile

To download the data, set to FALSE. To re-use a downloaded file, set to the full path of the file (e.g., LocalFile="C:/Desktop/GEBCO2021_5000.tif").

Res

Desired resolution in meters. May only be one of: 500, 1000, 2500 or 5000.

Details

To download the data, you must either have set your working directory using setwd, or be working within an Rproject. In any case, your file will be downloaded to the folder path given by getwd.

It is strongly recommended to first download the lowest resolution data (set Res=5000) to ensure it is working as expected.

To re-use the downloaded data, you must provide the full path to that file, for example:

LocalFile="C:/Desktop/GEBCO2021_5000.tif".

This data was reprojected from the original GEBCO Grid after cropping at 40 degrees South. Projection was made using the Lambert azimuthal equal-area projection (CCAMLRp), and the data was aggregated at several resolutions.

Value

Bathymetry raster.

References

GEBCO Compilation Group (2021) GEBCO 2021 Grid (doi:10.5285/c6612cbe-50b3-0cff-e053-6c86abc09f8f)

See Also

add_col, add_Cscale, Depth_cols, Depth_cuts, Depth_cols2, Depth_cuts2, get_depths, create_Stations, get_iso_polys, SmallBathy.

Examples

 


#The examples below are commented. To test, remove the '#'.

##Download the data. It will go in the folder given by getwd():
#Bathy=load_Bathy(LocalFile = FALSE,Res=5000)
#plot(Bathy, breaks=Depth_cuts,col=Depth_cols,axes=FALSE)

##Re-use the downloaded data (provided it's here: "C:/Desktop/GEBCO2021_5000.tif"):
#Bathy=load_Bathy(LocalFile = "C:/Desktop/GEBCO2021_5000.tif")
#plot(Bathy, breaks=Depth_cuts,col=Depth_cols,axes=FALSE)




CCAMLRGIS documentation built on Sept. 27, 2023, 9:09 a.m.