[gradsusr] How to write data in a file
Arlindo da Silva
dasilva at alum.mit.edu
Wed Sep 28 08:27:24 EDT 2011
On Wed, Sep 28, 2011 at 12:56 AM, sushant puranik
<sushantpuranik at gmail.com>wrote:
> Hi
> I am trying to make average of vorticity over four points as
>
> set lev 850
> define zeta=hcurl(uwnd,vwnd.2)
> set lat 12.5
> set lon 100
> define z1=zeta
> clear
> set lat 10
> set lon 100
> define z2=zeta
> clear
> set lat 12.5
> set lon 97.5
> define z3=zeta
> clear
> set lat 10
> set lon 97.5
> define z4=zeta
> clear
> define avez=(z1+z2+z3+z4)/4
> d avez
> write (testz.txt,te)
>
>
> But the output file remains blank.
>
> whats wrong with the script?
>
>
What kind of script is this? Exec? Recall that write() is a gs script
function, not something you call from the "ga->" command line. Read the
section of the User's Guide on scripts:
http://grads.iges.org/grads/gadoc/script.html#intro
Make sure you define the variable "te" that you are writing to the file, and
that the file name is a string.
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110928/2407b609/attachment-0003.html
More information about the gradsusr
mailing list