Skip to contents

The download_merra2() function accesses and downloads various meteorological and atmospheric collections from NASA's Modern-Era Retrospective analysis for Research and Applications, Version 2 (MERRA-2) model.

Usage

download_merra2(
  collection = c("inst1_2d_asm_Nx", "inst1_2d_int_Nx", "inst1_2d_lfo_Nx",
    "inst3_3d_asm_Np", "inst3_3d_aer_Nv", "inst3_3d_asm_Nv", "inst3_3d_chm_Nv",
    "inst3_3d_gas_Nv", "inst3_2d_gas_Nx", "inst6_3d_ana_Np", "inst6_3d_ana_Nv",
    "statD_2d_slv_Nx", "tavg1_2d_adg_Nx", "tavg1_2d_aer_Nx", "tavg1_2d_chm_Nx",
    "tavg1_2d_csp_Nx", "tavg1_2d_flx_Nx", "tavg1_2d_int_Nx", "tavg1_2d_lfo_Nx",
    "tavg1_2d_lnd_Nx", "tavg1_2d_ocn_Nx", "tavg1_2d_rad_Nx", "tavg1_2d_slv_Nx",
    "tavg3_3d_mst_Ne", "tavg3_3d_trb_Ne", "tavg3_3d_nav_Ne", "tavg3_3d_cld_Np", 
    
    "tavg3_3d_mst_Np", "tavg3_3d_rad_Np", "tavg3_3d_tdt_Np", "tavg3_3d_trb_Np",
    "tavg3_3d_udt_Np", "tavg3_3d_odt_Np", "tavg3_3d_qdt_Np", "tavg3_3d_asm_Nv",
    "tavg3_3d_cld_Nv", "tavg3_3d_mst_Nv", "tavg3_3d_rad_Nv", "tavg3_2d_glc_Nx"),
  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). MERRA-2 data collection file name.

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.

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).

hash

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

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.

References

data_gmao_merra-inst1_2d_asm_Nxamadeus

data_gmao_merra-inst1_2d_int_Nxamadeus

data_gmao_merra-inst1_2d_lfo_Nxamadeus

data_gmao_merra-inst3_3d_asm_Npamadeus

data_gmao_merra-inst3_3d_aer_Nvamadeus

data_gmao_merra-inst3_3d_asm_Nvamadeus

data_gmao_merra-inst3_3d_chm_Nvamadeus

data_gmao_merra-inst3_3d_gas_Nvamadeus

data_gmao_merra-inst3_2d_gas_Nxamadeus

data_gmao_merra-inst6_3d_ana_Npamadeus

data_gmao_merra-inst6_3d_ana_Nvamadeus

data_gmao_merra-statD_2d_slv_Nx_mamadeus

data_gmao_merra-statD_2d_slv_Nx_damadeus

data_gmao_merra-tavg1_2d_adg_Nxamadeus

data_gmao_merra-tavg1_2d_aer_Nxamadeus

data_gmao_merra-tavg1_2d_chm_Nxamadeus

data_gmao_merra-tavg1_2d_csp_Nxamadeus

data_gmao_merra-tavg1_2d_flx_Nxamadeus

data_gmao_merra-tavg1_2d_int_Nxamadeus

pawson_merra-2_2020amadeus

data_gmao_merra-tavg1_2d_lnd_Nxamadeus

data_gmao_merra-tavg1_2d_ocn_Nxamadeus

data_gmao_merra-tavg1_2d_rad_Nxamadeus

data_gmao_merra-tavg1_2d_slv_Nxamadeus

data_gmao_merra-tavg3_3d_mst_Neamadeus

data_gmao_merra-tavg3_3d_trb_Neamadeus

data_gmao_merra-tavg3_3d_nav_Neamadeus

data_gmao_merra-tavg3_3d_cld_Npamadeus

data_gmao_merra-tavg3_3d_mst_Npamadeus

data_gmao_merra-tavg3_3d_rad_Npamadeus

data_gmao_merra-tavg3_3d_tdt_Npamadeus

data_gmao_merra-tavg3_3d_trb_Npamadeus

data_gmao_merra-tavg3_3d_udt_Npamadeus

data_gmao_merra-tavg3_3d_odt_Npamadeus

data_gmao_merra-tavg3_3d_qdt_Npamadeus

data_gmao_merra-tavg3_3d_asm_Nvamadeus

