[gradsusr] Writing data to a text file

Andrew Friedman andfried at berkeley.edu
Mon Apr 8 13:12:36 EDT 2013


Another way is to use the fprintf recipe from the opengrads cookbook:
http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file

Andrew

On Apr 8, 2013, at 8:14 AM, Jayakrishnan P.R <prjayakrishnan at gmail.com> wrote:

> Here is an example in which data can be extracted into ascii. Use subwrd command. 
> 'reinit'
> 'open gpi9708.ctl'
> 'set lat -10'
> 'set lon 90'
> tt=865
> while(tt<=1018)
> 'set t 'tt
> 'define gpi1=aave(gpi,lon=60,lon=90,lat=-7,lat=0)'
> 'd gpi1'
> te=subwrd(result,4)
> w=write(gpi1999.dat,te)
> tt=tt+1
> endwhile
> 
> Best of Luck.
> 
> 
> On Mon, Apr 8, 2013 at 6:31 PM, leonardo <leoclarke at yahoo.com> wrote:
> Dear GrADS User
> 
> I have created an area average in grads and want to output the data
> to a text file so I can open it in notepad.
> 
> Can anyone assist?
> 
> Thanks
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> 
> 
> -- 
> Sincerely
> ***********************************************
> Jayakrishnan.P.R
> Teaching Associate (Atmospheric Science)
> Academy of Climate Change Education and Research
> Kerala Agricultural University
> Vellanikkara-680 656
> 
> and also
> 
> Research Fellow (Part Time)
> Department of Atmospheric Sciences
> CUSAT, Cochin-682 016
> Kerala, India.
> Mob: 09496026547
> 
> ***********************************************
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

Andrew Friedman
Graduate Student, UC Berkeley Geography
andfried at berkeley.edu







More information about the gradsusr mailing list