get_daymet_swe: Download Daymet SWE Data

View source: R/Daymet_fun.R

get_daymet_sweR Documentation

Download Daymet SWE Data

Description

Downloads snow-water equivalent data from Daymet

Usage

get_daymet_swe(year, tile, out_dir = "data")

Arguments

year

⁠[numeric]⁠ Year(s) for which to download data.

tile

⁠[numeric]⁠ Tile(s) for which to download data. See details.

out_dir

⁠[character = "data"]⁠ The directory where data will be downloaded. It will be created if it does not exist.

Details

This function creates a text string for the correct URL for each year/tile combination, which will be passed to utils::download.file() to download the data.

More details on arguments:

  • year can be a vector of any number of years. It will be combined with tile to return all combinations of year and tile.

  • tile can be a vector of any number of tiles. A figure with the Daymet tiles can be found here

Value

Returns character vector with full paths to downloaded files.

Examples


## Not run: 

get_daymet_swe(year = c(2018, 2019),
               tile = c(12095, 12096),
               out_dir = tempdir())

## End(Not run)


bsmity13/snowdl documentation built on Feb. 24, 2024, 9:03 p.m.