# 4 Vertical profiles

In this section you will learn to compute, interpret and analyze vertical profiles (vp’s). A vp consists of the (bird) density, speed and directions at different altitudes at the location of a single radar. It is typically calculated for all data within a cylinder of 35 km radius around the radar, i.e. only containing data at relatively short distances, where the radar beam is still sufficiently narrow to resolve altitude information.

Section 6 has examples that show how to process polar volume data into vertical profiles. To save time, we will start below with a list of pre-processed vertical profiles for the Brownsville radar in Texas (KBRO).

# Usually we would load processed vertical profiles (vp files) by:
# my_vplist contains after running the command a list of vertical profile (vp) objects
# To save time, we load these data directly from file
# print the length of the vplist object. It should contain 95 profiles
length(my_vplist)

## 4.2 Inspecting single vertical profiles

Now that you have loaded a list of vertical profiles, we can start exploring them. We will start with plotting and inspecting single vertical profiles, i.e. a single profile from the list of vp objects you have just loaded.

# let's extract a profile from the list, in this example the 41st profile:
my_vp <- my_vplist[[41]]
# print some info for this profile to the console
my_vp
# test whether this profile was collected at day time:
check_night(my_vp)
# plot the vertical profile, in terms of reflectivity factor
plot(my_vp, quantity = "dbz")
# plot the vertical profile, in terms of (linear) reflectivity
plot(my_vp, quantity = "eta")

eta and dbz are closely related, the main difference is that reflectivity factors are logarithmic, and reflectivities linear. You can convert one into the other using eta_to_dbz() and dbz_to_eta() functions, which follows this simple formula:

eta = (radar-wavelength dependent constant) * 10^(dbz/10)

The reflectivity factor dBZ is the quantity used by most meteorologist. It has the useful property that at different radar wavelengths (e.g. S-band versus C-band) the same amount of precipitation shows up at similar reflectivity factors. The same holds for insects, as well as any other target that is much smaller than the radar wavelength (S-band = 10 cm, C-band = 5 cm), the so-called Rayleigh-scattering limit.

In the case of birds we are outside the Rayleigh limit, because birds are of similar size as the radar wavelength. In this limit reflectivity eta is more similar between S-band and C-band. eta is also more directly related to the density of birds, since eta can be expressed as (bird density) x (radar cross section per bird). For these two reasons, for weather radar ornithologists reflectivity eta is the more conventional unit.

# let's plot the vertical profile, in terms of bird density
plot(my_vp, quantity = "dens")
# print the currently assumed radar cross section (RCS) per bird:
rcs(my_vp)

Exercise 5: If you change your assumption on the bird’s radar cross section in the previous example, and assume the RCS is 10 times as large, what will be the effect on the bird density profile?

The assumed radar cross section can be changed as follows:

# let's change the RCS to 110 cm^2
rcs(my_vp) <- 110

Exercise 6: Verify your answers on the previous two questions, by re-plotting the vertical profiles for the bird density quantity.

## 4.3 Plotting vertical profile time series

We will now examine multiple vertical profiles at once that are ordered into a time series, e.g. the vertical profiles obtained from a single radar over a full day.

# convert the list of vertical profiles into a time series:
my_vpts <- bind_into_vpts(my_vplist)
# time series objects can be subsetted, just as you may be used to with vectors
# here we subset the first 50 timesteps:
my_vpts[1:50]
# here we extract a single timestep, which gives you back a vertical profile class object:
my_vpts[100]
# to plot the full time series:
plot(my_vpts)
# check the help file for the plotting function of profile time series
# Because profile timeseries are of class 'vpts', it's associated plotting function
# is called plot.vpts:
?plot.vpts

Let’s make a plot for a subselection of the time series:

# filter our vpts for night time
my_vpts_night <- filter_vpts(my_vpts, night=TRUE)
# plot this smaller time series:
plot(my_vpts_night)

Exercise 7: Interpret the wind barbs in the profile time series figure: what is the approximate speed and direction at 1500 meter at 6 UTC? In the speed barbs, each half flag represents 2.5 m/s, each full flag 5 m/s, [each pennant (triangle) 25 m/s, not occurring in this case].

Exercise 8: Extract the vertical profile at 6 UTC from the time series and plot the vertical profile of ground speed (quantity ff). Hint: use the nearest argument of function filter_vpts() to extract the 6 UTC profile. Check whether your answer to the previous question was approximately correct.

## 4.4 Vertical and time integration of profiles

Often you will want to sum all the migrants across altitude, for example if you are interested in a single index of how many birds are migrating at a certain instant. There are at least two ways in which you can do that:

• by calculating the vertically integrated bird density (VID), which is surface density as opposed to a volume densities you have been plotting in the previous exercises: this number gives you how many migrants are aloft per square kilometer earth’s surface (unit individuals/km$$^{2}$$), obtained by a vertical integration of the volume densities (unit individuals/km$$^{3}$$).

$\textrm{VID}=\sum_{\textrm{height layers } i}{(\textrm{bird volume density})_i \times (\textrm{height layer thickness})_i}$

• Note that the VID quantity doesn’t depend on the speed of the migrants. A common measure that reflects both the density and speed of the migration is migration traffic rate (MTR). This is flux measure that gives you how many migrants are passing the radar station per unit of time and per unit of distance perpendicular to the migratory direction (unit individuals/km/hour).

