Hola Mario,<div><br></div><div>Espero que estés bien.</div><div><br></div><div>Una pregunta, ¿cuando utilizas los comandos while, if, etc., previenes de ponerlos sin entrecomillados? Por ejemplo,</div><div><br></div><div>....</div>
<div>i=0</div><div>while (i <=10)</div><div>'define x'i' = uwnd(t='i')'</div><div>i=i+1</div><div>endwhile</div><div>'set gxout contour'</div><div>'d x1'</div><div><br></div><div>
lo de arriba es un script-invento literal para mostrarte mi pregunta.</div><div><br></div><div>Un abrazo,</div><div><br></div><div>Eduardo.</div><div><br>2011/2/7 Mario Caffera <span dir="ltr"><<a href="mailto:rmcaffera@yahoo.com">rmcaffera@yahoo.com</a>></span><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi grads users.<br>
<br>
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.<br>
I'm running grads in a Win32 mahine. Could be that the cause?<br>
<br>
thanks in advance<br>
<br>
Mario<br>
<br>
--- On Sun, 2/6/11, Muhammad Rahiz <<a href="mailto:muhammad.rahiz@ouce.ox.ac.uk">muhammad.rahiz@ouce.ox.ac.uk</a>> wrote:<br>
<br>
> From: Muhammad Rahiz <<a href="mailto:muhammad.rahiz@ouce.ox.ac.uk">muhammad.rahiz@ouce.ox.ac.uk</a>><br>
> Subject: Re: [gradsusr] Templates for TRMM data<br>
> To: "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
> Date: Sunday, February 6, 2011, 7:12 PM<br>
> The following code would allow you to<br>
> open multiple files but you need to make a list of files you<br>
> want to open as *.txt (e.g. inputfiles.txt)<br>
><br>
> n = 10 # where n is<br>
> the total number of files in inputfiles.txt<br>
> m = 1<br>
> while(m< n+1)<br>
> ifile = 'inputfiles.txt'<br>
> rec = read(ifile)<br>
><br>
> IO = sublin(rec,1)<br>
> if(IO = 1)<br>
> say ifile' > File open error'<br>
> endif<br>
> if (IO = 0)<br>
> a = subwrd(rec,2)<br>
> endif<br>
><br>
> 'sdfopen 'a''<br>
> say ''a''<br>
> 'quit'<br>
> m = m +1<br>
> endwhile<br>
><br>
><br>
> If you're using GrADS in Linux/Unix environment, the<br>
> following would work as well;<br>
><br>
> #!/bin/bash<br>
><br>
> for i in $(ls *.nc); do<br>
><br>
> cat > <a href="http://grads.gs" target="_blank">grads.gs</a> << EOF<br>
> 'sdfopen $i'<br>
> say '$i'<br>
> 'quit'<br>
> EOF<br>
> grads -blc 'run <a href="http://grads.gs" target="_blank">grads.gs</a>'<br>
><br>
> done<br>
><br>
><br>
> HTH,<br>
> ---<br>
> Muhammad Rahiz<br>
> Researcher & DPhil Candidate (Climate Systems &<br>
> Policy)<br>
> School of Geography & the Environment<br>
> University of Oxford<br>
><br>
> On Sun, 6 Feb 2011, Subash Yeggina wrote:<br>
><br>
> > Hi! Muhammad, <br>
> > sdfopen <a href="http://inputfile.nc" target="_blank">inputfile.nc</a> is to read one file. I would<br>
> like to know how to read<br>
> > all the files using 'templates'.<br>
> ><br>
> ><br>
> > Thanks,<br>
> > Subash<br>
> ><br>
> > On Sun, Feb 6, 2011 at 9:50 PM, Muhammad Rahiz<br>
> > <<a href="mailto:muhammad.rahiz@ouce.ox.ac.uk">muhammad.rahiz@ouce.ox.ac.uk</a>><br>
> wrote:<br>
> ><br>
> > sdfopen <a href="http://inputfile.nc" target="_blank">inputfile.nc</a><br>
> ><br>
> ><br>
> ><br>
> > Muhammad Rahiz<br>
> > Researcher & DPhil<br>
> Candidate (Climate Systems & Policy)<br>
> > School of Geography<br>
> & the Environment<br>
> > University of Oxford<br>
> ><br>
> > On Sun, 6 Feb 2011, Subash Yeggina wrote:<br>
> ><br>
> > > Hi! All,<br>
> > > I have 1 year 3B42 3hr TRMM data in NetCDF<br>
> format. My question is<br>
> > how to<br>
> > > write the template file to read all the data is<br>
> GrADS.<br>
> > ><br>
> > ><br>
> > > Thanks & Regards,<br>
> > > Subash<br>
> > ><br>
> > ><br>
> > _______________________________________________<br>
> > gradsusr mailing list<br>
> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> -----Inline Attachment Follows-----<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Eduardo Agosta Scarel<br><br><a href="mailto:eduardo.agosta@conicet.gov.ar">eduardo.agosta@conicet.gov.ar</a><br><a href="mailto:eduardo_agosta@uca.edu.ar">eduardo_agosta@uca.edu.ar</a><br>
<br>"Hay que encontrar una manera de hablar sugerente y plástica que no declare y amoneste, sino que abra los sentidos interiores, que guíe al hombre hacia el acontecer sacro y promueva su realización."<br>
</div>