knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
The goal of rvad is to approximate the horizontal components of the wind from radial wind measured by Doppler radar using the Velocity Azimuth Display method from Browning and Wexler (1968).
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("paocorrales/rvad")
rvad estimates the horizontal components of wind from radial velocity measured with Doppler radar. It takes data on a tidy format --one value of radial velocity for each azimuth, elevation angle and distance to the radar (range):
library(rvad) str(radial_wind) # sample dataset
This is how the data looks like for one particular elevation angle.
library(ggplot2) one_elevation <- subset(radial_wind, elevation == unique(elevation)[3] & !is.na(radial_wind)) ggplot(one_elevation, aes(azimuth, range)) + geom_point(aes(color = radial_wind, size = range^2)) + scale_radius(range = c(0, 0.05), guide = "none") + scale_color_gradient2(low = "blue", high = "red") + scale_y_continuous(limits = c(0, 100000)) + coord_polar()
Red means that the wind is moving away from the radar and blue is wind moving towards the radar. So this plot shows that, overall, the wind is comming from the northeast.
vad_fit()
does some quality control and then fits a sinusoidal model to the data and returns zonal and meridional wind for each elevation angle, and range. It also approximates the propagation of the radar beam to get the height of each observation.
VAD <- with(radial_wind, vad_fit(radial_wind, azimuth, range, elevation)) str(VAD)
This function has a plot method.
plot(VAD)
The optimal quality control parameters (minimum r^2, maximum missing values, etc...) can be case-dependant so it's advisable to test different values.
vad_regrid()
aggregates the result into a single wind profile defined in a regular grid using local regression.
wind_profile <- vad_regrid(VAD, layer_width = 100) plot(wind_profile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.