Skip to contents

KO Index

Usage

KO_Index(
  ta500,
  hus500,
  ta700,
  hus700,
  ta850,
  hus850,
  ta1000,
  hus1000,
  nthreads = 1
)

Arguments

ta500

air temperature [lon, lat, time] at 500 hPa (K).

hus500

specific humidity [lon, lat, time] at 500 hPa (kg/kg).

ta700

air temperature [lon, lat, time] at 700 hPa (K).

hus700

specific humidity [lon, lat, time] at 700 hPa (kg/kg).

ta850

air temperature [lon, lat, time] at 850 hPa (K).

hus850

specific humidity [lon, lat, time] at 850 hPa (kg/kg).

ta1000

air temperature [lon, lat, time] at 1000 hPa (K).

hus1000

specific humidity [lon, lat, time] at 1000 hPa (kg/kg).

nthreads

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

Value

the computed KO Index (K).

References

Andersson, T., Andersson, M., Jacobsson, C., Nilsson, S., 1989. Thermodynamic indices for forecasting thunder- storms in southern Sweden. Meteorol. Mag. 116, 141–146

Examples

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

l500 <- which(pa == 500)
l700 <- which(pa == 700)
l850 <- which(pa == 850)
l1000 <- which(pa == 1000)
res <- KO_Index(
  ta[, , l500, ], hus[, , l500, ],
  ta[, , l700, ], hus[, , l700, ],
  ta[, , l850, ], hus[, , l850, ],
  ta[, , l1000, ], hus[, , l1000, ]
)