[ncl-talk] Ingesting HRRR grib2 files into ncl_convert2nc

David Brown dbrown at ucar.edu
Thu Feb 26 14:31:55 MST 2015


Hi Todd,
I think it's okay to discuss your problems with GRIB2 on ncl-talk for now.
The GRIB2 tables on the HRRR web page that you pointed to are not the
kind of tables that NCL is looking for.  They are basically just sort
of a table of contents for the various HRRR products.
At any rate, I downloaded a sample HRRR file named
hrrr.t00z.wrfnatf00.grib2, and found that I could read it without
error, using either my latest development version of NCL or using an
old ncl-6.1.2 version of NCL. Are the files you are trying to read
similar to the one I downloaded? If so, I suspect you do have an
installation problem. Otherwise, can you point me to a file of the
type you are having difficulty with?
Just to clarify what you should have in a correct installation:
There should be a directory path
<INSTALL_ROOT>/lib/ncarg/grib2_codetables/ with a subdirectory ncep/4/
that contains the most used tables.
A typical table looks like this:

cat /usr/local/ncarg/lib/ncarg/grib2_codetables/ncep/4/4.2.0.0.table

# GRIBv2 - Table 4.2-0-0 Meteorological - Temperature
0:0:Temperature:K:TMP
1:1:Virtual temperature:K:VTMP
2:2:Potential temperature:K:POT
3:3:Pseudo-adiabatic potential temperature (or equivalent potential
temperature):K:EPOT
4:4:Maximum temperature:K:TMAX
5:5:Minimum temperature:K:TMIN
6:6:Dew point temperature:K:DPT
7:7:Dew point depression (or deficit):K:DEPR
8:8:Lapse rate:K m-1:LAPR
9:9:Temperature anomaly:K:TMPA
10:10:Latent heat net flux:W m-2:LHTFL
11:11:Sensible heat net flux:W m-2:SHTFL
12:12:Heat index:K:HEATX
13:13:Wind chill factor:K:WCF
14:14:Minimum dew point depression:K:MINDPD
15:15:Virtual potential temperature:K:VPTMP
16:16:Snow phase change heat flux:W m-2:SNOHF
17:17:Skin temperature:K:SKINT
18:18:Snow temperature (top of snow):K:SNOT
19:19:Turbulent transfer coefficient for heat:Numeric:TTCHT
20:20:Turbulent diffusion coefficient for heat:m2 s-1:TDCHT
21:21:Apparent Temperature:K:APTMP
# 21-191:21-191:Reserved:-:
# 192-254:192-254:Reserved for Local Use:-:
192:192:Snow phase change heat flux:W m-2:SNOHF
193:193:Temperature tendency by all radiation:K s-1:TTRAD
194:194:Relative error variance:-:REV
195:195:Large scale condensate heating rate:K s-1:LRGHR
196:196:Deep convective heating rate:K s-1:CNVHR
197:197:Total downward heat flux at surface:W m-2:THFLX
198:198:Temperature tendency by all physics:K s-1:TTDIA
199:199:Temperature tendency by non-radiation physics:K s-1:TTPHY
200:200:Standard dev. of IR temp. over 1x1 deg. area:K:TSD1D
201:201:Shallow convective heating rate:K s-1:SHAHR
202:202:Vertical diffusion heating rate:K s-1:VDFHR
203:203:Potential temperature at top of viscous sublayer:K:THZ0
204:204:Tropical cyclone heat potential:J m-2 K-1:TCHP
255:255:Missing:-:

These tables (for the ncep path at least) are based on NCEP GRIB2
documentation at
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc.shtml
The particular table I listed above is at
ww.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-0.shtml

If NCL is not finding the tables you might try setting the environment
variable NIO_GRIB2_CODETABLES to point to their location.
This should not be necessary if they are in the standard location, but
if it helps that could be a clue.
 -dave



On Thu, Feb 26, 2015 at 10:00 AM, Todd Mitchell
<mitchell at atmos.washington.edu> wrote:
> Greetings,
>
> I am using NCL 6.2.1 on a LINUX machine, and I would like to use
> ncl_convert2nc to convert a grib2 file of High Resolution Rapid Response
> (HRRR) model data into netCDF.
>
> The error messages I get are
> fatal:NclGRIB2 Invalid Product Definition Template
> fatal:Could not open (./a.grib2)
>
> We have our gribtables installed at
> home/disk/sys/local/linux64/ncl_ncar-6.2.1/lib/ncarg/grib2_codetables
>
> The necessary gribtable, NclGRIB2 I presume, isn't there.  I went to
> http://rapidrefresh.noaa.gov/HRRR/ and, on the left sidebar, there are
> collection of grib tables appropriate to the HRRR data.  Our IT people
> installed those tables in a directory called
> home/disk/sys/local/linux64/ncl_ncar-6.2.1/lib/ncarg/grib2_codetables/hrrr
> and ncl_convert2nc still complains.  They gave the gribtable for the
> "native" grid data that I am using the name GRIB2Table_hrrr_nat.table
>
> The questions are how do I make it so that NCL finds this gribtable and
> associates it with whatever code there is in my grib2 file that specifies
> the gribtable?
>
> I realize that this query is more appropriate to ncl-install.  I submitted a
> request to get on the ncl-install email list on Tuesday.  I haven't heard
> back yet, so I am hoping that some of the ncl-install participants also read
> this email.
>
> Thank you !
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list