[gradsusr] Error opening .txt file in a grads script

Keren Rosado - NOAA Affiliate keren.rosado at noaa.gov
Mon Nov 30 11:36:12 EST 2015


Hello,

I am trying to open a .txt file in a .gs grads script without luck.
Grads version 2.0.1


This is what I have

'open dummy.ctl'
file = 'A20100826a.txt'
colors="1 2 3 4 5 6 7 8 9 10 11 12 13"
ccount=0

rc=1
while (rc != 2)
   data=read(file)
   rc=sublin(data,1)
   if (rc != 2)
      line=sublin(data,2)
      chk=substr(line,1,10)
      if (chk != "----------")
.
.
.
.
 The code keeps going but the error is at the "file" line.

Here is the error
file = 'A20100826a.txt'
Syntax Error:  Expected operand or '('
  Error ocurred at column 1
DEFINE error:  Invalid expression.

Thanks!



----
Keren Rosado
PhD Candidate/Howard University/NOAA EPP GRTSP Fellow
Intern/NOAA/NWS/NCEP/EMC
5830 University Research CT
Cubicle 2795
College Park, MD 20740
Tel: (301)-683-3816 <%28301%29-683-3763>
Cel: *(407)-621-1676 *
Email: Keren.Rosado at noaa.gov <Bin.Liu at noaa.gov>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151130/f6f719d6/attachment.html 


More information about the gradsusr mailing list