I have a code like this
ten=(1,7,8,10)
ten=np.array(ten)
nine=(3,6,9)
nine=np.array(nine)
lat=range(1,11)
p_new1=[]
H2O_vmr_new1=[]
level=range(1,91)
row=range(0,6)
for j in lat:
if j in ten:
print j
for a in level:
if((H2O_vmr[a]-H2O_vmr[a+1])/(p[a]-p[a+1]))-((H2O_vmr[a-1]-
H2O_vmr[a])/(p[a-1]-p[a]))>.000001:
p_new1.append(p[a])
H2O_vmr_new1.append(H2O_vmr[a])
elif j in nine:
for a in level:
if((H2O_vmr[a]-H2O_vmr[a+1])/(p[a]-p[a+1]))-((H2O_vmr[a-1]-
H2O_vmr[a])/(p[a-1]-p[a]))>.000001:
p_new1.append(p[a])
H2O_vmr_new1.append(H2O_vmr[a])
only the first if loop is working that too it takes only the last value of 'j'(i tried printing 'j').second loop-'elif'(I tried 'if' instead of 'elif' also) is not working even.I'm really new to this.Any help will be appreciated.
Note:I have not posted the full code,since it is very long.I have only posted the part which is showing errors.