Skip to contents

This function calculates the Ertel potential vorticity (PV) on pressure levels from a given 4D wind, temperature, and pressure field [lon, lat, lev, time].

Usage

Ertel_potential_vorticity(ta, ua, va, lon, lat, pa_pl, nthreads = 1)

Arguments

ta

air temperature [lon, lat, lev, time] (K).

ua

zonal wind component [lon, lat, lev, time] (m/s).

va

meridional wind component [lon, lat, lev, time] (m/s).

lon

longitude coordinates [lon] (degrees east).

lat

latitude coordinates [lat] (degrees north).

pa_pl

pressure levels [lev] (hPa).

nthreads

an integer specifying the number of threads to use for computation (OpenMP). Default is 1.

Value

the computed potential vorticity [lon, lat, lev, time] (m^2 s^-1 K kg^-1).

Details

The derivatives are approximated using finite differences. Grid spacing is computed using Haversine formula.

References

Bluestein: Synoptic-Dynamic Meteorology in Midlatitudes pg 264 Eq 4.5.93

Examples

data("ERA5_pl")
ta <- ERA5_pl$ta
ua <- ERA5_pl$ua
va <- ERA5_pl$va
lon <- ERA5_pl$lon
lat <- ERA5_pl$lat
pa_pl <- ERA5_pl$plev / 100

EPV <- Ertel_potential_vorticity(ta, ua, va, lon, lat, pa_pl)