[gradsusr] if test in grads script going awol

Becker, Bernd bernd.becker at metoffice.gov.uk
Tue Oct 26 10:06:27 EDT 2010


dear all, 
what is wrong with this?


ignore=(20101021)

in=0
while ( in < 1 )
   in= in   +1

* check current date against list of dates to be ignored:
   dimfx       = subwrd(ignore, in)
   say rc' 'valnum(dimfx)
   dimfx       = math_format('%10.2f', dimfx  )
   ifxdate     = math_format('%10.2f', fxdate )
   skip=(ifxdate-dimfx)/1.
* this is zero to trigger skip
   say rc' 'dimfx' 'ifxdate' 'skip        ' 'valnum(skip)    
   if ( skip = int(0)      )    then
       say 'skip 'dimfx                 ' 'fxdate
   else
       say 'not skip 'dimfx             ' 'fxdate


for the life of it, skip is always true! even if skip is anything but
zero!

What can I do to skip if skip =0?

Cheers,
Bernd.

--
Bernd Becker   Climate Impacts Product Development
Met Office Hadley Centre    FitzRoy Road  Exeter   Devon EX1 3PB  United
Kingdom
Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
E-mail:bernd.becker at metoffice.gov.uk -
http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/
bernd-becker





More information about the gradsusr mailing list