download_geos: Download atmospheric composition data

View source: R/download.R

download_geosR Documentation

Download atmospheric composition data

Description

The download_geos() function accesses and downloads various atmospheric composition collections from NASA's Global Earth Observing System (GEOS) compositional forecast model.

Usage

download_geos(
  collection = c("aqc_tavg_1hr_g1440x721_v1", "chm_tavg_1hr_g1440x721_v1",
    "met_tavg_1hr_g1440x721_x1", "xgc_tavg_1hr_g1440x721_x1",
    "chm_inst_1hr_g1440x721_p23", "met_inst_1hr_g1440x721_p23"),
  nasa_earth_data_token = NULL,
  date = c("2018-01-01", "2018-01-01"),
  directory_to_save = NULL,
  acknowledgement = FALSE,
  download = FALSE,
  remove_command = FALSE,
  hash = FALSE
)

Arguments

collection

character(1). GEOS-CF data collection file name.

nasa_earth_data_token

character(1). Token for downloading data from NASA. Should be set before trying running the function.

date

character(1 or 2). length of 10. Date or start/end dates for downloading data. Format "YYYY-MM-DD" (ex. January 1, 2018 = "2018-01-01").

directory_to_save

character(1). Directory to save data. Sub-directories will be created within directory_to_save for each GEOS-CF collection.

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.

Value

  • For hash = FALSE, NULL

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

  • netCDF (.nc4) files will be stored in a collection-specific folder within directory_to_save.

Note

Due to NASA data access policies, the download scripts generated by this function require a valid NASA Earthdata token for authentication and include options to slow down the download speed to avoid server overload and potential blocking of access.

Author(s)

Mitchell Manware, Insang Song

References

\insertRef

keller_description_2021amadeus

Examples

## Not run: 
download_geos(
  collection = "aqc_tavg_1hr_g1440x721_v1",
  date = "2024-01-01",
  directory_to_save = tempdir(),
  acknowledgement = TRUE,
  download = FALSE, # NOTE: download skipped for examples,
  remove_command = TRUE
)

## End(Not run)

amadeus documentation built on Jan. 27, 2026, 1:07 a.m.