[gradsusr] If Statements and Drawing Variables

Carter Humphreys - Mods for GRX carter.humphreys at mods-for-grx.com
Mon Apr 17 17:59:49 EDT 2017


Hello,

I'm fairly new to GrADS and am trying use a script to search through a
model product using if statements and assign a value to a certain range of
that product. (I.e. if temp is between 45 and 55, x = 2) I then try to have
GrADS draw that variable but all I end up with is a blank map.

Any help would be appreciated, it's probably simple but I've been pretty
much lost after trying this for a few days now.

My Script:

'clear'
'set mpdset hires'
'sdfopen http://nomads.ncep.noaa.gov/dods/nam/nam20170417/nam_12z'

'define ehi = (capesfc*hlcy1000_0m)/160000'
'define index = 0'

if (ehi>=0.25 & ehi<0.50)
index = 1
endif

if (ehi>=0.50 & ehi<0.75)
index = 2
endif

if (ehi>=0.75 & ehi<1.00)
index = 3
endif

if (ehi>=1.00)
index = 4
endif

'set gxout shaded'

'd index'

'cbar'
'draw title GrADS Script Test'
'printim C:/GrADS/GrADS_script_test.png png white'

--

Sincerely,

*Carter J. Humphreys*

*Developer*


Mods for GRX

carter.humphreys at mods-for-grx.com | Support Email: support at mods-for-grx.com |
Website: www.mods-for-grx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170417/97437fbe/attachment.html 


More information about the gradsusr mailing list