<p>This file is in GRIB-1 format. Each band corresponds to a GRIB message. The band names can be found in an INV file on the same server.</p>

<p>For your example check out the corresponding inv file <code>ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/201501/20150103/gfsanl_3_20150103_0000_000.inv</code>. </p>

<p>Another option is to use <code>wgrib -v</code> with <code>-v</code>  option.</p>

<p>The band names and offsets for all 315 bands can be obtained this way, e.g. for band 2 </p>

<pre><code>2:81534:D=2015010300:VGRD:planetary boundary layer (from Richardson no.)
 :kpds=34,220,0:anl:winds are N/S:"v wind [m/s]
</code></pre>

<p>That is bands 1 and 2 store <code>u</code> and <code>v</code> components of the wind speed at the boundary layer. </p>

<p><code>kpds</code> parameters make up the product definition section identifiers. The first kpds number can be mapped to mnemonic GRIB identifiers, i.e. number <code>34</code> maps to <code>VGRD</code>.</p>

<p>The unit is <code>m/s</code> and the data representation is 64-bit floating point. The latter piece of metadata can be extracted from the GRIB file itself e.g. using <code>gdalinfo</code>.</p>

<pre><code>Band 2 Block=360x1 Type=Float64, ColorInterp=Undefined
  Description = 0[-] var220 (reserved)
  Metadata:
    GRIB_COMMENT=v-component of wind [m/s]
    GRIB_ELEMENT=VGRD
    GRIB_FORECAST_SECONDS=0 sec
    GRIB_REF_TIME=  1420243200 sec UTC
    GRIB_SHORT_NAME=0-var220
    GRIB_UNIT=[m/s]
    GRIB_VALID_TIME=  1420243200 sec UTC
</code></pre>

<p>With the <code>-V</code> option <code>wgrid</code> utility produces a more detailed output:</p>

<pre><code>rec 2:81534:date 2015010300 VGRD kpds5=34 kpds6=220 kpds7=0 
    levels=(0,0) grid=3 planetary boundary layer (from Richardson no.) anl:
  VGRD=v wind [m/s]
  timerange 10 P1 0 P2 0 TimeU 1  nx 360 ny 181 GDS grid 0 num_in_ave 0 missing 0
  center 7 subcenter 0 process 81 Table 2 scan: WE:NS winds(N/S) 
  latlon: lat  90.000000 to -90.000000 by 1.000000  nxny 65160
          long 0.000000 to -1.000000 by 1.000000, 
          (360 x 181) scan 0 mode 128 bdsgrid 1
  min/max data -38.8 45.4  num bits 10  BDS_Ref -388  DecScale 1 BinScale 0
</code></pre>

CC BY-SA 3.0
2018-03-12T06:15:14.473Z
2018-03-12T12:10:06.753Z
2018-03-12T12:10:06.753Z
Dima Chubarov
<p>I'm downloading .grib files from NCEP: <a href="ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/" rel="nofollow noreferrer">ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/</a></p>

<p>Each file has 315 bands. What are their names?</p>

<p>Reproducibility with R:</p>

<pre><code>library(stars)
library(cptcity)
met &lt;- read_stars("ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/201501/20150103/gfsanl_3_20150103_0000_000.grb")
met2 &lt;- filter(met, band == 2)
plot(met2, col = cpt())
</code></pre>

<p><a href="https://i.sstatic.net/EgVuy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EgVuy.png" alt="enter image description here"></a></p>

<meteorology><atmosphere><ncep>
What are the band names of the NCEP grib files?
Sergio
# What are the band names of the NCEP grib files?

(Asked by: username_0 on 2018-03-11)

I'm downloading .grib files from NCEP: ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/
Each file has 315 bands. What are their names?
Reproducibility with R:
library(stars)
library(cptcity)
met <- read_stars("ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/201501/20150103/gfsanl_3_20150103_0000_000.grb")
met2 <- filter(met, band == 2)
plot(met2, col = cpt())

**Tags:** meteorology, atmosphere, ncep


---

## 1 answers

### Answer by username_1 on 2018-03-12. Score: 5 | Accepted answer

This file is in GRIB-1 format. Each band corresponds to a GRIB message. The band names can be found in an INV file on the same server.
For your example check out the corresponding inv file ftp://nomads.ncdc.noaa.gov/GFS/analysis_only/201501/20150103/gfsanl_3_20150103_0000_000.inv. 
Another option is to use wgrib -v with -v  option.
The band names and offsets for all 315 bands can be obtained this way, e.g. for band 2 
2:81534:D=2015010300:VGRD:planetary boundary layer (from Richardson no.)
 :kpds=34,220,0:anl:winds are N/S:"v wind [m/s]

That is bands 1 and 2 store u and v components of the wind speed at the boundary layer. 
kpds parameters make up the product definition section identifiers. The first kpds number can be mapped to mnemonic GRIB identifiers, i.e. number 34 maps to VGRD.
The unit is m/s and the data representation is 64-bit floating point. The latter piece of metadata can be extracted from the GRIB file itself e.g. using gdalinfo.
Band 2 Block=360x1 Type=Float64, ColorInterp=Undefined
  Description = 0[-] var220 (reserved)
  Metadata:
    GRIB_COMMENT=v-component of wind [m/s]
    GRIB_ELEMENT=VGRD
    GRIB_FORECAST_SECONDS=0 sec
    GRIB_REF_TIME=  1420243200 sec UTC
    GRIB_SHORT_NAME=0-var220
    GRIB_UNIT=[m/s]
    GRIB_VALID_TIME=  1420243200 sec UTC

With the -V option wgrid utility produces a more detailed output:
rec 2:81534:date 2015010300 VGRD kpds5=34 kpds6=220 kpds7=0 
    levels=(0,0) grid=3 planetary boundary layer (from Richardson no.) anl:
  VGRD=v wind [m/s]
  timerange 10 P1 0 P2 0 TimeU 1  nx 360 ny 181 GDS grid 0 num_in_ave 0 missing 0
  center 7 subcenter 0 process 81 Table 2 scan: WE:NS winds(N/S) 
  latlon: lat  90.000000 to -90.000000 by 1.000000  nxny 65160
          long 0.000000 to -1.000000 by 1.000000, 
          (360 x 181) scan 0 mode 128 bdsgrid 1
  min/max data -38.8 45.4  num bits 10  BDS_Ref -388  DecScale 1 BinScale 0


---

