Usage
S_Index(ta500, ta700, hus700, ta850, hus850, nthreads = 1)
Arguments
- ta500
air temperature [lon, lat, time] at 500 hPa (K).
- 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).
- nthreads
an integer specifying the number of threads to use for
computation (OpenMP). Default is 1.
Value
the computed S Index (K).
References
Reymann, M., Piasecki, J., Hosein, F., Larabee, S., Williams, G., Jimenez, M.,
Chapdelaine, D., 1998. Mete- orological techniques. Tech. Note, AFWA, U.S.
Air Force. 242 pp. [Air Force Weather Agency, AFWA, Offutt AFB, NE 68113].
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)
res <- S_Index(
ta[, , l500, ],
ta[, , l700, ], hus[, , l700, ],
ta[, , l850, ], hus[, , l850, ],
)