[gradsusr] fprintf for aave loop

RafaelCB rafael.ciram at gmail.com
Tue Jun 5 10:28:38 EDT 2012


Hi Roberto!

You must follow these steps:
http://www.iges.org/grads/gadoc/gradcomdsetfwrite.html
and http://www.iges.org/grads/gadoc/gradcomdqfwrite.html

Another option is to use the command SED
Example:
After the display, you keep the information in a new variable, how to:
*chv1=sublin(result, 4)
chv1=subwrd(chv1**, 1)

*then,   *'!echo 'yy','mm','dd','hh','lon','lat','chv1' | sed s@\ @@g >>
verific.dat'** *
All this inside the loop.

I hope this helps.
Cheers,

-- 
Rafael Censi Borges
Meteorologia - Epagri/Ciram
+55 (48)3239-8064/8066
http://ciram.epagri.sc.gov.br



2012/6/4 Roberto Mera <rjmera at coas.oregonstate.edu>

> Hi all,
>
> I'm trying to write a script to write a bunch of area average numbers to
> a single text file for analysis with other software. The fprintf command
> only returns one value for area average when I run my area average
> script. Below is my area average script. How do I go about creating a
> text file for this?
>
> Thanks
>
>
> count = 1
> while (count < 151)
> 'set e 'count
> *'set e 1 10'
> *Cascades, Peuget north of 45N
>
> *'areal=aave(maskout(pmax1,mskgrd(t=1)),x=147.934,x=194.184,y=209.807,y=246.807)'
> *Olympic Peninsula
> 'areal=aave(pmax1,x=154.871,x=166.434,y=228.307,y=239.869)'
> 'fprintf areal aereal.txt'
> 'd areal'
> areal=subwrd(result,4)
> say areal
> if (rc != 0) ; break ; endif
> count = count +1
> *count = count +12
> endwhile
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120605/18345c94/attachment-0003.html 


More information about the gradsusr mailing list