Total-Totals instability index (Celsius) from parameters (1D arrays) Ps (pressure, Pa) Ts (temperature, Kelvin) and ws (mixing ratio, kg/kg) obtained from a vertical sounding.
TTindex(Ps, Ts, ws, doLog = 0)
A vector with pressure values in Pa.
A vector with temperature values in Kelvin.
A vector with mixing ratio values in kg/kg.
Use logarithmic vertical interpolation between sounding levels. A default value is 0.
This function returns the Total-Totals instability index (Celsius).
If the needed levels (850 hPa or 500 hPa) are not exactly found in the input sounding, logarithmic/linear vertical interpolation is run depending on the value of doLog (TRUE or FALSE).
If the sounding does not enclose the needed levels and the interpolation fails, the function returns -99999999.
# NOT RUN {
data(RadiosondeDavenport)
aPs<-RadiosondeDavenport[,1]*100
aTs<-C2K(RadiosondeDavenport[,3])
aws<-RadiosondeDavenport[,6]/1000
aTT<-TTindex(aPs,aTs,aws,0)
# }
Run the code above in your browser using DataLab