if/or statement in GrADS script

Dan Leins theedge981 at GMAIL.COM
Wed Oct 17 15:46:16 EDT 2007


All,

I'm working on a GrADS script in which I will pass a forecast hour as an
argument. I have a small section of the script that I would only like to
execute when I pass forecast hours 12,24,or 36. So far I've constructed the
statement to read as follows:

if (subwrd(hh,1)='12')
blah blah blah
endif

This is all fine and good, but I'd like to re-use this same section of code
when I pass 24 or 36 as an argument. I was wondering if the if/or
functionality existed in GrADS?  I was thinking something along the lines of


if (subwrd(hh,1)='12') || if (subwrd(hh,1)='24') || if (subwrd(hh,1)='36')

but that didn't work. I really don't want to copy and paste the code
elsewhere in the script as it's a pretty lengthy section.

Is there any way I can accomplish this?

Thanks!
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20071017/bfaf79b4/attachment.html 


More information about the gradsusr mailing list