[gradsusr] Not to use 'write' command

Sujata Mandke amin at tropmet.res.in
Tue Apr 10 04:29:20 EDT 2018


Hi
  Please modify you grads script as follows
---
'open sample.ctl'
ten=5
tt=1
while(tt <= ten)
'set x 1'
'set y 1'
'set z 4'
'set t 'tt
'd tk'
pt=subwrd(result,4)
w=write(test.txt,pt)
tt=tt+1
say 'incremented time ='
say tt
endwhile
----
  You  can save either single grid point or area 
averaged data in ascii file using above script.
Hope this solve your problem with grads script.

With best regards
Dr. Sujata Mandke
scientist, Indian Institute of Tropical Meteorology
Pune,INDIA


----- Original Message -----
From: 植山秀紀 <ueyama at affrc.go.jp>
To: gradsusr at gradsusr.org
Sent: Tue, 10 Apr 2018 10:56:59 +0530 (IST)
Subject: [gradsusr] Not to use 'write' command

Hi, everyone,

I'd like to save GRADS output  as ascii text file.
I tried to run below script;

'open sample.ctl'
'set t 1 5'
'set z 4'
'set gxout print'
'd tk'
ret=write(test.txt, result)

Error description below was come out;

  Syntax Error : Invalid Operand
  'write' not a variable or function name
  Error occurred at column 1
DEFINE error : Invalid expression

I tried to use two version of GRADS: 1.9b4 and 2.1.1.b0 on CentOS6 linux.
I want to know a reason not to use 'write' command and how to save GRADS 
outputs as ascii text file.

Sincerely yours,

Hideki Ueyama
National Agriculture and Food Research Organization



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr




More information about the gradsusr mailing list