[gradsusr] Writing a text output from Grads with header information
Felix Mutua
felix.mutua at gmail.com
Tue Mar 1 05:36:17 EST 2011
Hi Muhammad,
I'm using TRMM 3B42 Rainfall data sample on this
link<http://disc2.nascom.nasa.gov/daac-bin/OTF/HTTP_services.cgi?FILENAME=%2Fdata%2Fs4pa%2FTRMM_L3%2FTRMM_3B42%2F2005%2F001%2F3B42.050101.21.6.HDF.Z&LABEL=3B42.050101.21.6.nc&SHORTNAME=TRMM_3B42&SERVICE=NetCDF&VERSION=1.02>..
The data is Netcdf with each 3hrs as a different file..I.e 3*8*365
files(=timesteps)in a year...
I was thinking of doing a shell script to open and run the grads script for
all the time steps producing the text output for
some modelling application.. I'm running Opengrads in Windows and also I
have access to a Unix server-based one..
Thanks and Regards
On Tue, Mar 1, 2011 at 6:32 PM, Muhammad Rahiz <muhammad.rahiz at ouce.ox.ac.uk
> wrote:
> Hi Felix,
>
> At each lon & lat, you want to extract rainfall at every time step i.e. 3
> hours? Is that what you want to do? If yes, then
> 1. how many time steps are you dealing with?
> 2. what is the format of your file i.e. ctl or netcdf? If ctl, then I need
> two samples of the filename.
> 3. are you using GrADS in windows or linux?
>
> Off the top of my head, what you need is a double loop. If you could give
> me the details above, then I could modify a similar script that I have.
>
> --
>
> Muhammad Rahiz
> Researcher & DPhil Candidate (Climate Systems & Policy)
> School of Geography & the Environment
> University of Oxford
>
> On Tue, 1 Mar 2011, Felix Mutua wrote:
>
> Thanks Muhammad,
>> I've looked at it before...But my challenge is that I have to do this for
>> many files (TRMM 3 hrly precipitation data) for one year..Is there a way
>> I
>> can automate or just get the formatted output in Grads?
>>
>> Thanks
>>
>> Regards
>>
>> On Tue, Mar 1, 2011 at 5:28 PM, Muhammad Rahiz
>> <muhammad.rahiz at ouce.ox.ac.uk> wrote:
>> You need the fprintf.gs script, available athttp://
>> cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_var
>>
>> iable_data_to_a_text_file.
>>
>>
>> Muhammad Rahiz
>> Researcher & DPhil Candidate (Climate Systems & Policy)
>> School of Geography & the Environment
>> University of Oxford
>>
>>
>> On Tue, 1 Mar 2011, Felix Mutua wrote:
>>
>> Hi All, Could someone kindly assist..I'm trying to export
>> a variable into an
>> text output in this format ( with header)
>>
>> Lat Lon Pre
>> ...........................................................
>> 1.5 34.5 4.56
>> 2.0 34.0 3.46
>> .. .... ......
>> .. .... ......
>>
>> For a specified period...
>>
>> Any help greatly appreciated
>>
>>
>> Regards
>>
>> Felix
>>
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>
>>
--
_________________________________________________________
Felix Mutua
School of Engineering, The University of Tokyo
River Engineering and Environment Laboratory
7-3-1 Hongo Bunkyo-ku, Tokyo 113-8656, Japan
Phone +81-80-3553-0339,
E-mail: Felix.mutua at gmail.com, f-mutua at hydra.t.u-tokyo.ac.jp
Skype: Felix.mutua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110301/6237affe/attachment-0003.html
More information about the gradsusr
mailing list