Espero que ajude!<br><br>cit=read(&#39;o_estac.dat&#39;)<br>lin=sublin(cit,2)<br>_sig=subwrd(lin,1)<br>#say &quot;cit=&quot;cit<br>#say &quot;lin=&quot;lin<br>#say &quot;sig=&quot;_sig<br>la=subwrd(lin,2)<br>lo=subwrd(lin,3)<br>
<br>&#39;d gr2stn(t2.1,min.2)-273.15&#39;<br>t2m=sublin(result,_n2)<br>#say &quot;t2m=&quot;t2m<br>anl=sublin(result,_n3)<br><br><br>&#39;d gr2stn(rh.1,min.2)&#39;<br>rh=sublin(result,_n2)<br>#say &quot;rh=&quot;rh<br>&#39;d gr2stn(u10.1,min.2)&#39;<br>
u1=sublin(result,_n2)<br>#say &quot;u1=&quot;u1<br>&#39;d gr2stn(v10.1,min.2)&#39;<br>v1=sublin(result,_n2)<br>#say &quot;v1=&quot;v1<br>&#39;d gr2stn(slvl.1,min.2)&#39;<br>slp1=sublin(result,_n2)<br>#say &quot;slp1=&quot;slp1<br>
<br>#&#39;define chva=(RAINC.1(t=&#39;n&#39;)+RAINNC.1(t=&#39;n&#39;))&#39;<br>#&#39;define chvb=(RAINC.1(t=&#39;n-4&#39;)+RAINNC.1(t=&#39;n-4&#39;))&#39;<br>#&#39;d gr2stn((rainc.1(t=&#39;n&#39;)+RAINNC.1(t=&#39;n&#39;)),min.2)&#39;<br>
&#39;d gr2stn((rainc.1(t=&#39;n&#39;)+RAINNC.1(t=&#39;n&#39;))-(RAINC.1(t=&#39;n-4&#39;)+RAINNC.1(t=&#39;n-4&#39;)),min.2)&#39;<br>#&#39;d gr2stn((chva-chvb),min.2)&#39;<br>chv1=sublin(result,_n2)<br>chv1=subwrd(chv1,1)<br>
say &quot;chv1=&quot;chv1<br><br>if(chv1&lt;0.1)<br> chv1=0<br>endif<br>say &quot;chv1if=&quot;chv1<br><br><br>#&#39;!printf &quot;%4.4s  %2.2s  %2.2s  %2.2s     %5.5s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s\n&quot; &#39;ano&#39; &#39;mes&#39; &#39;dia&#39; &#39;hora&#39; &#39;_sig&#39; &#39;lo &#39; &#39;la&#39; &#39;t2m&#39; &#39;rh &#39; &#39;u1 &#39; &#39;v1 &#39; &#39;slp1&#39; &gt;&gt; verific.dat&#39;<br>
&#39;!echo &#39;ano&#39;,&#39;mes&#39;,&#39;dia&#39;,&#39;hora&#39;,&#39;_sig&#39;,&#39;lo&#39;,&#39;la&#39;,&#39;t2m&#39;,&#39;rh&#39;,&#39;u1&#39;,&#39;v1&#39;,&#39;slp1&#39;,&#39;chv1&#39; | sed s@\ @@g &gt;&gt; verific.dat&#39;<br>
*&#39;!printf &quot;\n&quot;                        &gt;&gt; verific.dat&#39;<br><br>-- <br>Rafael Censi Borges<br>Téc.Meteorologia - Epagri/Ciram<br>+55 (48)3239-8064/8066<br><a href="http://ciram.epagri.sc.gov.br/" target="_blank">http://ciram.epagri.sc.gov.br</a><br>
<br><div class="gmail_quote">2011/1/5 claudiomet <span dir="ltr">&lt;<a href="mailto:claudiomet@gmail.com">claudiomet@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><div class="gmail_quote">Greetings GrADS users !!!<br><br>I need to extract values from reanalysis grib file into ascii file<br>the format of the ascii file must be<br><br>date,lat,lon,lev,var1,var2,var3<br clear="all">

<br>varying date and lev (nesting while) for each lat and lon<br>
<br>¿How to do this?<br>-- <br>Claudio Cortes<br>+56 (2) 2994121<br><br>Meteorologo<br>Laboratorio de Investigación, Innovación e Informática Aplicada (L3IA)<br>Unidad de Modelacion y Gestion de la Calidad del Aire (UMGCA)<br>


Centro Nacional del Medio Ambiente (CENMA)<br><font color="#888888"><br>--<br>Claudio Cortes<br>+56 (2) 2994121<br><br>Meteorologist<br>Laboratory Research, Innovation and Applied Informatics<br>Modeling and Air Quality Management Unit<br>

National Enviroment Center, Chile (CENMA)<br>

</font></div>
<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></blockquote></div><br><br clear="all"><br><br>