<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Wesley,<br>
      <br>
      I finally found time to dig into this.<br>
      <br>
      I actually get "undefined time unit 14" from wgrib2 when trying to
      handle 30 min records. That's probably why g2ctl, alt_g2ctl also
      does not do the job (throwing this message) and so on.<br>
      <br>
      For example, your suggestion #2:<br>
      <br>
      $ wgrib2 wrfprs_d01.00_30.g2 -if ":30 min fcst:" -set_ftime "30
      min fcst" -fi -grib wrfprs_d01.00_30.g2.con<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      1:0:d=2017111500:RWMR:1 hybrid level:1 ? fcst:<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      2:2310:d=2017111500:SNMR:1 hybrid level:1 ? fcst:<br>
      add_time: undefined time unit 14<br>
      ...<br>
      <br>
      <br>
      Or...<br>
      <br>
      $ alt_gmp -i wrfprs_d01.grib2.ctl <br>
      wgrib2_flags=-npts -set_ext_name 1 -end_FT -ext_name -lev<br>
      wgrib2_inv=.invd01<br>
      dtype:  dtype grib2<br>
      pdef:  pdef 149 149 lccr -29.363000 45.203000 1 1 -21.633000
      -21.633000 54.288000 12000.000000 12000.000000tdef:  nt=7
      start=00Z15nov2017 by=10mn<br>
      zdef: nlevel=25<br>
      resolve_dsets dset=wrfprs_d01.grib2 inctime=10mn<br>
      resolve_dsets: no template<br>
      scanning wrfprs_d01.grib2 (process=0)<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      add_time: undefined time unit 14<br>
      <br>
      <br>
      <br>
      grib1to2.pl did not work either, it failed:<br>
      <br>
      $ for i in WRFPRS_d01.0* ; do ./grb1to2.pl -o $i.g2 $i ; done<br>
      (((rec 1:0:date 2017111500 RWMR kpds5=170 kpds6=109 kpds7=1
      levels=(0,1) grid=255 hybrid lev 1 anl:<br>
        RWMR=Rain water mixing ratio [kg/kg]<br>
        timerange 0 P1 0 P2 0 TimeU 1  nx 149 ny 149 GDS grid 3
      num_in_ave 0 missing 0<br>
        center 7 subcenter 0 process 125 Table 2 scan: WE:SN winds(grid)
      <br>
        Lambert Conf: Lat1 -29.363000 Lon1 45.203000 Lov 54.288000<br>
            Latin1 -21.633000 Latin2 -21.633000 LatSP -90.000000 LonSP
      0.000000<br>
            South Pole (149 x 149) Dx 12.000000 Dy 12.000000 scan 64
      mode 136<br>
        min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0<br>
      <br>
      )))<br>
      &gt;&gt; grib2_metadata --- WRFPRS_d01.00_00   wgrib=./wgrib
      wgrib2=./wgrib2<br>
      Use of uninitialized value $1 in negation (-) at
      ./grib1to2_metadata.pl line 74, &lt;INV&gt; line 1.<br>
      no scan mode at ./grib1to2_metadata.pl line 83, &lt;INV&gt; line
      1.<br>
      missing GRIB record(s)<br>
      ((()))<br>
      Problem, winds not defined! old ./wgrib?<br>
      grib2 message ignored (use wgrib2)<br>
      missing GRIB record(s)<br>
      ((()))<br>
      Problem, winds not defined! old ./wgrib?<br>
      (((rec 1:0:date 2017111500 RWMR kpds5=170 kpds6=109 kpds7=1
      levels=(0,1) grid=255 hybrid lev 1 10min fcst:<br>
        RWMR=Rain water mixing ratio [kg/kg]<br>
        timerange 10 P1 0 P2 10 TimeU 0  nx 149 ny 149 GDS grid 3
      num_in_ave 0 missing 0<br>
        center 7 subcenter 0 process 125 Table 2 scan: WE:SN winds(grid)
      <br>
        Lambert Conf: Lat1 -29.363000 Lon1 45.203000 Lov 54.288000<br>
            Latin1 -21.633000 Latin2 -21.633000 LatSP -90.000000 LonSP
      0.000000<br>
            South Pole (149 x 149) Dx 12.000000 Dy 12.000000 scan 64
      mode 136<br>
        min/max data 0 5.31824e-06  num bits 16  BDS_Ref 0  DecScale 11
      BinScale 4<br>
      <br>
      <br>
      <br>
      I have no idea how to proceed further.<br>
      Tks,<br>
      Ivan<br>
      <br>
      <br>
      <br>
      <br>
      On 11/07/2017 08:12 PM, Wesley Ebisuzaki - NOAA Federal wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMHOGemEOR6Fzu1AvYB7F2-UfUcNiNfRLCHNvhesUYxtMeYBHQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>Ivan,<br>
            <br>
          </div>
        </div>
        <div>"UPP follows NCEP code table for timing grib records - for
          15 and 30<br>
          minute records use codes 13 and 14 respectively instead of
          simple<br>
          minutes. This seems to confuse GrADS (or g2ctl/gribmap, I'm
          not sure)."<br>
          <br>
          "Yes it is fixed. I'm currently need to output 10 min
          intervals. So, for <br>
          full hour, 10m, 20m, 40m and 50m I get OK data. But for 30m I
          do not."<br>
          <br>
        </div>
        <div>These quotes suggests that it is a problem with gribmap
          expecting<br>
        </div>
        <div>30 minute_time_units  and not being able to handle 1
          30_minute_time_units.<br>
          <br>
        </div>
        <div>Suggestion #1<br>
          <br>
        </div>
        <div>    use alt_g2ctl/alt_gmp<br>
          <br>
        </div>
        <div>    Both are based on wgrib2 which uses english rather than
          code table numbers.<br>
        </div>
        <div><br>
        </div>
        <div>Suggestion #2<br>
          <br>
        </div>
        <div>    convert forecast time from 1 (30 minutes) to 30
          (minutes)<br>
          <br>
        </div>
        <div>     wgrib2 IN.grb -if ":30 min fcst:" -set_ftime "30 min
          fcst" -fi -grib OUT.grb<br>
          <br>
        </div>
        <div>Wesley<br>
          <br>
        </div>
        <div><br>
          <br>
        </div>
        <div><br>
        </div>
        <div><br>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Tue, Nov 7, 2017 at 1:21 PM,
              Jeff Duda <span dir="ltr">&lt;<a
                  href="mailto:jeffduda319@gmail.com" target="_blank"
                  moz-do-not-send="true">jeffduda319@gmail.com</a>&gt;</span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div>
                    <div>
                      <div>What result do you get when you do<br>
                        <br>
                      </div>
                      wgrib2 -T (grib file)<br>
                      <br>
                      ?<br>
                      <br>
                    </div>
                    Look after the "D=", as the represents the time in
                    the GRIB2 file.<br>
                    <br>
                  </div>
                  Jeff<br>
                </div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Tue, Nov 7, 2017 at 12:10
                    PM, Ivan Toman <span dir="ltr">&lt;<a
                        href="mailto:ivtoman@inet.hr" target="_blank"
                        moz-do-not-send="true">ivtoman@inet.hr</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div bgcolor="#FFFFFF">
                        <div
                          class="gmail-m_1535943391223832856m_5316030439332110718moz-cite-prefix">Hello,<br>
                          <br>
                          Yes it is fixed. I'm currently need to output
                          10 min intervals. So, for full hour, 10m, 20m,
                          40m and 50m I get OK data. But for 30m I do
                          not.<br>
                          <br>
                          Thank you!<span
                            class="gmail-m_1535943391223832856HOEnZb"><font
                              color="#888888"><br>
                              Ivan</font></span>
                          <div>
                            <div class="gmail-m_1535943391223832856h5"><br>
                              <br>
                              <br>
                              <br>
                              On 11/07/2017 05:50 PM, Jeff Duda wrote:<br>
                            </div>
                          </div>
                        </div>
                        <div>
                          <div class="gmail-m_1535943391223832856h5">
                            <blockquote type="cite">
                              <div dir="ltr">
                                <div>What is your time interval? If it's
                                  not fixed, that's one problem. If it
                                  is fixed, then I don't see why regular
                                  templating wouldn't work unless the
                                  time being written to the grib2 file
                                  is not right. But there are ways to
                                  fix that.<br>
                                  <br>
                                </div>
                                Jeff Duda<br>
                              </div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">On Tue, Nov 7,
                                  2017 at 10:12 AM, Ivan Toman <span
                                    dir="ltr">&lt;<a
                                      href="mailto:ivtoman@inet.hr"
                                      target="_blank"
                                      moz-do-not-send="true">ivtoman@inet.hr</a>&gt;</span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0px 0px 0px
                                    0.8ex;border-left:1px solid
                                    rgb(204,204,204);padding-left:1ex">Hello,<br>
                                    <br>
                                    I'm having difficulties reading
                                    sub-hourly time records from WRF
                                    grib<br>
                                    files in GrADS.<br>
                                    <br>
                                    UPP follows NCEP code table for
                                    timing grib records - for 15 and 30<br>
                                    minute records use codes 13 and 14
                                    respectively instead of simple<br>
                                    minutes. This seems to confuse GrADS
                                    (or g2ctl/gribmap, I'm not sure).<br>
                                    <br>
                                    What I get as result is that I can
                                    read any sub-hourly record as long
                                    as<br>
                                    it is not 15 or 30 minute record.
                                    For those, I get undefined grid<br>
                                    instead of data.<br>
                                    <br>
                                    I use this workflow for
                                    postprocessing: wfrout &gt;(UPP)&gt;
                                    grib1 &gt;(cnvgrib)&gt;<br>
                                    grib2 &gt;(g2ctl,gribmap)&gt; GrADS<br>
                                    <br>
                                    Does anybody know what is going on
                                    there?<br>
                                    <br>
                                    Thank you in advance<br>
                                    <br>
                                    Ivan Toman<br>
                                    <br>
                                    ______________________________<wbr>_________________<br>
                                    gradsusr mailing list<br>
                                    <a
                                      href="mailto:gradsusr@gradsusr.org"
                                      target="_blank"
                                      moz-do-not-send="true">gradsusr@gradsusr.org</a><br>
                                    <a
                                      href="http://gradsusr.org/mailman/listinfo/gradsusr"
                                      rel="noreferrer" target="_blank"
                                      moz-do-not-send="true">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
                                  </blockquote>
                                </div>
                                <br>
                                <br clear="all">
                                <br>
                                -- <br>
                                <div
                                  class="gmail-m_1535943391223832856m_5316030439332110718gmail_signature">
                                  <div dir="ltr">
                                    <div>
                                      <div dir="ltr">
                                        <div>Jeff Duda<br>
                                          Post-doctoral research fellow<br>
                                          University of Oklahoma School
                                          of Meteorology<br>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <fieldset
class="gmail-m_1535943391223832856m_5316030439332110718mimeAttachmentHeader"></fieldset>
                              <br>
                              <pre>______________________________<wbr>_________________
gradsusr mailing list
<a class="gmail-m_1535943391223832856m_5316030439332110718moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org" target="_blank" moz-do-not-send="true">gradsusr@gradsusr.org</a>
<a class="gmail-m_1535943391223832856m_5316030439332110718moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank" moz-do-not-send="true">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a>
</pre>
                            </blockquote>
                            <p><br>
                            </p>
                          </div>
                        </div>
                      </div>
                      <br>
                      ______________________________<wbr>_________________<br>
                      gradsusr mailing list<br>
                      <a href="mailto:gradsusr@gradsusr.org"
                        target="_blank" moz-do-not-send="true">gradsusr@gradsusr.org</a><br>
                      <a
                        href="http://gradsusr.org/mailman/listinfo/gradsusr"
                        rel="noreferrer" target="_blank"
                        moz-do-not-send="true">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <span class="gmail-HOEnZb"><font color="#888888"><br>
                      <br clear="all">
                      <br>
                      -- <br>
                      <div
                        class="gmail-m_1535943391223832856gmail_signature">
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div>Jeff Duda<br>
                                Post-doctoral research fellow<br>
                                University of Oklahoma School of
                                Meteorology<br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </font></span></div>
                <br>
                ______________________________<wbr>_________________<br>
                gradsusr mailing list<br>
                <a href="mailto:gradsusr@gradsusr.org"
                  moz-do-not-send="true">gradsusr@gradsusr.org</a><br>
                <a href="http://gradsusr.org/mailman/listinfo/gradsusr"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>