Learn R Programming

amadeus (version 1.2.3)

download_narr: Download meteorological data

Description

The download_narr function accesses and downloads daily meteorological data from NOAA's North American Regional Reanalysis (NARR) model.

Usage

download_narr(
  variables = NULL,
  year = c(2018, 2022),
  directory_to_save = NULL,
  acknowledgement = FALSE,
  download = FALSE,
  remove_command = FALSE,
  hash = FALSE
)

Value

  • For hash = FALSE, NULL

  • For hash = TRUE, an rlang::hash_file character.

  • netCDF (.nc) files will be stored in directory_to_save.

Arguments

variables

character. Variable(s) name acronym. See List of Variables in NARR Files for variable names and acronym codes.

year

character(1 or 2). length of 4. Year or start/end years for downloading data.

directory_to_save

character(1). Directory(s) to save downloaded data files.

acknowledgement

logical(1). By setting TRUE the user acknowledges that the data downloaded using this function may be very large and use lots of machine storage and memory.

download

logical(1). FALSE will generate a *.txt file containing all download commands. By setting TRUE the function will download all of the requested data files.

remove_command

logical(1). Remove (TRUE) or keep (FALSE) the text file containing download commands.

hash

logical(1). By setting TRUE the function will return an rlang::hash_file() hash character corresponding to the downloaded files. Default is FALSE.

Author

Mitchell Manware, Insang Song

References

mesinger_north_2006amadeus

Examples

Run this code
if (FALSE) {
download_narr(
  variables = c("weasd", "omega"),
  year = 2023,
  directory_to_save = tempdir(),
  acknowledgement = TRUE,
  download = FALSE, # NOTE: download skipped for examples,
  remove_command = TRUE
)
}

Run the code above in your browser using DataLab