<div dir="ltr">Thanks for your instructions Jeff and James, I think I understood what you said, and I tried that way. It seems to be everything right, but when I open de .ctl and try to display a var, I get the error:<br><br>Cannot contour grid - all undefined values <br><div><div><br></div><div>These are commands that I execute to create de template, and after that de .ctl header that results. I don&#39;t know what might the mistake.<br><br></div><div>Sorry for being so hopeless on that.<br></div><div>Miquel<br></div><div><br>&gt;&gt;&gt;<br><br>#el convertim a .ctl<br>perl <a href="http://g2ctl.pl">g2ctl.pl</a> GFS025_f%f3.grb &gt;GFS025.ctl<br><br>#creem arxiu .idf<br>gribmap -i GFS025.ctl<br><br>&gt;&gt;&gt;<br><br>dset ^GFS025_f%f3.grb<br>index ^GFS025_f006.grb.idx<br>undef 9.999E+20<br>title GFS025_f006.grb<br>* produced by g2ctl v0.1.1<br>* command line options: GFS025_f%f3.grb<br>* griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000 by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)<br><br>dtype grib2<br>options template<br>ydef 41 linear 35.000000 0.25<br>xdef 53 linear -5 0.250000<br>tdef 30 linear 06Z29sep2015 6hr<br>* PROFILE hPa<br>zdef 3 levels 100000 85000 50000<br>options pascals<br>vars 27<br><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-29 1:23 GMT+02:00 Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>As James mentioned and I suspected, doing this one file at a time is harder than using templates. What I would do is download all the GFS data files, then use one single control file to open all of them. Use templating, as described <a href="http://www.iges.org/grads/gadoc/templates.html" target="_blank">here</a>. Then adjust the TDEF line of the control file accordingly. The last thing to do is to run gribmap on that control file.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Jeff<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 28, 2015 at 5:48 PM, Miquel Bernis <span dir="ltr">&lt;<a href="mailto:bernisfeina@gmail.com" target="_blank">bernisfeina@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks again Jeff and James. <br><br>I&#39;ve pasted here a pair of my .ctl file example headers. After that, you have the commands I use for downloading the GFS 0.25 data, and for the conversion to .ctl. As you can see I use the perl g2ctl. <br><br></div><div>I really appreciate your help. <br></div><div>Miquel  <br></div><div><br>&gt;&gt;&gt;&gt;<br><br>dset ^GFS025_f066.grb<br>index ^GFS025_f066.grb.idx<br>undef 9.999E+20<br>title GFS025_f066.grb<br>* produced by g2ctl v0.1.1<br>* command line options: GFS025_f066.grb<br>* griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000 by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)<br><br>dtype grib2<br>ydef 41 linear 35.000000 0.25<br>xdef 53 linear -5 0.250000<br>tdef 1 linear 18Z30sep2015 1mo<br>* PROFILE hPa<br>zdef 3 levels 100000 85000 50000<br>options pascals<br></div>vars 27<br>....<br><br><div>&gt;&gt;&gt;&gt;<br>dset ^GFS025_f072.grb<br>index ^GFS025_f072.grb.idx<br>undef 9.999E+20<br>title GFS025_f072.grb<br>* produced by g2ctl v0.1.1<br>* command line options: GFS025_f072.grb<br>* griddef=1:0:(53 x 41):grid_template=0:winds(N/S): lat-lon grid:(53 x 41) units 1e-06 input WE:SN output WE:SN res 48 lat 35.000000 to 45.000000 by 0.250000 lon 355.000000 to 8.000000 by 0.250000 #points=2173:winds(N/S)<br><br>dtype grib2<br>ydef 41 linear 35.000000 0.25<br>xdef 53 linear -5 0.250000<br>tdef 1 linear 00Z01oct2015 1mo<br>* PROFILE hPa<br>zdef 3 levels 100000 85000 50000<br>options pascals<br></div><div>vars 27<br>....<br></div><div><br>&gt;&gt;&gt;&gt;<br><br>URL=&quot;<a href="http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t$%7Bfhr%7Dz.pgrb2.0p25.f$%7Bhr%7D&amp;lev_10_m_above_ground=on&amp;lev_2_m_above_ground=on&amp;lev_500_mb=on&amp;lev_850_mb=on&amp;lev_1000_mb=on&amp;lev_entire_atmosphere=on&amp;lev_high_cloud_layer=on&amp;lev_low_cloud_layer=on&amp;lev_middle_cloud_layer=on&amp;lev_surface=on&amp;var_APCP=on&amp;var_CAPE=on&amp;var_CFRZR=on&amp;var_CICEP=on&amp;var_CRAIN=on&amp;var_CSNOW=on&amp;var_DPT=on&amp;var_GUST=on&amp;var_HGT=on&amp;var_LFTX=on&amp;var_PRATE=on&amp;var_RH=on&amp;var_TCDC=on&amp;var_TMAX=on&amp;var_TMIN=on&amp;var_TMP=on&amp;var_UGRD=on&amp;var_VGRD=on&amp;subregion=&amp;leftlon=-5&amp;rightlon=8&amp;toplat=45&amp;bottomlat=35&amp;dir=%2Fgfs.$%7Bdate%7D$%7Bfhr%7D" target="_blank">http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t${fhr}z.pgrb2.0p25.f${hr}&amp;lev_10_m_above_ground=on&amp;lev_2_m_above_ground=on&amp;lev_500_mb=on&amp;lev_850_mb=on&amp;lev_1000_mb=on&amp;lev_entire_atmosphere=on&amp;lev_high_cloud_layer=on&amp;lev_low_cloud_layer=on&amp;lev_middle_cloud_layer=on&amp;lev_surface=on&amp;var_APCP=on&amp;var_CAPE=on&amp;var_CFRZR=on&amp;var_CICEP=on&amp;var_CRAIN=on&amp;var_CSNOW=on&amp;var_DPT=on&amp;var_GUST=on&amp;var_HGT=on&amp;var_LFTX=on&amp;var_PRATE=on&amp;var_RH=on&amp;var_TCDC=on&amp;var_TMAX=on&amp;var_TMIN=on&amp;var_TMP=on&amp;var_UGRD=on&amp;var_VGRD=on&amp;subregion=&amp;leftlon=-5&amp;rightlon=8&amp;toplat=45&amp;bottomlat=35&amp;dir=%2Fgfs.${date}${fhr}</a>&quot;<br><br># download file<br>curl &quot;$URL&quot; -o GFS025_f&quot;$hr&quot;.grb<br>sleep 1<br><br>#convert to .ctl<br>perl <a href="http://g2ctl.pl" target="_blank">g2ctl.pl</a> GFS025_f&quot;$hr&quot;.grb &gt; GFS025_f&quot;$hr&quot;.ctl<br><br>#create .idf file<br>gribmap -i GFS025_f&quot;$hr&quot;.ctl<br><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-28 21:22 GMT+02:00 James T. Potemra <span dir="ltr">&lt;<a href="mailto:jimp@hawaii.edu" target="_blank">jimp@hawaii.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Miquel,<br>
    <br>
    We&#39;d need to see you control files, but I suspect the TDEF line is
    causing problems.  I believe this gets set with your first open
    file.  For example, if you open a file and &quot;set t 1&quot;, time will get
    set to some date as defined in that control file.  If the subsequent
    files don&#39;t have this date defined you&#39;ll get the grid coordinate
    error.  You could issue a &quot;set dfile&quot; command to re-set the
    coordinates.<br>
    <br>
    Jim<div><div><br>
    <br>
    <div>On 9/28/15 3:12 PM, Miquel Bernis
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Thanks a lot for your answer Jeff. I&#39;m not sure how can I
          give more clues about the error. There&#39;s no problem when I
          work with the files separately, only when I operate between
          files in a different month. I realized that there&#39;s something
          wrong about the time vars. When I open consecutive files 24z,
          30z, 36z, 42z... the first one has the right time value, but
          the next ones shows a change of month, instead of just a 6h
          advance:<br>
          <br>
          ga-&gt; set t 1<br>
          Time values set: 2015:9:30:6 2015:9:30:6 <br>
          ga-&gt; set t 2<br>
          Time values set: 2015:10:30:6 2015:10:30:6 <br>
          ga-&gt; set t 3<br>
          Time values set: 2015:11:30:6 2015:11:30:6 <br>
          ga-&gt; set t 4<br>
          Time values set: 2015:12:30:6 2015:12:30:6 <br>
          ga-&gt; </div>
        <div><br>
        </div>
        <div>If open the files separately there&#39;s no time problem. Kind
          of weird.</div>
        <div><br>
        </div>
        <div>Anyway, you suggested:</div>
        <div><br>
        </div>
        <div>&quot;<span style="font-size:12.8px">I would just use templates
            and do the sum over different time index values&quot;</span></div>
        <div><br>
        </div>
        <div>I&#39;m sorry, I don&#39;t understand that. Maybe you can tell the
          same in another way or with more details. It would be helpful.</div>
        <div><br>
        </div>
        <div>Thanks a lot again.</div>
        <div>Miquel</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
          <br>
          <br>
        </div>
        <br>
        <div><br>
          <br>
          , <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-09-28 17:51 GMT+02:00 Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>Perhaps some more information on the specifics of the
                problem would help us to troubleshoot. However, if
                you&#39;re summing precip totals from a single GFS run, I
                would just use templates and do the sum over different
                time index values.<br>
                <br>
              </div>
              Jeff Duda<br>
            </div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">
                <div>
                  <div>On Mon, Sep 28, 2015 at 4:19 AM,
                    Miquel Bernis <span dir="ltr">&lt;<a href="mailto:bernisfeina@gmail.com" target="_blank"></a><a href="mailto:bernisfeina@gmail.com" target="_blank">bernisfeina@gmail.com</a>&gt;</span>
                    wrote:<br>
                  </div>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div>
                      <div dir="ltr">
                        <div style="font-size:12.8px">
                          <div>
                            <div>Hi everyone,<br>
                              <br>
                            </div>
                            I&#39;m stucked in a problem that might be
                            simple to fix, maybe any of you could help
                            me. The point is that I can&#39;t operate with
                            files when there&#39;s change of month. I&#39;m
                            working with GFS 0.25, and when I try to sum
                            the rain of the last file of month with the
                            rain of the first file of the moth ahead, it
                            returns and error like this:<br>
                            <br>
                            Invalid grid coordinates<br>
                            World coordinates convert to non-integer 
                            grid coordinates<br>
                            Variable = apcpsfc  Dimension = 3 <br>
                            <br>
                          </div>
                          Has any of you a solution for that? <br>
                          Thank you very much.<br>
                        </div>
                        <div style="font-size:12.8px">I&#39;ll really
                          appreciate your help.</div>
                        <span><font color="#888888">
                            <div style="font-size:12.8px"><br>
                            </div>
                            <div style="font-size:12.8px">Miquel</div>
                          </font></span></div>
                      <br>
                    </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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
                  <br>
                </blockquote>
              </div>
              <span><font color="#888888"><br>
                  <br clear="all">
                  <br>
                  -- <br>
                  <div>Jeff Duda<br>
                    Graduate research assistant<br>
                    University of Oklahoma School of Meteorology<br>
                    Center for Analysis and Prediction of Storms<br>
                  </div>
                </font></span></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <br>
  </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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>