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

nexrad_to_odim(pvolfile_nexrad, pvolfile_odim, verbose = FALSE)

Arguments

pvolfile_nexrad

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. Or a single pvol object. 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) a format supported by the RSL library or 3) Vaisala IRIS (IRIS RAW) format.

pvolfile_odim

Filename for the polar volume in ODIM HDF5 format to be generated.

verbose

Logical. When TRUE, vol2bird stdout is piped to the R console.

Value

TRUE on success

Examples

# \donttest{
# download a NEXRAD file, save as KBGM_example
path = file.path(tempdir(), "KBGM_example")

download.file(paste0("https://noaa-nexrad-level2.s3.amazonaws.com/",
  "2019/10/01/KBGM/KBGM20191001_000542_V06"), path, method="libcurl", mode="wb")

# convert to ODIM format

new_path = file.path(tempdir(), "KBGM_example.h5")

nexrad_to_odim(path, new_path)
#> Filename = /tmp/Rtmp9Bjwje/KBGM_example, callid = KBGM
#> Reading RSL polar volume with nominal time 20191001-000542, source: RAD:KBGM,PLC:BINGHAMTON,state:NY,radar_name:KBGM

# verify that we have generated a polar volume in ODIM HDF5 format
get_odim_object_type(new_path)
#> [1] "PVOL"

# clean up
file.remove(path, new_path)
#> [1] TRUE TRUE
# }