Skip to contents

Equivalent potential temperature

Usage

theta_e(hus, pa, ta, nthreads = 1)

Arguments

hus

specific humidity [lon, lat, lev, time] (kg/kg).

pa

air pressure [lon, lat, lev, time] (hPa).

ta

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

nthreads

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

Value

the computed equivalent potential temperature [lon, lat, lev, time](K).

Details

The function calculate equivalent temperature for water saturation pseudo-adiabatic process after Bolton (1980) Eq. 43 and Bryan (2008) Eq.6.

Note

air pressure variable should match the specific humidity correctly. If hus is a three dimensional array on pressure levels [lon, lat, lev, time], pa values should the same on each [lon, lat,,time] slice. See convert_plev_to_array.

In case you are using model levels, estimate pressure array beforehand.

Examples


data("ERA5_pl")
hus <- ERA5_pl$hus
hus_d <- dim(hus)
ta <- ERA5_pl$ta
pa <- ERA5_pl$plev / 100 # convert to hPa
pa <- convert_plev_to_array(pa, hus_d)