[gradsusr] Setting z level based on 'if' statements

L.B. bcbass2989 at gmail.com
Thu Feb 18 15:32:14 EST 2016


Hello all,

I am attempting to set the z level from a set of if statements. Basically I
am finding the lowest pressure level of a variable, then using if
statements to match it to the closest level available in the model output
and setting the z level based on that value. I am getting a SET error when
I try to do this. Can I not do it this way? I have posted my script below:

'minHgt=max(max(PRES0C,lon='lonmin',lon='lonmax'),lat='latmin',lat='latmax')'
'minHgt=minHgt/100'

if (minHgt > 1011.63)
'botzlev = 1'
endif
if (minHgt <= 1011.63 & minHgt > 1005)
'botzlev = 2'
endif
if (minHgt <= 1005 & minHgt > 995)
'botzlev = 3'
endif
if (minHgt <= 995 & minHgt > 985)
'botzlev = 4'
endif
if (minHgt <= 985 & minHgt > 977.5)
'botzlev = 5'
endif
if (minHgt <= 977.5 & minHgt > 972.5)
'botzlev = 6'
endif

.
.
.
.


'set z 'botzlev


Any help would be appreciated. Thank You!
*-------*

*William (L.B.) LaForce*Meteorologist
www.tornadoinsanity.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160218/bc9cabf3/attachment.html 


More information about the gradsusr mailing list