Skip to contents

Potential temperature

Usage

theta(ta, pa, nthreads = 1)

Arguments

ta

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

pa

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

nthreads

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

Value

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

Examples

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