vad_regrid: Wind profile from VAD

Description Usage Arguments Details Value Examples

View source: R/regrid.R

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

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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))

paocorrales/rvad documentation built on July 22, 2020, 3:24 a.m.