rsl2odim: Convert a NEXRAD polar volume file to an ODIM polar volume...

View source: R/rsl2odim.R

rsl2odimR Documentation

Convert a NEXRAD polar volume file to an ODIM polar volume file

Description

Convert a NEXRAD polar volume file to an ODIM polar volume file

Usage

rsl2odim(
  file,
  config,
  pvolfile_out = "",
  verbose = TRUE,
  update_config = FALSE
)

Arguments

file

Character (vector). Either a path to a single radar polar volume (pvol) file containing multiple scans/sweeps, or multiple paths to scan files containing a single scan/sweep. The file data format should be either 1) ODIM format, which is the implementation of the OPERA data information model in the HDF5 format, 2) NEXRAD format supported by the 'RSL' library or 3) Vaisala IRIS (IRIS RAW) format. IRIS format is not available on CRAN, see vol2birdR development version on Github.

config

optional configuration object of class Rcpp_Vol2BirdConfig, typically output from vol2bird_config

pvolfile_out

Character. File name. When provided, writes a polar volume (pvol) file in the ODIM HDF5 format to disk. Useful for converting 'RSL' formats to ODIM, and for adding 'MistNet' segmentation output.

verbose

logical. When TRUE print profile output to console.

update_config

logical. When TRUE processing options that are determined based on input file characteristics are returned and updated in the object specified by the config argument. Do not set to TRUE when vol2bird() is used in loops like lapply() or in parallel processes.

Value

No value returned, creates a file specified by pvolfile_out argument.

See Also

  • vol2bird_config()

Examples


# define filenames
nexrad_file <- paste0(tempdir(),"/KBGM20221001_000243_V06")
odim_file <- paste0(tempdir(),"/KBGM20221001_000243_V06.h5")
# download NEXRAD file:
download.file("https://noaa-nexrad-level2.s3.amazonaws.com/2022/10/01/KBGM/KBGM20221001_000243_V06",
destfile = nexrad_file, mode="wb")
# convert NEXRAD file to ODIM hdf5 format:
rsl2odim(nexrad_file, pvolfile_out = odim_file)
# clean up
file.remove(nexrad_file)
file.remove(odim_file)


vol2birdR documentation built on Sept. 28, 2024, 1:07 a.m.