<div dir="ltr"><font face="verdana,sans-serif">thank you Lee for all your help and patience!</font><div><font face="verdana,sans-serif"><br></font></div><div style><font face="verdana,sans-serif">I got a new problem: I only get the script to do the first year... what am I missing??</font></div>
<div style><font face="verdana,sans-serif"><br></font></div><div style><font face="verdana,sans-serif">And I had to put </font></div><div style><b style="font-family:verdana,sans-serif">sum(@*1000,time=00z$dia$mese[$mes]$ano,time=18z$dia$mese[$mes]$ano) </b></div>
<div style><span style="font-family:verdana,sans-serif">instead of </span><b style="font-family:verdana,sans-serif">'</b><b style="font-family:verdana,sans-serif">sum(@*1000,time=00z$dia$mese[$mes]$ano,time=18z$dia$mese[$mes]$ano)'</b><span style="font-family:verdana,sans-serif"> </span></div>
<div style><span style="font-family:verdana,sans-serif">'</span><span style="font-family:verdana,sans-serif">cause if not I get another error</span></div><div style><span style="font-family:verdana,sans-serif"><br></span></div>
<div style><span style="font-family:verdana,sans-serif">I attach the newest version: </span></div><div style><font face="verdana,sans-serif"><br></font></div><div style><font face="verdana,sans-serif"><br></font></div><div style>
<font face="verdana,sans-serif"><br></font></div><div style><font face="verdana,sans-serif"><div><b>#!/usr/bin/csh</b></div><div><b><br></b></div><div><b>set mese = (jan feb mar apr may jun jul aug sep oct nov dec)</b></div>
<div><b><br></b></div><div><b>@ ano = 1961</b></div><div><b>while($ano <= 1990)</b></div><div><b><br></b></div><div><b> @ mes = 1</b></div><div><b> while($mes <= 12)</b></div><div><b> if($mes < 10) then</b></div>
<div><b> set mes = '0'$mes</b></div><div><b> endif</b></div><div><b><br></b></div><div><b> @ dia = 1</b></div><div><b> while($dia <= 30)</b></div><div><b> if($dia < 10) then</b></div><div><b> set dia = '0'$dia</b></div>
<div><b> endif</b></div><div><b><br></b></div><div><b> echo 00z$dia$mese[$mes]$ano 18z$dia$mese[$mes]$ano</b></div><div><b><br></b></div><div><b> /opt/grads30d/bin/gradsc -bpc "run /opt/grads30d/scripts/<a href="http://lats4d.gs">lats4d.gs</a> -i /data/CR_presente_1960-1990/binctl/Eta_exp110km1960010100.ctl -o ../climat_6190sumaprec_diaria/sumaprec_$dia$mes$ano -ftype ctl -format grads_grib -vars prec -time 00z$dia$mese[$mes]$ano 18z$dia$mese[$mes]$ano -func sum(@*1000,time=00z$dia$mese[$mes]$ano,time=18z$dia$mese[$mes]$ano) -levs 1000 925 850 500 250 -table cptec.table"</b></div>
<div><b><br></b></div><div><b>@ dia = $dia + 1</b></div><div><b>end</b></div><div><b><br></b></div><div><b>@ mes = $mes + 1</b></div><div><b>end</b></div><div><br></div><div style>Regards and thanks again! </div></font></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/18 Lee Byerle <span dir="ltr"><<a href="mailto:lbyerle@yahoo.com" target="_blank">lbyerle@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Estefania,<div>Here is a sample lats4d command w/sum() that's working w/NOAA-CIRES 20th Cent reanalysis. I added back in -time (selects single time with t1 and t2 the same). I moved -func {expression} to sum 00-18Z prate after -vars expression, instead of before it.</div>
<div><br></div><div><div>lats4d.sh -i <a href="http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/20thC_ReanV2/gaussian/monolevel/prate.1983.nc" target="_blank">http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/20thC_ReanV2/gaussian/monolevel/prate.1983.nc</a> -vars prate -time 00z18jul1983 00z18jul1983 -func 'sum(@,time=00z18jul1983,time=18z18jul1983)' -format grads_grib -center ncep -o try.grb -v</div>
</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Lee</font></span><div><div class="h5"><br><div><div><br></div><div>On Jan 18, 2013, at 11:56 AM, Estefanía Jiménez wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><font face="verdana,sans-serif">Tried all that... didn't work. </font><div><font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif"><br></font></div>
</div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/1/17 Lee Byerle <span dir="ltr"><<a href="mailto:lbyerle@yahoo.com" target="_blank">lbyerle@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto"><div>Hi Estefania,</div><div>Instead of t=, try time= </div><div><br></div><div>You may consider testing with a specific set of times without the strings in the sum expression if the error persists.</div>
<div>
<br></div><div>I hope this works.</div><span><font color="#888888"><div>Lee</div></font></span><div><div><div><br></div><div><br>On Jan 17, 2013, at 1:30 PM, Estefanía Jiménez <<a href="mailto:estefaniajimenez.r@gmail.com" target="_blank">estefaniajimenez.r@gmail.com</a>> wrote:<br>
<br></div><blockquote type="cite"><div><div dir="ltr"><font face="verdana,sans-serif" size="4">I got this error:</font><div><font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif"><div>GrADS-LATS Error: (lats_write) failed...</div>
<div>Data Request Warning: Request beyond file limits</div><div>LATS error (lats_write): LATS (lats.c) --> For GrADS convention, cannot skip timepoints; current time = 271716.000000 hours since 1960-1-1 0, previous time = 714.000000 hours since 1960-1-1 0, delta = 6, file = ../climat_6190sumaprec_diaria/sumaprec_12121961.grb, variable = prec</div>
<div><span style="font-size:large"><br></span></div><div><span style="font-size:large">any ideas? I attached the full script:</span><br></div><div><br></div><div><div><div>#!/usr/bin/csh</div><div><br></div><div>
set mese = (jan feb mar apr may jun jul aug sep oct nov dec)</div><div><br></div><div>@ ano = 1961</div></div><div><br></div><div>while($ano <= 1990)<br></div><div><br></div><div> @ mes = 1</div><div> while($mes <= 12)</div>
<div> if($mes < 10) then</div><div> set mes = '0'$mes</div><div> endif</div><div><br></div><div>@ dia = 1</div><div> while($dia <= 30)</div><div> if($dia < 10) then</div><div> set dia = '0'$dia</div>
<div> endif</div><div><br></div><div><br></div><div> /opt/grads30d/bin/gradsc -bpc "run /opt/grads30d/scripts/<a href="http://lats4d.gs/" target="_blank">lats4d.gs</a> -i /data/CR_presente_1960-1990/binctl/Eta_exp110km1960010100.ctl -o ../climat_6190sumaprec_diaria/sumaprec_$dia$mes$ano -ftype ctl -format grads_grib -func sum(@,t=00z$dia$mese[$mes]$ano,t=18z$dia$mese[$mes]$ano) -vars prec -levs 1000 925 850 500 250 -table cptec.table"</div>
<div><br></div><div>@ dia = $dia + 1</div><div>@ mes = $mes + 1</div><div> end</div><div><b> </b> 25,5 Bot</div><div><br></div>
</div></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/17 Estefanía Jiménez <span dir="ltr"><<a href="mailto:estefaniajimenez.r@gmail.com" target="_blank">estefaniajimenez.r@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font face="verdana,sans-serif">yuju! thanks a lot Lee!</font></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/16 Lee Byerle <span dir="ltr"><<a href="mailto:lbyerle@yahoo.com" target="_blank">lbyerle@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Estefania,</div><div>One suggestion is to remove the options -time and -mean and add -func 'sum(@,time=00z01...,time=18z30...)' to the Lats command (with your month, year and day strings included as before).</div>
<div><br></div><div>Good luck,</div><div>Lee<br></div><div><div><div><br>On Jan 16, 2013, at 12:08 PM, Estefanía Jiménez <<a href="mailto:estefaniajimenez.r@gmail.com" target="_blank">estefaniajimenez.r@gmail.com</a>> wrote:<br>
<br></div><blockquote type="cite"><div><div dir="ltr"><div><span style="font-family:verdana,sans-serif">Hi all! Is there a way that I can transform this script to get the sum of the variables instead of the average?? </span><font face="verdana,sans-serif"><br>
</font></div><font face="verdana,sans-serif"><div><font face="verdana,sans-serif"><br></font></div><div><br></div><div><b> /opt/grads30d/bin/gradsc -bpc "run /opt/grads30d/scripts/<a href="http://lats4d.gs/" target="_blank">lats4d.gs</a> -i /data/CR_presente_1960-1990/binctl/Eta_exp110km1960010100.ctl -o ../climat_6190/media_$mes$ano -ftype ctl -format grads_grib -mean -vars pslm pslc tp2m dp2m u10m v10m prec prcv neve clsf cssf ghfl tsfc qsfc tgsc tgrz ussl uzrs smav rnof evpp lwnv mdnv hinv cbnt ocis olis oces oles roce role albe agpl zgeo uvel vvel temp umrl omeg umes -time 00z01$mese[$mes]$ano 18z30$mese[$mes]$ano -levs 1000 925 850 500 250 -table cptec.table"</b></div>
<div><b><br></b></div><div><br></div><div><b><br></b></div><div><br></div></font><div>Thank you for your help!</div><div><br></div>-- <br><div dir="ltr"><a name="13c50041b07a56c1_13c4b9ab7d7ad790_13c492be3cd91d56_13c452478a62caba_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><i><span lang="ES-CR" style="font-size:10pt;font-family:'Lucida Fax',serif;color:rgb(31,73,125)">Estefanía Jiménez R.</span></i></a><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Meteoróloga</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Departamento de Climatología e Investigaciones Aplicadas</span><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Instituto Meteorológico Nacional</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">MINAET</span><div>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:10pt">Tel: <a href="tel:%2B506%202222%205616%20ext%20131" value="+50622225616" target="_blank">+506 2222 5616 ext 131</a></span>
</div></div>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>gradsusr mailing list</span><br><span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a></span><br>
<span><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></span><br></div></blockquote></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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"><div><br></div>-- <br><div dir="ltr"><a name="13c50041b07a56c1_13c4b9ab7d7ad790_13c492be3cd91d56_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><i><span lang="ES-CR" style="font-size:10.0pt;font-family:"Lucida Fax","serif";color:#1f497d">Estefanía Jiménez R.</span></i></a><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Meteoróloga</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Departamento de Climatología e Investigaciones Aplicadas</span><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Instituto Meteorológico Nacional</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">MINAET</span><div>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:10pt">Tel: <a href="tel:%2B506%202222%205616%20ext%20131" value="+50622225616" target="_blank">+506 2222 5616 ext 131</a></span>
</div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><a name="13c50041b07a56c1_13c4b9ab7d7ad790_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><i><span lang="ES-CR" style="font-size:10.0pt;font-family:"Lucida Fax","serif";color:#1f497d">Estefanía Jiménez R.</span></i></a><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Meteoróloga</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Departamento de Climatología e Investigaciones Aplicadas</span><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Instituto Meteorológico Nacional</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">MINAET</span><div>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:10pt">Tel: <a href="tel:%2B506%202222%205616%20ext%20131" value="+50622225616" target="_blank">+506 2222 5616 ext 131</a></span>
</div></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>gradsusr mailing list</span><br><span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a></span><br>
<span><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></span><br></div></blockquote></div></div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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"><div><br></div>-- <br><div dir="ltr"><a name="13c50041b07a56c1_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><i><span lang="ES-CR" style="font-size:10.0pt;font-family:"Lucida Fax","serif";color:#1f497d">Estefanía Jiménez R.</span></i></a><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Meteoróloga</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Departamento de Climatología e Investigaciones Aplicadas</span><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Instituto Meteorológico Nacional</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">MINAET</span><div>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:10pt">Tel: <a href="tel:%2B506%202222%205616%20ext%20131" value="+50622225616" target="_blank">+506 2222 5616 ext 131</a></span>
</div></div>
</div>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">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></div></div></div></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"><div><br></div>-- <br><div dir="ltr"><a name="SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><i><span lang="ES-CR" style="font-size:10.0pt;font-family:"Lucida Fax","serif";color:#1f497d">Estefanía Jiménez R.</span></i></a><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Meteoróloga</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Departamento de Climatología e Investigaciones Aplicadas</span><br>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">Instituto Meteorológico Nacional</span><br><span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:13px">MINAET</span><div>
<span style="color:rgb(31,73,125);font-family:'Lucida Fax',serif;font-size:10pt">Tel: +506 2222 5616 ext 131</span>
</div></div>
</div>