Detecting Wind Shear Using Radial Velocity of Doppler Radar

Derive the formula, choosing the best finite difference and the source code

Muhammad Ryan
Towards Data Science

--

Photo by Kelvin Yan on Unsplash

Wind Shear is a wind that suddenly changes in speed and/or direction. I already discussed a lot about wind shear in my previous post. One of the many tools that can detect wind shear is Doppler Radar. Doppler Radar utilizes the doppler effect to calculate the wind around it. But what we will get is just a radial velocity (scalar, move away will resulting to < 0 value and the other hand for the wind that come closer will have a > 0 speed), not wind as a cartesian vector (north-south, east-west, and up-down component). The usual wind shear formula is a vector operation. So how we detect or calculate wind shear using radar? We will discuss it here. We will use 1 of many wind shear radar products, HSHEAR.

HSHEAR Product

It’s sad we can't get the actual vector of wind but we can still monitor the change of wind to detect the wind shear through radial velocity. The essence of wind shear is the change, remember. When we say “the change of wind”, we mean the change in spatial.

In mathematics, how to express changing in spatial? It is

Or the gradient of “the state” (in every dimension). The dimension we talk about in Horizontal Shear (HSHEAR) product is of course horizontal dimension (north-south and east-west) and “the state” is the radial velocity (Vr), so the equation become

Now we get the changing in every dimension. What we want to know is the magnitude of the change or how much the change of the wind is. It’s simple, it just the length of the vector.

Unit vectors can be canceled out because we squared it. So the simpler form is

And thus we get the formula of HSHEAR, 1 of many radar products for wind shear.

The Numerical Solution

Basically, computers cant solve even the most basic differential equation, we all know it. So we must transform our HSHEAR formula to the numerical form. The simplest method is using finite-difference. There are 3 kinds of finite difference:

Forward Difference

Backward Difference

Central Difference

Where i is the index data of f (state) in the dimension and h is the resolution of the dimension. Imagine we havef in the form of a grid.

What we will choose? Of course the formula with the least error. And it’s the central difference! Why? So basically, you can derive all of this finite-difference from the Taylor series and the one with the least truncation error is the central difference. Proof? Just try it yourself as a practice. I will not elaborate on it here because there will be a quite lot of equations pop up.

Let’s substitute all differential equation in our previous HSHEAR formula with the central difference.

Here i and j are indexes in x and y dimension respectively. hx and hy is the resolution ofx (east-west) and y (north-south) dimension.

The Source Code

Actually, you can skip all of the explanations and just read this section if you don’t care how this works. Yup, the most important part, show me the code! Based on our numerical solution, here the code

for sample data, you can download it here.

The result of the script above will be like this.

Here at the plots above generally there is no wind shear occurring. And you can see the plot begin from nothing gradually become a point and then become looks like a donut. This is the effect of the radar scans scheme. This is what we call “a cone of silence” in radar data. I think (If I am in the mood), we will discuss how weather radar works. For now, that’s enough.

All the code and stuff about radar include our previous code and data can be accessed on my GitHub repository here. See ya!

--

--