composite_ppi: Create a composite of multiple plan position indicators...

Description Usage Arguments Details Value Examples

View source: R/composite_ppi.R

Description

Combines multiple plan position indicators (ppi) into a single ppi. Can be used to make a composite of ppi's from multiple radars.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
composite_ppi(
  x,
  param = "DBZH",
  nx = 100,
  ny = 100,
  xlim,
  ylim,
  res,
  crs,
  raster = NA,
  method = "max",
  idp = 2,
  idw_max_distance = NA
)

Arguments

x

A list of ppi objects.

param

Scan parameter to composite.

nx

number of raster pixels in the x (longitude) dimension

ny

number of raster pixels in the y (latitude) dimension

xlim

x (longitude) range

ylim

y (latitude) range

res

numeric vector of length 1 or 2 to set the resolution of the raster (see res). If this argument is used, arguments nx and ny are ignored. Unit is identical to xlim and ylim.

crs

character or object of class CRS. PROJ.4 type description of a Coordinate Reference System (map projection). When 'NA' (default), an azimuthal equidistant projection with origin at the radar location is used. To use a WSG84 (lat,lon) projection, use crs="+proj=longlat +datum=WGS84"

raster

(optional) RasterLayer with a CRS. When specified this raster topology is used for the output, and nx, ny, res arguments are ignored.

method

string. Compositing method, one of "mean", "min", "max" or "idw"

idp

numeric. inverse distance weighting power

idw_max_distance

numeric. Maximum distance from the radar to consider in inverse distance weighting. Measuruments beyond this distance will have a weighting factor of zero.

Details

This function composites multiple ppi objects into a ppi object that combines all data.

Either multiple ppi's of different scan elevation of the same radar may be combined, or ppi's of different radars can be composited.

Argument method determines how values of different ppi's at the same geographic location are combined.

"mean"

Compute the average value

"max"

Compute the maximum value. If ppi's are of the same radar and the same polar volume, this computes a max product, showing the maximum detected signal at that geographic location.

"min"

Compute the minimum value

"idw"

This option is useful primarily when compositing ppi's of multiple radars. Performs an inverse distance weighting, where values are weighted according to 1/(distance from the radar)^idp

The coordinates system of the returned ppi is a WGS84 (lat,lon) datum.

This function is a prototype and under active development

Value

A ppi.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# locate example volume file:
pvolfile <- system.file("extdata", "volume.h5", package = "bioRad")

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

# calculate a ppi for each elevation scan
my_ppis <- lapply(example_pvol$scans, project_as_ppi)

# overlay the ppi's, calculating the maximum value observed
# across the available scans at each geographic location
my_composite <- composite_ppi(my_ppis, method="max")

## Not run: 
# download basemap
bm <- download_basemap(my_composite)

# plot the calculated max product on the basemap
map(my_composite, bm)

## End(Not run)

bioRad documentation built on July 1, 2020, 10:18 p.m.