download_etopo_subset: Download part of the ETOPO relief dataset.

View source: R/download_etopo_subset.R

download_etopo_subsetR Documentation

Download part of the ETOPO relief dataset.

Description

This function downloads part of the ETOPO2020 relief (topography+bathymetry) dataset.

Usage

download_etopo_subset(rast_template, ...)

Arguments

rast_template

a terra::SpatRaster providing the extent and resolution to be downloaded. This raster needs to have identical vertical and horizontal resolution, and standard lat/long projection.

...

additional parameters to be passed to marmap::getNOAA.bathy() to customise how files are stored. See the manpage for that function for details

Details

Use this function if you only need part of the dataset, or you need a relatively low resolution. This function fetches the necessary subset on the fly from the NOAA server. If you plan to use the ETOPO2022 dataset extensively, it is worthwhile downloading it permanently to your computer with download_etopo(), but beware that it is a large file (>1Gb). This function uses marmap::getNOAA.bathy() to download the data, and then converts them into a terra::SpatRaster formatted to be compatible with pastclim. NOTE: this function does not save the relief, it returns a terra::SpatRaster. If you plan to reuse this relief multiple times, it would be wise to save it with terra::writeCDF().

Value

a terra::SpatRaster with the relief for the chosen region


EvolEcolGroup/pastclim documentation built on Feb. 26, 2025, 1:10 p.m.