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

View source: R/nexrad_odim.R

nexrad_to_odimR 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

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


# 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")

if (requireNamespace("vol2birdR", quietly = TRUE)) {
nexrad_to_odim(path, new_path)

# verify that we have generated a polar volume in ODIM HDF5 format
get_odim_object_type(new_path)

# clean up
file.remove(new_path)
}
file.remove(path)


adokter/birdRad documentation built on Nov. 5, 2024, 10:27 p.m.