$\textrm{MTR}=\sum_{\textrm{height layers } i}{(\textrm{bird volume density})_i \times (\textrm{bird speed})_i \times (\textrm{height layer thickness})_i}$

We will be using bioRad’s integrate_profile() function to calculate these quantities:

# Let's continue with the vpts object created in the previous example.
# The vertically integrated quantities are calculated as follows:
my_vpi <- integrate_profile(my_vpts)
# The my_vpi object you created is a vpi class object, which is an acronym for "vertical profile integrated". It has its own plot method, which by default plots migration traffic rate (MTR):
plot(my_vpi)
# you can also plot vertically integrated densities (VID):
plot(my_vpi, quantity = "vid")
# the gray and white shading indicates day and night, which is calculated
# from the date and the radar position. You can also turn this off:
# plot the cumulative number of birds passing the radar, i.e. migration traffic (mt):
plot(my_vpi, quantity = "mt")
# execute ?plot.vpi to open the help page listing all the options.
?plot.vpi

The following three questions only require pen and paper. Assume a migration event in which the volume density of birds is as follows:

• Density from 0-1 km above ground is 200 birds per cubic kilometer
• Density from 1-1.5 km is 100 birds per cubic kilometer.
• Above 1.5 km meter there are no birds.

Exercise 9: What is in this case the vertically integrated density (VID) of birds? Give your answer in units birds/km$$^2$$.

Exercise 10: Let’s assume that (for the same migration event) birds in the lower layer fly 50 km/hour, and in the upper layer 100 km/hour. How many birds pass a 1 km transect perpendicular to the birds’ direction of movement per hour? Give your answer as a migration traffic rate in units birds/km/hour.

Exercise 11: Let’s assume migration continued for exactly three hours after sunset, and then halted abruptly. How many birds have passed a 10 km transect perpendicular to the direction of movement in this night? Give your answer in terms of migration traffic (mt) in units birds/km.

Both MTR, VID and MT depend on the assumed radar cross section (RCS) per bird. If you are unwilling/unable to specify RCS, alternatively you can use two closely related quantities that make no assumptions RCS:

# instead of vertically integrated density (VID), you can use vertically integrated reflectivity (VIR):
plot(my_vpi, quantity = "vir")
# instead of migration traffic rate (MTR), you can use the reflectivity traffic rate (RTR):
plot(my_vpi, quantity = "rtr")
# instead of migration traffic (MT), you can use the reflectivity traffic (RT):
plot(my_vpi, quantity = "rt")

VIR gives you the total cross-sectional area of air-borne targets per square kilometer of ground surface, whereas RTR gives you the total cross-sectional area of targets flying across a one kilometer line perpendicular to the migratory flow per hour.

## 4.5 Manipulating vertical profile time series data

You may sometimes want to manipulate vpts data using other well-known data manipulations tools, like the R package dplyr.

library(dplyr)
# convert vpts object to a data.frame:
example_vpts %>%
as_tibble() -> my_df
my_df

# convert data.frame back to vpts object:
my_df %>% as.vpts()

# as.vpts and as.data.frame (or as_tibble) work as each others inverse:
as.vpts(as.data.frame(example_vpts))

This allows for tidyverse style data manipulations. For example, let’s filter out data by height and date using package dplyr and plot it, using a single command:

library(dplyr)
example_vpts %>%
# convert to data.frame
as.data.frame() %>%
# filter out heights layers above 1500 meter
filter(height <= 1500) %>%
# filter out data from Sep 4 - Sep 9
filter(datetime < as.POSIXct("2016-09-04",tz="UTC") |
datetime > as.POSIXct("2016-09-07",tz="UTC")) %>%
# convert back to vpts object
as.vpts() %>%
# regularize data on a regular time grid
# (so we can visualize the data gap we created):
regularize_vpts() %>%
# plot the vertical profile time series
plot

Or let us add a data column high_speed that indicates scatterers moving faster than 15 m/s, and plot that new data column in a profile plot:

library(dplyr)
example_vpts %>%
# convert vpts object to a data.frame:
as.data.frame() %>%
# add a data column that is TRUE (1) when the ground speed ff > 15 m/s,
# and FALSE (0) if it is slower or equal to 15 m/s:
mutate(high_speed = ff > 15) %>%
# convert back to vpts object:
as.vpts() %>%
# plot the new quantity:
plot(quantity="high_speed")

Note that compatibility with the tidyverse remains under development, and critical data columns of vpts objects (like height) should not be removed.

## 4.6 Inspecting precipitation signals in profiles

Precipitation is known to have a major influence on the timing and intensity of migration, therefore it is a useful skill to be able to inspect profiles for presence of precipitation.

Also, although automated bird quantification algorithms become more and more reliable, distinguishing precipitation from birds remains challenging for algorithms in specific cases. It is therefore important to have the skills to inspect suspicious profiles. That may help you to identify potential errors of the automated methods, and prevent your from overinterpreting the data.

An easy way of doing that is plotting the vertical profile of total reflectivity (quantity DBZH), which includes everything: birds, insects and precipitation. Precipitation often has higher reflectivities than birds, and also extends to much higher altitudes.

# load a time series for the KBGM radar in Binghamton, NY
plot(my_vpts, quantity = "dens")
Exercise 12: Compare the above plot for bird density (quantity dens) with a profile plot for total reflectivity (quantity DBZH, showing birds and precipitation combined). Compare the two plots to visually identify periods and altitude layers with precipitation.