Package 'rvad'

Title: Velocity Azimuth Display of Meteorological Radars
Description: This package implement an algorithm to process radial wind from Doppler radars obtainning the proper horizontal wind. The implementation is based on Browning and Wexler (1968) <doi: 10.1175/1520-0450(1968)007%3C0105:TDOKPO%3E2.0.CO;2> with the addition of several quality controls.
Authors: Paola Corrales [aut, cre], Elio Campitelli [ctb]
Maintainer: Paola Corrales <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-02 03:41:58 UTC
Source: https://github.com/paocorrales/rvad

Help Index


Radar beam propagation

Description

Calculates the propagation of the radar beam using the 4R/3 approximation.

Usage

beam_propagation(range, elevation, R = 6371000, Rp = 4 * R/3)

Arguments

range

vector with the distance to the radar en meters.

elevation

vector of the same length as range containing elevation angles in degrees.

R

radius of Earth in meters.

Rp

aproximation used.

Value

A data frame conteing 3 variables:

ht

height above the radar in meters.

rh

horizontal range in meters.

lea

local elevation angle in degrees.


One volume of radial velocity

Description

A single volume of radial velocity measured on January 14th 2016 between 06:00:05 and 06:04:31 at Paraná, Entre Ríos.

Usage

radial_wind

Format

A data.table with 2076960 rows and 4 variables:

range

distance to de radar in meters

vr

radial velocity in m/s

azimuth

azimuth angle in degrees

elevation

elevation angle in degrees

Source

https://radar.inta.gob.ar/


Velocity Azimuth Display

Description

Approximates the horizontal components of the wind from radial wind measured by Doppler radar using the Velocity Azimuth Display method from Browning and Wexler (1968).

Usage

vad_fit(radial_wind, azimuth, range, elevation, max_na = 0.2,
  max_consecutive_na = 30, r2_min = 0.8, outlier_threshold = Inf,
  azimuth_origin = 90, azimuth_direction = c("cw", "ccw"))

Arguments

radial_wind

a vector containing the radial wind.

azimuth

a vector of length = length(radial_wind) containing the azimuthal angle of every radial_wind observation in degrees clockwise from 12 o' clock.

range

a vector of length = length(radial_wind) containing the range (in meters) asociate to the observation.

elevation

a vector of length = length(radial_wind) with the elevation angle of every observation in degrees.

max_na

maximum percentage of missing data in a single ring (defined as the date in every range and elevation angle).

max_consecutive_na

maximun angular gap for a single ring.

r2_min

minimum r squared permitted in each fit.

outlier_threshold

threshhold for removing outliers in standard deviation units

azimuth_origin

angle that represents the zero azimuth in degrees counterclockwise from the x axis.

azimuth_direction

direction of the azimuth angle.

Details

The algorithm can work with sigle volume of data scanned in PPI (Plan Position Indicator) mode. The radial wind must not have aliasing. Removing the noise and other artifacts is desirable.

vad_fit() takes vectors of the same length with radial wind, azimuth angle, range and elevation angle and computes a sinusoidal fit for each ring of data (the observation for a particular range and elevation) before doing a simple quality control.

First, it checks if the amount of missing data (must be explicit on the data frame) is greater than max_na, by default a ring with more than 20 data is descarted. Second, rejects any ring with a gap greater than max_consecutive_na. Following Matejka y Srivastava (1991) the default is set as 30 degrees. After the fit, the algorithm rejects rings whose fit has a r2 less than r2_min. It is recommended to define this threshold after exploring the result with r2_min = 0.

Rings that fail any of the above-mentioned checks return NA.

Value

A data frame with class rvad_vad that has a plot() method and contains 7 variables:

height

height above the radar in meters.

u

zonal wind in m/s.

v

meridional wind in m/s.

range

distance to the radar in meters.

elevation

elevation angle in degrees.

r2

r squared of the fit.

rmse

root mean squeared error calculated as the standar deviation of the residuals.

See Also

vad_regrid() to sample the result into a regular grid.

Examples

VAD <- with(radial_wind, vad_fit(radial_wind, azimuth, range, elevation))
plot(VAD)

Wind profile from VAD

Description

Aggregates the result of vad_fit() using a modified loess smooth of degree 1 to get a wind profile on a regular (or other user-supplied) grid.

Usage

vad_regrid(vad, layer_width, resolution = layer_width, ht_out = NULL,
  min_n = 5)

Arguments

vad

an rvad_vad object returned by vad_fit().

layer_width

width of the layers in meters (see Details).

resolution

vertical resolution in meters.

ht_out

vector of heights where to evaluate. Overrides resolution.

min_n

minimum number of points in each layer.

Details

The method approximates wind components in a regular grid using weighted local regression at each point in the grid. Unlike stats::loess(), the layer_width is specified in physical units instead of in ammount of points and thus the value at each gridpoint represents the wind at a layer of thickness layer_width. This means that, while the resolution parameter determines how many points are used to define the wind profile, the effective resolution is controlled by layer_width. Increasing layer_width results in more precise estimates (because it's basedon more data points) but reduces the effective resolution.

Value

A data frame with class rvad_vad that has a plot() method and contains 7 variables:

height

height above the radar in meters.

u

zonal wind in m/s.

v

meridional wind in m/s.

u_std.error

standar error of u in m/s.

v_std.error

standar error of v in m/s.

Examples

VAD <- with(radial_wind, vad_fit(radial_wind, azimuth, range, elevation))

# Wind profile with effective resolution of 100
plot(vad_regrid(VAD, layer_width = 100, resolution = 100))
# The same effective resoution, but sampled at 50m
plot(vad_regrid(VAD, layer_width = 100, resolution = 50))

# Using too thin layers can cause problems and too many
# mising values
plot(fine_resolution <- vad_regrid(VAD, layer_width = 10))
mean(is.na(fine_resolution$u))