0
$\begingroup$

I have taken a thunderstorm case where I need to calculate indices but I am not getting any code related stability indices in Python language, the code is available in GRADS, NCL for me it's difficult to understand. I used MetPy code but they are not calculated LI, KI, and other indices...Thanks in advance Below code is wrong that I know I used the formula but tell me the correct way.

nc1=Dataset('pl_120415.nc')
lat1=np.array(nc1.variables['latitude'])
lon1= np.array(nc1.variables['longitude'])
lev= np.array(nc1.variables['level'])
time= nc1.variables['time']
r= nc1.variables['r'][:,:,25:28,20:25]
t= nc1.variables['t']
u= nc1.variables['u'][:,:,25:28,20:25]
v= nc1.variables['v'][:]
w= nc1.variables['w']

t_500= nc1.variables['t'][:,21,:,:] ### domain Air Temperture  at 500 Pressure_level
tp_500= nc1.variables['t'][:,21,25:28,20:25] ## at specfific location temperature (parcel temperture)

li=np.subtract(t_500,tp_500,dtype=np.float32)

print("LI",li)
$\endgroup$
  • $\begingroup$ Hi, welcome to Stackexchange. Some may argue that this is off-topic here. I'd say it is on topic, but you'll need to be a lot clearer in explaining exactly what you're trying to do, and what you don't understand. "I need to calculate indices" doesn't tell me very much! What indices? $\endgroup$ – Semidiurnal Simon Jul 9 '19 at 16:49
  • $\begingroup$ @SemidiurnalSimon thanks fo reply. Can you open this link weather.cod.edu/sirvatka/si.html . You may understand my query. $\endgroup$ – Miss Priya Kumari Jul 10 '19 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.