Calculates a new scan parameter from a combination of existing scan parameters. Useful for calculating quantities that are defined in terms of other basic radar moments, like linear reflectivity eta, depolarization ratio (Kilambi et al. 2018), or for applying clutter corrections (CCORH) to uncorrected reflectivity moments (TH), as in TH+CCORH

calculate_param(x, ...)

# S3 method for pvol
calculate_param(x, ...)

# S3 method for ppi
calculate_param(x, ...)

# S3 method for scan
calculate_param(x, ...)

Arguments

x

an object of class pvol or class scan

...

an expression defining the new scan parameter in terms of existing scan parameters

Value

an object of the same class as x, either class pvol or class scan

Methods (by class)

  • calculate_param(pvol): Calculate a new scan parameter for all scans in a polar volume.

  • calculate_param(ppi): Calculate a new parameter for a PPI.

  • calculate_param(scan): Calculate a new scan parameter for a scan

References

  • Kilambi, A., Fabry, F., and Meunier, V., 2018. A simple and effective method for separating meteorological from nonmeteorological targets using dual-polarization data. Journal of Atmospheric and Oceanic Technology, 35, 1415–1424. doi:10.1175/JTECH-D-17-0175.1

Examples

# locate example volume file:
pvolfile <- system.file("extdata", "volume.h5", package = "bioRad")

# load the file:
example_pvol <- read_pvolfile(pvolfile)
data(example_scan)

# calculate linear reflectivity ETA from reflectivity factor DBZH:
radar_wavelength <- example_pvol$attributes$how$wavelength
# example_pvol <- calculate_param(example_pvol,ETA=dbz_to_eta(DBZH,radar_wavelength))

# add depolarization ratio (DR) as a scan parameter (see Kilambi 2018):
example_pvol <- calculate_param(example_pvol, DR = 10 * log10((ZDR + 1 - 2 * ZDR^0.5 * RHOHV) /
  (ZDR + 1 + 2 * ZDR^0.5 * RHOHV)))

# calculate_param operates on both pvol and scan objects:
calculate_param(example_scan, DR = 10 * log10((ZDR + 1 - 2 * ZDR^0.5 * RHOHV) /
  (ZDR + 1 + 2 * ZDR^0.5 * RHOHV)))
#>                   Polar scan (class scan)
#> 
#>      parameters:  DBZH VRADH RHOHV ZDR PHIDP DR 
#> elevation angle:  0.5 deg
#>            dims:  480 bins x 360 rays

# it also works for ppis
ppi <- project_as_ppi(example_scan)
#> Warning: CRS object has comment, which is lost in output; in tests, see
#> https://cran.r-project.org/web/packages/sp/vignettes/CRS_warnings.html
calculate_param(ppi, exp(DBZH))
#>                Plan position indicator (class ppi)
#> 
#>   parameters:  DBZH VRADH RHOHV ZDR PHIDP exp(DBZH) 
#>         dims:  201 x 200 pixels
#>