[gradsusr] combine multiple variables in a single text file
Arlindo da Silva
dasilva at alum.mit.edu
Wed Nov 9 18:50:56 EST 2011
On Wed, Nov 9, 2011 at 5:43 PM, Anil acharya <acharya_anil at yahoo.com> wrote:
> Hi
> I am using write instead of print and want two parameters in the same file
> (formatted: 1st column as pcp, 2nd column as tmp). But I am getting some
> format error. Can you tell me what is wrong in the last line of the script?
> (This format is similar to matlab).
>
> 'set gxout print'
> 'set lat 38 42'
> 'set lon -105 -96'
> 'd apcp'
> pcp=subwrd(result,16)
> 'd tmpsfc'
> tmp=subwrd(result,16)
> dummy = write('output.txt', '%8.4f %8.4f', pcp, tmp)
>
>
Use the math_format() function instead, as documented here: math
functions<http://grads.iges.org/grads/gadoc/mathfunctions.html>
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111109/66d18345/attachment-0003.html
More information about the gradsusr
mailing list