ms_download_ws_attr: Download MacroSheds watershed attributes

View source: R/ms_download_ws_attr.R

ms_download_ws_attrR Documentation

Download MacroSheds watershed attributes

Description

Download MacroSheds watershed attribute data for all sites. Choose between temporally explicit spatial summaries, or summaries across both time and space. For some variables that are not time-varying, these are the same.

Usage

ms_download_ws_attr(
  macrosheds_root,
  dataset = "summaries",
  quiet = FALSE,
  version = "latest",
  omit_climate_data = FALSE,
  skip_existing = TRUE,
  timeout = 300
)

Arguments

macrosheds_root

character. Directory where watershed attribute files will be downloaded. If this directory does not exist, it will be created. Does not have to be the same as macrosheds_root provided to ms_download_core_data(), but might as well be. This directory should only be used for MacroSheds data files.

dataset

character. This function can download each of the four collections of watershed attribute data provided by MacroSheds.

  • "summaries": watershed attributes summarized across time and space (i.e. one value for each site).

  • "time series": temporally explicit watershed attributes where available. See omit_climate_data parameter.

  • "CAMELS summaries" and...

  • "CAMELS Daymet forcings": additional watershed summary data that conform as closely as possible to the specifications of the CAMELS dataset. See MacroSheds metadata for a list of discrepancies.

  • you may also use "all" to retrieve all four datasets. omit_climate_data will still be recognized.

Once downloaded, data can be loaded into R with ms_load_product().

quiet

logical. If TRUE, some messages will be suppressed.

version

numeric or "latest". The MacroSheds dataset version to download.

omit_climate_data

logical. Ignored unless dataset == 'time series'. If you don't care about climate data, you may use this argument to avoid downloading it (because it's large, approx 2 GiB), while still downloading terrain, vegetation, parent material, land use, and hydrology data.

skip_existing

logical. If FALSE, dataset components already downloaded to macrosheds_root will be overwritten. If TRUE, these will be skipped.

timeout

integer. Temporarily overrides getOption(timeout).

Value

Returns NULL. Downloads watershed attribute data to the directory specified by macrosheds_root. For full documentation, visit EDI.

Author(s)

Wes Slaughter, wslaughter@berkeley.edu

Mike Vlah, vlahm13@gmail.com

Spencer Rhea

See Also

ms_download_core_data(), ms_load_product()

Examples

ms_download_ws_attr(macrosheds_root = 'data/macrosheds', dataset = 'time series')

MacroSHEDS/macrosheds documentation built on Oct. 30, 2024, 11:15 a.m.