[gradsusr] [gradsusr^ unability to run some coomands & iterations
Mario Caffera
rmcaffera at yahoo.com
Mon Feb 7 00:07:48 EST 2011
Hi grads users.
I never be able to do any iteration in grads, nor apply any command as "while" "if" or "for". It appears some explanations like "unknown command" or so on.
I'm running grads in a Win32 mahine. Could be that the cause?
thanks in advance
Mario
--- On Sun, 2/6/11, Muhammad Rahiz <muhammad.rahiz at ouce.ox.ac.uk> wrote:
> From: Muhammad Rahiz <muhammad.rahiz at ouce.ox.ac.uk>
> Subject: Re: [gradsusr] Templates for TRMM data
> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> Date: Sunday, February 6, 2011, 7:12 PM
> The following code would allow you to
> open multiple files but you need to make a list of files you
> want to open as *.txt (e.g. inputfiles.txt)
>
> n = 10 # where n is
> the total number of files in inputfiles.txt
> m = 1
> while(m< n+1)
> ifile = 'inputfiles.txt'
> rec = read(ifile)
>
> IO = sublin(rec,1)
> if(IO = 1)
> say ifile' > File open error'
> endif
> if (IO = 0)
> a = subwrd(rec,2)
> endif
>
> 'sdfopen 'a''
> say ''a''
> 'quit'
> m = m +1
> endwhile
>
>
> If you're using GrADS in Linux/Unix environment, the
> following would work as well;
>
> #!/bin/bash
>
> for i in $(ls *.nc); do
>
> cat > grads.gs << EOF
> 'sdfopen $i'
> say '$i'
> 'quit'
> EOF
> grads -blc 'run grads.gs'
>
> done
>
>
> HTH,
> ---
> Muhammad Rahiz
> Researcher & DPhil Candidate (Climate Systems &
> Policy)
> School of Geography & the Environment
> University of Oxford
>
> On Sun, 6 Feb 2011, Subash Yeggina wrote:
>
> > Hi! Muhammad,
> > sdfopen inputfile.nc is to read one file. I would
> like to know how to read
> > all the files using 'templates'.
> >
> >
> > Thanks,
> > Subash
> >
> > On Sun, Feb 6, 2011 at 9:50 PM, Muhammad Rahiz
> > <muhammad.rahiz at ouce.ox.ac.uk>
> wrote:
> >
> > sdfopen inputfile.nc
> >
> >
> >
> > Muhammad Rahiz
> > Researcher & DPhil
> Candidate (Climate Systems & Policy)
> > School of Geography
> & the Environment
> > University of Oxford
> >
> > On Sun, 6 Feb 2011, Subash Yeggina wrote:
> >
> > > Hi! All,
> > > I have 1 year 3B42 3hr TRMM data in NetCDF
> format. My question is
> > how to
> > > write the template file to read all the data is
> GrADS.
> > >
> > >
> > > Thanks & Regards,
> > > Subash
> > >
> > >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> >
> >
> >
> >
> -----Inline Attachment Follows-----
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
More information about the gradsusr
mailing list