Espero que ajude!<br><br>cit=read('o_estac.dat')<br>lin=sublin(cit,2)<br>_sig=subwrd(lin,1)<br>#say "cit="cit<br>#say "lin="lin<br>#say "sig="_sig<br>la=subwrd(lin,2)<br>lo=subwrd(lin,3)<br>
<br>'d gr2stn(t2.1,min.2)-273.15'<br>t2m=sublin(result,_n2)<br>#say "t2m="t2m<br>anl=sublin(result,_n3)<br><br><br>'d gr2stn(rh.1,min.2)'<br>rh=sublin(result,_n2)<br>#say "rh="rh<br>'d gr2stn(u10.1,min.2)'<br>
u1=sublin(result,_n2)<br>#say "u1="u1<br>'d gr2stn(v10.1,min.2)'<br>v1=sublin(result,_n2)<br>#say "v1="v1<br>'d gr2stn(slvl.1,min.2)'<br>slp1=sublin(result,_n2)<br>#say "slp1="slp1<br>
<br>#'define chva=(RAINC.1(t='n')+RAINNC.1(t='n'))'<br>#'define chvb=(RAINC.1(t='n-4')+RAINNC.1(t='n-4'))'<br>#'d gr2stn((rainc.1(t='n')+RAINNC.1(t='n')),min.2)'<br>
'd gr2stn((rainc.1(t='n')+RAINNC.1(t='n'))-(RAINC.1(t='n-4')+RAINNC.1(t='n-4')),min.2)'<br>#'d gr2stn((chva-chvb),min.2)'<br>chv1=sublin(result,_n2)<br>chv1=subwrd(chv1,1)<br>
say "chv1="chv1<br><br>if(chv1<0.1)<br> chv1=0<br>endif<br>say "chv1if="chv1<br><br><br>#'!printf "%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" 'ano' 'mes' 'dia' 'hora' '_sig' 'lo ' 'la' 't2m' 'rh ' 'u1 ' 'v1 ' 'slp1' >> verific.dat'<br>
'!echo 'ano','mes','dia','hora','_sig','lo','la','t2m','rh','u1','v1','slp1','chv1' | sed s@\ @@g >> verific.dat'<br>
*'!printf "\n" >> verific.dat'<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"><<a href="mailto:claudiomet@gmail.com">claudiomet@gmail.com</a>></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>