nsa_get_snodas: Download and extract national snow analysis data

View source: R/nsa_get_snodas.R

nsa_get_snodasR Documentation

Download and extract national snow analysis data

Description

Download and extract national snow analysis data

Usage

nsa_get_snodas(
  product,
  start.date,
  end.date = NULL,
  region = "North America",
  path = "",
  delete.archive = FALSE,
  force.download = FALSE
)

Arguments

product

A character vector of one or more products available via NOHRSC Acceptable values are "liquid precipitation", "snow precipitation", "snow water equivalent", "snow depth", "snow pack average temperature", "blowing snow sublimation", "snow melt", and "snow pack sublimation"

start.date

A start date supplied as a character string ("YYYY-MM-DD") or a datetime object

end.date

NULL if only one date is wanted, otherwise the end date of a time span formatted as start.date

region

Either "CONUS" or "North America" indicating if the results should be contained to the continental US or not

path

The output path to save the raster data

delete.archive

A logical indicating if the downloaded archives be deleted after the rasters have been extracted. Defaults to FALSE

force.download

A logical indicating if archive should be redownloaded if the file exists in path.

Value

A character vector of the extracted filenames

References

https://nsidc.org/data/g02158

Examples

## Not run: 
raster_files <-
  nsa_get_snodas(c("snow water equivalent", "snow melt"),
                 start.date = "2010-01-06",
                 end.date = "2010-01-08",
                 path = "snodas")

## End(Not run)

jpshanno/nohrsc documentation built on Feb. 20, 2023, 7:33 p.m.