data_gmao_merra-tavg3_3d_cld_Nvamadeus

data_gmao_merra-tavg3_3d_mst_Nvamadeus

data_gmao_merra-tavg3_3d_rad_Nvamadeus

data_gmao_merra-tavg3_2d_glc_Nxamadeus

data_gmao_merra-instM_2d_asm_Nxamadeus

data_gmao_merra-instM_2d_int_Nxamadeus

data_gmao_merra-instM_2d_lfo_Nxamadeus

data_gmao_merra-instM_2d_gas_Nxamadeus

data_gmao_merra-instM_3d_asm_Npamadeus

data_gmao_merra-instM_3d_ana_Npamadeus

data_gmao_merra-tavgM_2d_adg_Nxamadeus

data_gmao_merra-tavgM_2d_aer_Nxamadeus

data_gmao_merra-tavgM_2d_chm_Nxamadeus

data_gmao_merra-tavgM_2d_csp_Nxamadeus

data_gmao_merra-tavgM_2d_flx_Nxamadeus

data_gmao_merra-tavgM_2d_int_Nxamadeus

data_gmao_merra-tavgM_2d_lfo_Nxamadeus

data_gmao_merra-tavgM_2d_lnd_Nxamadeus

data_gmao_merra-tavgM_2d_ocn_Nxamadeus

data_gmao_merra-tavgM_2d_rad_Nxamadeus

data_gmao_merra-tavgM_2d_slv_Nxamadeus

data_gmao_merra-tavgM_2d_glc_Nxamadeus

data_gmao_merra-tavgM_3d_cld_Npamadeus

data_gmao_merra-tavgM_3d_mst_Npamadeus

data_gmao_merra-tavgM_3d_rad_Npamadeus

data_gmao_merra-tavgM_3d_tdt_Npamadeus

data_gmao_merra-tavgM_3d_trb_Npamadeus

data_gmao_merra-tavgM_3d_udt_Npamadeus

data_gmao_merra-tavgM_3d_odt_Npamadeus

data_gmao_merra-tavgM_3d_qdt_Npamadeus

data_gmao_merra-const_2d_asm_Nxamadeus

data_gmao_merra-instU_2d_asm_Nxamadeus

data_gmao_merra-instU_2d_int_Nxamadeus

data_gmao_merra-instU_2d_lfo_Nxamadeus

data_gmao_merra-instU_2d_gas_Nxamadeus

data_gmao_merra-instU_3d_asm_Npamadeus

data_gmao_merra-instU_3d_ana_Npamadeus

data_gmao_merra-tavgU_2d_adg_Nxamadeus

data_gmao_merra-tavgU_2d_aer_Nxamadeus

data_gmao_merra-tavgU_2d_chm_Nxamadeus

data_gmao_merra-tavgU_2d_csp_Nxamadeus

data_gmao_merra-tavgU_2d_flx_Nxamadeus

data_gmao_merra-tavgU_2d_int_Nxamadeus

data_gmao_merra-tavgU_2d_lfo_Nxamadeus

data_gmao_merra-tavgU_2d_lnd_Nxamadeus

data_gmao_merra-tavgU_2d_ocn_Nxamadeus

data_gmao_merra-tavgU_2d_rad_Nxamadeus

data_gmao_merra-tavgU_2d_slv_Nxamadeus

data_gmao_merra-tavgU_2d_glc_Nxamadeus

data_gmao_merra-tavgU_3d_cld_Npamadeus

data_gmao_merra-tavgU_3d_mst_Npamadeus

data_gmao_merra-tavgU_3d_rad_Npamadeus

data_gmao_merra-tavgU_3d_tdt_Npamadeus

data_gmao_merra-tavgU_3d_trb_Npamadeus

data_gmao_merra-tavgU_3d_udt_Npamadeus

data_gmao_merra-tavgU_3d_odt_Npamadeus

data_gmao_merra-tavgU_3d_qdt_Npamadeus

Author

Mitchell Manware, Insang Song

Examples

if (FALSE) { # \dontrun{
download_merra2(
  collection = "inst1_2d_int_Nx",
  date = "2024-01-01",
  directory_to_save = tempdir(),
  acknowledgement = TRUE,
  download = FALSE, # NOTE: download skipped for examples,
  remove_command = TRUE,
)
} # }