#!/usr/bin/ruby class String alias :byteslice :slice unless "a".respond_to?(:byteslice) alias :bytesize :size unless "a".respond_to?(:bytesize) def getui3 ofs #hi, lo = self[ofs, 3].unpack('Cn') hi, lo = self.byteslice(ofs, 3).unpack('Cn') (hi << 16) + lo end def bitslice_uint bofs, bwid # the first octet oofs = bofs / 8 # the last bit bend = bofs + bwid - 1 # the last octet oend = bend / 8 # number of octets to extract onum = oend - oofs + 1 ival = 0 onum.times {|iofs| ival <<= 8 cval = self.byteslice(oofs + iofs, 1).unpack('C').first # printf "[%7u: %#02x %#08b]\n", oofs + iofs, cval, cval ival |= cval } ival >>= (7 - bend % 8) ival &= ((1 << bwid) - 1) ival end end class GRIB2Dump @@tab = nil def tabinit return if @@tab @@tab = {} for line in DATA row = line.strip.split(/\t/) case row.first when /^#/ #do nothing when /^:/ t = $' @@tab[t] = {} unless @@tab[t] @@tab[t][row[1,2].join("\t")] = { :unit => row[3], :desc => row[4] } else #tab label wid type desc t = row[0] @@tab[t] = [] unless @@tab[t] h = { :label => row[1], :width => row[2], :type => row[3], :desc => row[4] } @@tab[t].push h end end end def initialize fp @fp = fp @begin = fp.pos @sec0 = fp.read(16) msglen = @sec0[8,8].unpack('NN') @msglen = (msglen[0] << 64) + msglen[1] @endpos = @begin + @msglen - 4 @vars = {} @vars4 = nil tabinit end def readsec cur = @fp.pos return nil if cur >= @endpos secl = (head = @fp.read(4)).unpack('N').first throw(:malformat, "too big section #{secl}") if cur + secl > @endpos body = @fp.read(secl - 4) head + body end def run decode 'IDS', @sec0 while sec = readsec nsec = sec.unpack('x4C').first xputs sprintf("= Section #{nsec} (size #{sec.bytesize})") case nsec when 1 then decode 'IS', sec when 3 then decode 'GDS', sec when 4 then @vars4 = @vars.dup decode 'PDS', sec @vars = @vars4 when 5 then decode 'DRS', sec when 6 then decode 'BMS', sec when 7 then decode 'DS', sec end end magic = @fp.read(4) throw(:malformat, "Missing magic '7777' at end of GRIB") if magic != '7777' end def xputs s s.sub!(/$/, ')') if s.sub!(/^\t/, ' (') w = s.gsub(/ +/){|st| "\t" * st.size}.split(/ /) buf = [] while true if w.empty? or buf.join(' ').size + w.first.size > 78 puts buf.join(' ').gsub(/\t/, ' ') break if w.empty? buf = [' ' * 40] end buf.push w.shift end end def dumpcode val, wid, fmt tab, subkey = fmt[:type], '-' if /\// === tab then tab = $` subkey = $'.gsub(/\[(\w+)\]/) { @vars[$1] } end t = @@tab[tab] key = [subkey, val].join("\t") throw(:mistable, "code table #{tab} (key #{key})") unless t throw(:mistable, "entry #{key} in code table #{tab}") unless t[key] desc = t[key][:desc] u = t[key][:unit] desc += " [#{u}]" unless '-' == u xputs "\t= #{desc}" end def dumpflags val, wid, fmt tab = fmt[:type] t = @@tab[tab] throw(:mistable, "flag table #{tab}") unless t bwid = wid * 8 bwid.times {|i| vbit = val & (1 << (bwid - i - 1)) bit = vbit.zero? ? 0 : 1 fi = i + 1 p [:XF, val, fi, bit, fmt[:type]] if $DEBUG key = [fi, bit].join("\t") if ent = t[key] hit = case ent[:unit] when /\/\[\.(\d+)\]/ then cbit = $1.to_i p [:XFC, cbit] if $DEBUG hit = !(val & (1 << (bwid - cbit))).zero? else true end xputs "\t:bit #{fi} = #{bit}: #{ent[:desc]}" if hit end } end def dumpitem item, wid, fmt, ofs, tab sval = '(err)' val = nil xd = item.unpack('H*').first.upcase case fmt[:type] when /^!GRIB/ then sval = (val = item).dump when /^(uint|CT|CCT|FT)/ then val = case wid when 1 then item.unpack('C').first when 2 then item.unpack('n').first when 3 then ("\x00" + item).unpack('N').first when 4 then item.unpack('N').first when 8 then vec = item.unpack('NN') (vec[0] << 64) + vec[1] end sval = (/^F+$/ === xd) ? 'missing' : val.to_s when /^sint$/ then val = if /^[89ABCDEF]/ === xd then case wid when 1 then -(item.unpack('C').first & ~0x80) when 2 then -(item.unpack('n').first & ~0x8000) when 3 then -(("\x00" + item).unpack('N').first & ~0x800000) when 4 then -(item.unpack('N').first & ~0x80000000) end else case wid when 1 then item.unpack('C').first when 2 then item.unpack('n').first when 3 then ("\x00" + item).unpack('N').first when 4 then item.unpack('N').first end end sval = (/^F+$/ === xd) ? 'missing' : val.to_s when /^YMDHMS$/ then val = Time.gm(*item.unpack('nC5')) sval = val.strftime('%Y%m%dT%H%M%SZ') when /^yMDHM$/ then i = item.unpack('C5') # !!! fake !!! i[0] += 1900 i[0] += 100 if i[0] < 1970 val = Time.gm(*i).strftime('%Y%m%dT%H%M%SZ') sval = "-" when /^!ct\/(\w+)$/ then nv = $1 c = format('%02u', item.unpack('C').first - 1) sval = val = @vars[nv].to_s.sub(/^\d\d/, c) when /^!lv\/(\w+)$/ then case @vars[$1].to_i when 101, 104, 106, 108, 110, 112, 114, 116, 120, 121, 128, 141 then val = sval = item.unpack('CC').join('/') else val = sval = item.unpack('n').first end when /^!ft\/(\w+)\/(\w+)\/(\w+)$/ then p1, p2, xtab = $1, $2, $3 sval = (val = item.unpack('C').first).to_s if val == 10 arg = (@vars[p1] << 8 + @vars[p2]) xputs " (= #{arg})" end fmt = fmt.dup fmt[:type] = xtab when /^float$/ then val = item.unpack('g').first sval = (/^F+$/ === xd) ? 'missing' : format('%14.7g', val) when /^scfloat$/ then f, v = item.unpack('cN') f = -128 - f if f < 0 val = v.to_f * (10.0 ** -f) sval = (/^F+$/ === xd) ? 'missing' : val.to_s when /^mfloat$/ then a = item.unpack('C').first sign = if (a & 0x80).zero? then 1.0 else -1.0 end a &= ~0x80 b = (item.unpack('N').first & 0x00FFFFFF) val = sign * b * 16.0 ** (a - 64 - 6) sval = (/^F+$/ === xd) ? 'missing' : format('%14.7g', val) when %r{^((?:[*/]\w+)+)$} then v = item.unpack('N').first v = -(v & 0x7FFF_FFFF) unless (v & 0x8000_0000).zero? v = v.to_f val = v val = v if catch(:missing) { todo = fmt[:type].dup while todo.sub!(/^([*\/])(\w+)/, '') op, var = $1, $2 case op when '*' then throw(:missing) unless @vars[var] v *= @vars[var] when '/' then throw(:missing) unless @vars[var] v /= @vars[var] end end nil } sval = (/^F+$/ === xd) ? 'missing' : sprintf('%14.8g', val) else throw(:malformat, "bad fmt type #{fmt[:type]}") end s = sprintf("%3.3s%03u: %-14.14s %-17.17s %s\n", tab + '_', ofs + 1, xd, sval, fmt[:desc]) xputs s case fmt[:label] when /=(\w+)/ then @vars[$1] = (/^F+$/ === xd ? nil : val) when /=@(\w+)/ then @vars[$1] = [] unless @vars[$1] @vars[$1] << val end msg = catch(:mistable) { case fmt[:type] when /^CC?T/ then dumpcode val, wid, fmt when /^FT/ then dumpflags val, wid, fmt end nil } xputs "\t# missing #{msg}" if msg end def dumpdata buf, ofs # puts [:dumpdata, buf.bytesize, ofs, @vars].inspect throw(:malformat, "DRT must be 0") unless @vars['DRT'] == 0 throw(:malformat, "BMI must be 255") if @vars['BMI'] throw(:malformat, "Ni missing") unless @vars['Ni'] throw(:malformat, "Nj missing") unless @vars['Nj'] ni, nj, r, e, d, nbits, scan = @vars.values_at(*%w{Ni Nj R E Ds Nb Sc}) bofs = ofs * 8 nj.times {|j| puts ":--- row #{j} ---" ncols = ni # adjacent rows different size if scan.bit7 unless (scan & 0x2).zero? # even rows (odd j) reduced by one if scan.bit8 # odd rows (even j) reduced by one if scan.bit8.zero? ncols -= 1 if ((j + (scan & 0x1)) % 2).zero? end ncols.times {|i| val = buf.bitslice_uint(bofs, nbits) y = (r + val * (2.0 ** e)) * (10 ** -d) printf ":%8u: %#03.4x %8.4g\n", i, val, y bofs += nbits } } end def decode tab, buf tpl = @@tab[tab].dup throw(:fatal, "table #{tab} missing") unless Array === tpl ofs = 0 idx = 0 while fmt = tpl[idx] wid = case fmt[:width] when /^\d+$/ then fmt[:width].to_i when /^-$/ then 0 when /^!(\w+)$/ then @vars[$1] when /^\[/ then 0 else throw(:malformat, "width syntax error #{fmt[:width]}") end case fmt[:type] when 'loop' then loopcount = case fmt[:width] when /^\[(\w+)\]$/ then @vars[$1] when /^\[(\w+)!(\w+)\]$/ then @vars[$1] ? 0 : @vars[$2] when /^\[(\w+),(\w+)\]$/ then @vars[$1] or @vars[$2] else throw(:malformat, "loop count syntax error #{fmt[:width]}") end sz = 1 sz = sz.succ while tpl[idx+sz] and tpl[idx+sz][:type] != 'endloop' tpl[idx+1, sz] = tpl[idx+1, sz-1] * loopcount when /^>/ then calltab = $'.gsub(/\[(\w+)\]/){ @vars[$1] } throw(:malformat, "template #{calltab} missing") unless @@tab[calltab] subtpl = @@tab[calltab].dup subtpl.push tpl[idx+1] tpl[idx+1, 1] = subtpl when /^@$/ then dumpdata buf, ofs if $VERBOSE when /^-$/ then # do nothing else dumpitem buf.byteslice(ofs, wid), wid, fmt, ofs, tab unless wid.zero? end ofs += wid idx = idx.succ end end end class GRIB1Dump < GRIB2Dump def initialize fp @fp = fp @begin = fp.pos @sec0 = fp.read(8) @msglen = @sec0.getui3(4) @endpos = @begin + @msglen - 4 @vars = {} tabinit end def readsec cur = @fp.pos if cur >= @endpos return nil end secl = (head = @fp.read(3)).getui3(0) throw(:malformat, "too big section #{secl}") if cur + secl > @endpos body = @fp.read(secl - 3) head + body end def run decode 'IDS1', @sec0 decode 'PDS1', pds = readsec flags = pds[7,1].unpack('C').first decode 'GDS1', readsec unless (flags & 0x80).zero? decode 'BMS1', readsec unless (flags & 0x40).zero? decode 'BDS1', readsec magic = @fp.read(4) throw(:malformat, "Missing magic '7777' at end of GRIB") if magic != '7777' puts "\f\n" end def decode tab, buf super if tab == 'PDS1' and buf.bytesize > 40 then # ECMWF hack extcode = buf[40,1].unpack('C').first xtab = format('PDX%03u', extcode) if @@tab[xtab] then xputs "\t--- PDX: ECMWF extension #{extcode} in PDS after octet 41 ---" decode xtab, buf[40..-1] else xputs "\t# ECMWF extension #{extcode} missing" end end end end class GRIBDump def initialize argv @argv = argv end def dispatch fp puts :dispatch if $DEBUG msg = catch(:malformat) { buf = fp.read(4) case gribver = buf.unpack('x3C').first when 1 then fp.seek(-8, IO::SEEK_CUR) GRIB1Dump.new(fp).run when 2 then fp.seek(-8, IO::SEEK_CUR) GRIB2Dump.new(fp).run else puts "bad version #{gribver}" end nil } puts msg if msg end def dumpfile fnam puts "File #{fnam}" File.open(fnam, 'r') { |fp| fp.binmode state = 0 while c = fp.getc puts [:scan, state, c].inspect if $DEBUG case [state, c] when [0, ?G] then state = ?G when [?G, ?R] then state = ?R when [?R, ?I] then state = ?I when [?I, ?B] then dispatch(fp); state = 0 else state = 0 end end } end def run msg = catch(:fatal) { for fnam in @argv dumpfile(fnam) end nil } puts msg if msg rescue Errno::EPIPE end end GRIBDump.new(ARGV).run __END__ #tab label wid type desc IDS 1 4 !GRIB Magick number "GRIB" IDS 5 2 - Resreved IDS 7=D 1 CT0.0 Discipline - GRIB Master table number IDS 8 1 uint GRIB edition number (currently 2) IDS 9 8 uint Total length of GRIB message in octets IS 1 4 uint Length of section in octets IS 5 1 uint Number of section (1) IS 6=GC 2 CCT11 Identification of originating/generating centre IS 8=GS 2 uint Identification of originating/generating subscentre IS 10=IV 1 CT1.0 GRIB Master tables version number IS 11=IW 1 CT1.1 Version number of GRIB Local tables used to augment Master tables IS 12 1 CT1.2 Significance of reference time IS 13 7 YMDHMS Refecence time of data IS 20 1 CT1.3 Production status of processed data in this GRIB message IS 21 1 CT1.4 Type of processed data in this GRIB message GDS 1 4 uint Length of section in octets GDS 5 1 uint Number of section (3) GDS 6 1 CT3.0 Source of grid definition GDS 7 4 uint Number of data points GDS 11=GL 1 uint Number of octets for optional list of numbers GDS 12 1 uint Interpretation of list of numbers GDS 13=GT 2 CT3.1 Grid definition template number GDS 15 - >GDT3.[GT] Grid definition template GDS - [Ni,Nj] loop Optional list of numbers defining number of points GDS xx+1=@N !GL uint number of point GDS - - endloop - PDS 1 4 uint Length of section in octets PDS 5 1 uint Number of section (4) PDS 6=PL 2 uint Number of coordinate values after template PDS 8=PT 2 CT4.0 Product definition template number PDS 10 - >PDT4.[PT] Product definition template PDS - [PL] loop Optional list of coordinate values PDS xx+1 4 float Coordinate value PDS - - endloop - DRS 1 4 uint Length of section in octets DRS 5 1 uint Number of section (5) DRS 6 4 uint Number of data points where one or more values are specified in Section 7 when a bit map is present, total number of data points when a bit map is absent. DRS 10=DRT 2 CT5.0 Data representation template number DRS 12 - >DRT5.[DRT] Data representation template BMS 1 4 uint Length of section in octets BMS 5 1 uint Number of section (6) BMS 6=BMI 1 CT6.0 Bit-map indicator DS 1 4 uint Length of section in octets DS 5 1 uint Number of section (7) DS 6 - @ Data # GDT3.0 15 1 CT3.2 Shape of the Earth GDT3.0 16 5 scfloat Radius of spherical Earth GDT3.0 21 5 scfloat Major axis of oblate spheroid Earth GDT3.0 26 5 scfloat Minor axis of oblate spheroid Earth GDT3.0 31=Ni 4 uint Number of points along a parallel GDT3.0 35=Nj 4 uint Number of points along a meridian GDT3.0 39=Ab 4 uint Basic angle of the initial production domain GDT3.0 43=As 4 uint Subdivision of basic angle used to define extreme longitudes and latitudes, and direction increments GDT3.0 47 4 *Ab/As La1 - latitude of first grid point GDT3.0 51 4 *Ab/As Lo1 - longitude of first grid point GDT3.0 55 1 FT3.3 Resolution and component flags GDT3.0 56 4 *Ab/As La2 - latitude of last grid point GDT3.0 60 4 *Ab/As Lo2 - longitude of last grid point GDT3.0 64 4 *Ab/As Di - i direction increment GDT3.0 68 4 *Ab/As Dj - j direction increment GDT3.0 72=Sc 1 FT3.4 Scanning mode # GDT3.1 15 1 CT3.2 Shape of the Earth GDT3.1 16 5 scfloat Radius of spherical Earth GDT3.1 21 5 scfloat Major axis of oblate spheroid Earth GDT3.1 26 5 scfloat Minor axis of oblate spheroid Earth GDT3.1 31=Ni 4 uint Number of points along a parallel GDT3.1 35=Nj 4 uint Number of points along a meridian GDT3.1 39=Ab 4 uint Basic angle of the initial production domain GDT3.1 43=As 4 uint Subdivision of basic angle used to define extreme longitudes and latitudes, and direction increments GDT3.1 47 4 *Ab/As La1 - latitude of first grid point GDT3.1 51 4 *Ab/As Lo1 - longitude of first grid point GDT3.1 55 1 FT3.3 Resolution and component flags GDT3.1 56 4 *Ab/As La2 - latitude of last grid point GDT3.1 60 4 *Ab/As Lo2 - longitude of last grid point GDT3.1 64 4 *Ab/As Di - i direction increment GDT3.1 68 4 *Ab/As Dj - j direction increment GDT3.1 72=Sc 1 FT3.4 Scanning mode GDT3.1 73 4 *Ab/As Latitude of the southern pole of projection GDT3.1 77 4 *Ab/As Longitude of the southern pole of projection GDT3.1 81 4 *Ab/As Angle of rotation of projection # GDT3.20 15 1 CT3.2 Shape of the Earth GDT3.20 16 5 scfloat Radius of spherical Earth GDT3.20 21 5 scfloat Major axis of oblate spheroid Earth GDT3.20 26 5 scfloat Minor axis of oblate spheroid Earth GDT3.20 31=Nx 4 uint Number of points along the x-axis GDT3.20 35=Ny 4 uint Number of points along the y-axis GDT3.20 39=La1 4 uint latitude of first grid point GDT3.20 43=Lo1 4 uint longitude of first grid point GDT3.20 47 1 FT3.3 Resolution and component flags GDT3.20 48 4 uint LaD - latitude where Dx and Dy are specified GDT3.20 52 4 uint LoV - orientation of the grid GDT3.20 56 4 uint Dx - x-direction grid length GDT3.20 60 4 uint Dy - y-direction grid length GDT3.20 64 1 FT3.5 Projection centre flag GDT3.20 65=Sc 1 FT3.4 Scannning mode # GDT3.30 15 1 CT3.2 Shape of the Earth # GDT3.40 15 1 CT3.2 Shape of the Earth GDT3.40 16 5 scfloat Radius of spherical Earth GDT3.40 21 5 scfloat Major axis of oblate spheroid Earth GDT3.40 26 5 scfloat Minor axis of oblate spheroid Earth GDT3.40 31=Ni 4 uint Number of points along a parallel GDT3.40 35=Nj 4 uint Number of points along a meridian GDT3.40 39=Ab 4 uint Basic angle of the initial production domain GDT3.40 43=As 4 uint Subdivision of basic angle used to define extreme longitudes and latitudes, and direction increments GDT3.40 47 4 *Ab/As La1 - latitude of first grid point GDT3.40 51 4 *Ab/As Lo1 - longitude of first grid point GDT3.40 55 1 FT3.3 Resolution and component flags GDT3.40 56 4 *Ab/As La2 - latitude of last grid point GDT3.40 60 4 *Ab/As Lo2 - longitude of last grid point GDT3.40 64 4 *Ab/As Di - i direction increment GDT3.40 68 4 uint N - number of parallels between a pole and the Equator GDT3.40 72=Sc 1 FT3.4 Scannning mode # PDT4.0 10=C 1 CT4.1/[D] Parameter category PDT4.0 11 1 CT4.2/[D],[C] Parameter number PDT4.0 12 1 CT4.3 Type of generating process PDT4.0 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.0 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.0 15 2 uint Hours after reference time of data cut-off PDT4.0 17 1 uint Minutes after reference time of data cut-off PDT4.0 18 1 CT4.4 Indicator of unit of time range PDT4.0 19 4 uint Forecast time in units defined by octet 18 PDT4.0 23 1 CT4.5 Type of first fixed surface PDT4.0 24 5 scfloat First fixed surface PDT4.0 29 1 CT4.5 Type of second fixed surface PDT4.0 30 5 scfloat Second fixed surface # PDT4.1 10=C 1 CT4.1/[D] Parameter category PDT4.1 11 1 CT4.2/[D],[C] Parameter number PDT4.1 12 1 CT4.3 Type of generating process PDT4.1 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.1 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.1 15 2 uint Hours after reference time of data cut-off PDT4.1 17 1 uint Minutes after reference time of data cut-off PDT4.1 18 1 CT4.4 Indicator of unit of time range PDT4.1 19 4 uint Forecast time in units defined by octet 18 PDT4.1 23 1 CT4.5 Type of first fixed surface PDT4.1 24 5 scfloat First fixed surface PDT4.1 29 1 CT4.5 Type of second fixed surface PDT4.1 30 5 scfloat Second fixed surface PDT4.1 35 1 CT4.6 Type of ensemble forecast PDT4.1 36 1 uint Perturbation number PDT4.1 37 1 uint Number of forecasts in ensemble # PDT4.8 10=C 1 CT4.1/[D] Parameter category PDT4.8 11 1 CT4.2/[D],[C] Parameter number PDT4.8 12 1 CT4.3 Type of generating process PDT4.8 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.8 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.8 15 2 uint Hours after reference time of data cut-off PDT4.8 17 1 uint Minutes after reference time of data cut-off PDT4.8 18 1 CT4.4 Indicator of unit of time range PDT4.8 19 4 uint Forecast time in units defined by octet 18 PDT4.8 23 1 CT4.5 Type of first fixed surface PDT4.8 24 5 scfloat First fixed surface PDT4.8 29 1 CT4.5 Type of second fixed surface PDT4.8 30 5 scfloat Second fixed surface PDT4.8 35 7 YMDHMS Time of end of overall time interval PDT4.8 42=N 1 uint Number of time range specifications describing the time intervals used to calculate the statistically processed field PDT4.8 43 4 uint Total number of data values missing in statistical process PDT4.8 - [N] loop Statistical processes PDT4.8 47 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.8 48 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.8 49 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.8 50 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.8 54 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.8 55 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.8 - - endloop - # PDT4.9 10=C 1 CT4.1/[D] Parameter category PDT4.9 11 1 CT4.2/[D],[C] Parameter number PDT4.9 12 1 CT4.3 Type of generating process PDT4.9 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.9 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.9 15 2 uint Hours after reference time of data cut-off PDT4.9 17 1 uint Minutes after reference time of data cut-off PDT4.9 18 1 CT4.4 Indicator of unit of time range PDT4.9 19 4 uint Forecast time in units defined by octet 18 PDT4.9 23 1 CT4.5 Type of first fixed surface PDT4.9 24 5 scfloat First fixed surface PDT4.9 29 1 CT4.5 Type of second fixed surface PDT4.9 30 5 scfloat Second fixed surface PDT4.9 35 1 uint Forecast probability number PDT4.9 36 1 uint Total number of forecast probabilities PDT4.9 37 1 CT4.9 Probability type PDT4.9 38 5 scfloat Lower limit PDT4.9 43 5 scfloat Upper limit PDT4.9 48 7 YMDHMS Time of end of overall time interval PDT4.9 55=N 1 uint Number of time range specifications describing the time intervals used to calculate the statistically processed field PDT4.9 56 4 uint Total number of data values missing in statistical process PDT4.9 - [N] loop Statistical processes PDT4.9 60 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.9 61 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.9 62 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.9 63 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.9 67 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.9 68 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.9 - - endloop - # PDT4.10 10=C 1 CT4.1/[D] Parameter category PDT4.10 11 1 CT4.2/[D],[C] Parameter number PDT4.10 12 1 CT4.3 Type of generating process PDT4.10 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.10 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.10 15 2 uint Hours after reference time of data cut-off PDT4.10 17 1 uint Minutes after reference time of data cut-off PDT4.10 18 1 CT4.4 Indicator of unit of time range PDT4.10 19 4 uint Forecast time in units defined by previous octet PDT4.10 23 1 CT4.5 Type of first fixed surface PDT4.10 24 5 scfloat First fixed surface PDT4.10 29 1 CT4.5 Type of second fixed surface PDT4.10 30 5 scfloat Second fixed surface PDT4.10 35 1 uint Percentile value (from 100% to 0%) PDT4.10 36 7 YMDHMS Time of end of overall time interval PDT4.10 43=N 1 uint Number of time range specifications describing the time intervals used to calculate the statistically processed field PDT4.10 44 4 uint Total number of data values missing in statistical process PDT4.10 - [N] loop Statistical processes PDT4.10 48 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.10 49 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.10 50 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.10 51 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.10 55 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.10 56 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.10 - - endloop - # PDT4.11 10=C 1 CT4.1/[D] Parameter category PDT4.11 11 1 CT4.2/[D],[C] Parameter number PDT4.11 12 1 CT4.3 Type of generating process PDT4.11 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.11 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.11 15 2 uint Hours after reference time of data cut-off PDT4.11 17 1 uint Minutes after reference time of data cut-off PDT4.11 18 1 CT4.4 Indicator of unit of time range PDT4.11 19 4 uint Forecast time in units defined by previous octet PDT4.11 23 1 CT4.5 Type of first fixed surface PDT4.11 24 5 scfloat First fixed surface PDT4.11 29 1 CT4.5 Type of second fixed surface PDT4.11 30 5 scfloat Second fixed surface PDT4.11 35 1 CT4.6 Type of ensemble forecast PDT4.11 36 1 uint Perturbation number PDT4.11 37 1 uint Number of forecasts in ensemble PDT4.11 38 7 YMDHMS Time of end of overall time interval PDT4.11 45=N 1 uint Number of time range specifications describing the time intervals used to calculate the statistically processed field PDT4.11 46 4 uint Total number of data values missing in statistical process PDT4.11 - [N] loop Statistical processes PDT4.11 50 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.11 51 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.11 52 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.11 53 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.11 57 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.11 58 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.11 - - endloop - # PDT4.12 10=C 1 CT4.1/[D] Parameter category PDT4.12 11 1 CT4.2/[D],[C] Parameter number PDT4.12 12 1 CT4.3 Type of generating process PDT4.12 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.12 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.12 15 2 uint Hours after reference time of data cut-off PDT4.12 17 1 uint Minutes after reference time of data cut-off PDT4.12 18 1 CT4.4 Indicator of unit of time range PDT4.12 19 4 uint Forecast time in units defined by previous octet PDT4.12 23 1 CT4.5 Type of first fixed surface PDT4.12 24 5 scfloat First fixed surface PDT4.12 29 1 CT4.5 Type of second fixed surface PDT4.12 30 5 scfloat Second fixed surface PDT4.12 35 1 CT4.7 Derived forecast PDT4.12 36 1 uint Number of forecasts in ensemble PDT4.12 37 7 YMDHMS Time of end of overall time interval PDT4.12 44=N 1 uint Number of time range specifications describing the time intervals used to calculate the statistically processed field PDT4.12 45 4 uint Total number of data values missing in statistical process PDT4.12 - [N] loop Statistical processes PDT4.12 49 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.12 50 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.12 51 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.12 52 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.12 56 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.12 57 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.12 - - endloop - # PDT4.60 10=C 1 CT4.1/[D] Parameter category PDT4.60 11 1 CT4.2/[D],[C] Parameter number PDT4.60 12 1 CT4.3 Type of generating process PDT4.60 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.60 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.60 15 2 uint Hours after reference time of data cut-off PDT4.60 17 1 uint Minutes after reference time of data cut-off PDT4.60 18 1 CT4.4 Indicator of unit of time range PDT4.60 19 4 uint Forecast time in units defined by octet 18 PDT4.60 23 1 CT4.5 Type of first fixed surface PDT4.60 24 5 scfloat First fixed surface PDT4.60 29 1 CT4.5 Type of second fixed surface PDT4.60 30 5 scfloat Second fixed surface PDT4.60 35 1 CT4.6 Type of ensemble forecast PDT4.60 36 1 uint Perturbation number PDT4.60 37 1 uint Number of forecasts in ensemble PDT4.60 38 7 YMDHMS Date of Model Version # PDT4.61 11=C 1 CT4.1/[D] Parameter category PDT4.61 11 1 CT4.2/[D],[C] Parameter number PDT4.61 12 1 CT4.3 Type of generating process PDT4.61 13 1 CT4.L1/[GC],[GS] Background generating process identifier PDT4.61 14 1 CT4.L2/[GC],[GS] Analysis or forecast generating process identifier PDT4.61 15 2 uint Hours after reference time of data cut-off PDT4.61 17 1 uint Minutes after reference time of data cut-off PDT4.61 18 1 CT4.4 Indicator of unit of time range PDT4.61 19 4 uint Forecast time in units defined by octet 18 PDT4.61 23 1 CT4.5 Type of first fixed surface PDT4.61 24 5 scfloat First fixed surface PDT4.61 29 1 CT4.5 Type of second fixed surface PDT4.61 31 5 scfloat Second fixed surface PDT4.61 35 1 CT4.6 Type of ensemble forecast PDT4.61 36 1 uint Perturbation number PDT4.61 37 1 uint Number of forecasts in ensemble PDT4.61 38 7 YMDHMS Date of Model Version PDT4.61 45 7 YMDHMS End of overall time interval PDT4.61 52=n 1 uint Number of time range specifications describing the time intervals used to calculate the statistically-processed field PDT4.61 53 4 uint Total number of data values missing in statistical process PDT4.61 - [n] loop Statistical processes PDT4.61 57 1 CT4.10 Statistical process used to calculate the processed field from the field at each time increment during the time range PDT4.61 58 1 CT4.11 Type of time increment between successive fields used in the statistical processing PDT4.61 59 1 CT4.4 Indicator of unit of time for time range over which statistical processing is done PDT4.61 60 4 uint Length of the time range over which statistical processing isd one, in units defined by the previous octet PDT4.61 64 1 CT4.4 Indicator of unit of time for the increment between the successive fields used PDT4.61 65 4 uint Time increment between successive fields, in units defined by the previous octet PDT4.61 - - endloop - # DRT5.0 12=R 4 float Reference value DRT5.0 16=E 2 sint Binary scale factor DRT5.0 18=Ds 2 sint Decimal scale factor DRT5.0 20=Nb 1 uint Number of bits used for each packed value for simple packing, or for each group reference value for complex packing or spatial differencing DRT5.0 21 1 CT5.1 Type of original field values DRT5.40 12=R 4 float Reference value DRT5.40 16=E 2 sint Binary scale factor DRT5.40 18=Ds 2 sint Decimal scale factor DRT5.40 20=Nb 1 uint Number of bits required to hold the resulting and referenced data values (i.e. depth of the grayscale image) DRT5.40 21 1 CT5.1 Type of original field values DRT5.40 22 1 CT5.40 Type of compression used DRT5.40 23 1 uint Target compression ratio, M:1 (with respect to the bit-depth specified in octet 20), when octet 22 indicates lossy compression. Otherwise, set to missing. #tab subkey key unit desc :CT0.0 - 0 - Meteorological products :CT0.0 - 1 - Hydrological products :CT0.0 - 2 - Land surface products :CT0.0 - 3 - Space products :CT0.0 - 10 - Oceanographic products :CCT11 - 7 - US National Weather Service NCEP :CCT11 - 8 - US National Weather Service NWSTG :CCT11 - 9 - US National Weather Service - Other :CCT11 - 34 - Tokyo (RSMC), Japan Meteorological Agency :CCT11 - 98 - European Centre for Medium Range Weather Forecasts (ECMWF) (RSMC) :CCT1 - 34 - Tokyo (RSMC), Japan Meteorological Agency :CCT1b 34 0 - No sub-centre :CCT1b 34 207 - Syowa :CCT1b 34 240 - Kiyose :CCT1b 34 241 - Reanalysis Team :CT1.0 - 0 - Experimental :CT1.0 - 1 - Version implemented on 7 November 2001 :CT1.0 - 2 - Version implemented on 4 November 2003 :CT1.0 - 3 - Version implemented on 2 November 2005 :CT1.0 - 4 - Version implemented on 7 November 2007 :CT1.0 - 5 - Version implemented on 4 November 2009 :CT1.0 - 6 - Version implemented on 15 September 2010 :CT1.0 - 7 - Version implemented on 4 May 2011 :CT1.0 - 8 - Version implemented on 2 November 2011 :CT1.0 - 9 - Version implemented on 2 May 2012 :CT1.0 - 10 - Version implemented on 7 November 2012 :CT1.0 - 11 - Pre-operational (after 7 November 2012) :CT1.1 - 0 - Local tables not used. Only table entries and templates from the current master table are valid :CT1.1 - 1 - (JMA) local table version 1 :CT1.2 - 0 - Analysis :CT1.2 - 1 - Start of forecast :CT1.2 - 2 - Verifying time of forecast :CT1.2 - 3 - Observation time :CT1.3 - 0 - Operational products :CT1.3 - 6 - Sub-seasonal to seasonal prediction project :CT1.3 - 7 - Sub-seasonal to seasonal prediction project test :CT1.4 - 0 - Analysis products :CT1.4 - 1 - Forecast products :CT1.4 - 2 - Analysis and forecast products :CT1.4 - 3 - Control forecast products :CT1.4 - 4 - Perturbed forecast products :CT1.4 - 5 - Control and perturbed forecast products :CT1.4 - 6 - Processed satellite observations :CT1.4 - 7 - Processed radar observations :CT1.4 - 8 - Event probability :CT3.0 - 0 - Specified in Code table 3.1 :CT3.0 - 1 - Predetermined grid definition :CT3.0 - 255 - A grid definition does not apply to this product :CT3.1 - 0 - Latitude/longitude :CT3.1 - 1 - Rotated latitude/longuitude :CT3.1 - 20 - Polar stereographic projection :CT3.1 - 40 - Gaussian latitude/longitude :CT3.2 - 0 - Earth assumed spherical with radius = 6 367 470.0 m :CT3.2 - 1 - Earth assumed spherical with radius specified (in m) by data producer :CT3.2 - 6 - Earth assumed spherical with radius of 6 371 229.0 m :CT4.0 - 0 - Analysis or forecast at a horizontal level or in a horizontal layer at a point in time :CT4.0 - 1 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time :CT4.0 - 8 - Average, accumulation, extreme values or other statistically processed values at a horizontal level or horizontal layer at a continuous or non-continuous time interval :CT4.0 - 9 - Probability forecasts at a horizontal level or in a horizontal layer in a continuous or noncontinuous time interval :CT4.0 - 10 - Percentile forecasts at a horizontal level or in a horizontal layer in a continuous or noncontinuous time interval :CT4.0 - 11 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or noncontinuous interval :CT4.0 - 12 - Derived forecast based on all ensemble members at a horizontal level or in a horizontal layer in a continuous or noncontinuous interval :CT4.0 - 60 - Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time :CT4.0 - 61 - Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer ina a continuous or non-continuous time interval :CT4.1 0 0 - Temperature :CT4.2 0,0 0 K Temperature :CT4.2 0,0 1 K Virtual temperature :CT4.2 0,0 2 K Potential temperature :CT4.2 0,0 3 K Pseudo-adiabatic potential temperature or equivalent potential temperature :CT4.2 0,0 4 K Maximum temperature :CT4.2 0,0 5 K Minimum temperature :CT4.2 0,0 6 K Dew-point temperature :CT4.2 0,0 7 K Dew-point depression (or deficit) :CT4.2 0,0 8 K.m-1 Lapse rate :CT4.2 0,0 9 K Temperature anomaly :CT4.2 0,0 10 W.m-2 Latent heat flux :CT4.2 0,0 11 W.m-2 Sensible heat flux :CT4.2 0,0 12 K Heat index :CT4.2 0,0 13 K Wind chill factor :CT4.2 0,0 14 K Minimum dew-point depression :CT4.2 0,0 15 K Virtual potential temperature :CT4.2 0,0 16 W.m-2 Snow phase change heat flux :CT4.2 0,0 17 K Skin temperature :CT4.1 0 1 - Moisture :CT4.2 0,1 0 kg.kg-1 Specific humidity :CT4.2 0,1 1 % Relative humidity :CT4.2 0,1 2 kg.kg-1 Humidity mixing ratio :CT4.2 0,1 3 kg.m-2 Precipitable water :CT4.2 0,1 4 Pa Vapour pressure :CT4.2 0,1 5 Pa Saturation deficit :CT4.2 0,1 6 kg.m-2 Evaporation :CT4.2 0,1 7 kg.m-2.s-1 Precipitation rate :CT4.2 0,1 8 kg.m-2 Total precipitation :CT4.2 0,1 22 kg.kg-1 Cloud mixing ratio :CT4.2 0,1 52 kg.m-2.s-1 Total precipitation rate :CT4.2 0,1 210 mm.day-1 (JMA) Daily mean precipitation rate :CT4.2 0,1 211 mm.day-1 (JMA) Daily mean precipitation rate anomaly :CT4.1 0 2 - Momentum :CT4.2 0,2 2 m.s-1 u-component of wind :CT4.2 0,2 3 m.s-1 v-component of wind :CT4.2 0,2 8 Pa.s-1 Vertical velocity (pressure) :CT4.2 0,2 25 s-1 Vertical wind shear :CT4.2 0,2 210 m.s-1 (JMA) u-component of wind anomaly :CT4.2 0,2 211 m.s-1 (JMA) v-component of wind anomaly :CT4.1 0 3 - Mass :CT4.2 0,3 0 Pa Pressure :CT4.2 0,3 1 Pa Pressure reduced to MSL :CT4.2 0,3 5 gpm Geopotential height :CT4.2 0,3 6 m Geometric height :CT4.2 0,3 8 Pa Pressure anomaly :CT4.2 0,3 9 gpm Geopotential height anomaly :CT4.1 0 6 - Cloud :CT4.2 0,6 0 kg.m-2 Cloud ice :CT4.2 0,6 1 % Total cloud cover :CT4.2 0,6 2 % Convective cloud cover :CT4.2 0,6 3 % Low cloud cover :CT4.2 0,6 4 % Medium cloud cover :CT4.2 0,6 5 % High cloud cover :CT4.1 0 19 - Physical atmospheric properties :CT4.2 0,19 2 % Thunderstorm probability :CT4.1 0 191 - Miscellaneous :CT4.2 0,191 192 CTJMA4.9 (JMA) Weather :CT4.1 1 0 - Hydrology basic products :CT4.1 2 0 - Vegetation/biomass :CT4.1 2 1 - Agri-aquacultural special products :CT4.1 2 2 - Transportation-related products :CT4.1 2 3 - Soil products :CT4.1 2 4 - Fire weather products :CT4.1 10 0 - Waves :CT4.2 10,0 0 - Wave spectra (1) :CT4.2 10,0 1 - Wave spectra (2) :CT4.2 10,0 2 - Wave spectra (3) :CT4.2 10,0 3 m Significant height of combined wind waves and swell :CT4.2 10,0 4 degree true Direction of wind waves :CT4.2 10,0 5 m Significant height of wind waves :CT4.2 10,0 6 s Mean period of wind waves :CT4.2 10,0 7 degree true Direction of swell waves :CT4.2 10,0 8 m Significant height of swell waves :CT4.2 10,0 9 s Mean period of swell waves :CT4.2 10,0 10 degree true Primary wave direction :CT4.2 10,0 11 s Primary wave mean period :CT4.2 10,0 12 degree true Secondary wave direction :CT4.2 10,0 13 s Secondary wave mean period :CT4.2 10,0 14 degree true Direction of combined wind waves and swell :CT4.2 10,0 15 s Mean period of combined wind waves and swell :CT4.1 10 1 - Currents :CT4.1 10 2 - Ice :CT4.1 10 3 - Surface properties :CT4.2 10,3 0 K Water temperature :CT4.2 10,3 1 m Deviation of sea level from mean :CT4.2 10,3 192 K (JMA) Water temperature anomaly :CT4.1 10 4 - Sub-surface properties :CT4.1 10 191 - Miscellaneous :CT4.3 - 0 - Analysis :CT4.3 - 1 - Initialization :CT4.3 - 2 - Forecast :CT4.3 - 3 - Bias corrected forecast :CT4.3 - 4 - Ensemble forecast :CT4.3 - 5 - Probability forecast :CT4.3 - 6 - Forecast error :CT4.3 - 7 - Analysis error :CT4.3 - 8 - Observation :CT4.3 - 9 - Climatological :CT4.3 - 10 - Probability-weighted forecast :CT4.3 - 11 - Bias-corrected ensemble forecast :CT4.4 - 0 - Minute :CT4.4 - 1 - Hour :CT4.4 - 2 - Day :CT4.4 - 3 - Month :CT4.4 - 4 - Year :CT4.4 - 5 - Decade (10 years) :CT4.4 - 6 - Normal (30 years) :CT4.4 - 7 - Century (100 years) :CT4.4 - 10 - 3 hours :CT4.4 - 11 - 6 hours :CT4.4 - 12 - 12 hours :CT4.4 - 13 - Second :CT4.4 - 255 - Missing :CT4.5 - 1 - Ground or water surface :CT4.5 - 100 Pa Isobaric surface :CT4.5 - 101 - Mean sea level :CT4.5 - 103 m Specified height level above ground :CT4.5 - 105 - Hybrid level :CT4.5 - 255 - Missing :CT4.6 - 0 - Unperturbed high-resolution control forecast :CT4.6 - 1 - Unperturbed low-resolution control forecast :CT4.6 - 2 - Negatively perturbed forecast :CT4.6 - 3 - Positively perturbed forecast :CT4.6 - 4 - Multi-model forecast :CT4.6 - 255 - Missing :CT4.7 - 0 - Unweighted mean of all members :CT4.7 - 1 - Weighted mean of all members :CT4.7 - 2 - Standard deviation with respect to cluster mean :CT4.7 - 3 - Standard deviation with respect to cluster mean, normalized :CT4.7 - 4 - Spread of all members :CT4.7 - 5 - Large anomaly index of all members :CT4.7 - 6 - Unweighted mean of the cluster members :CT4.7 - 7 - Interquartile range (range between the 25th and 75th quantile) :CT4.7 - 8 - Minimum of all ensemble members :CT4.7 - 9 - Maximum of all ensemble members :CT4.9 - 0 - Probability of event below lower limit :CT4.9 - 1 - Probability of event above upper limit :CT4.9 - 2 - Probability of event between lower and upper limits (the range includes the lower limit but not the upper limit) :CT4.9 - 3 - Probability of event above lower limit :CT4.9 - 4 - Probability of event below upper limit :CT4.10 - 0 - Average :CT4.10 - 1 - Accumulation :CT4.10 - 2 - Maximum :CT4.10 - 3 - Minimum :CT4.10 - 4 - Difference (value at the end of time range minus value at the beginning) :CT4.10 - 5 - Root mean square :CT4.10 - 6 - Standard deviation :CT4.10 - 7 - Covariance (temporal variance) :CT4.10 - 8 - Difference (value at the start of time range minus value at the end) :CT4.10 - 9 - Ratio :CT4.10 - 10 - Standardized anomaly :CT4.10 - 192 - (JMA) Estimate :CT4.10 - 193 - (JMA) Number of samples :CT4.10 - 194 - (JMA) Maximum of difference :CT4.10 - 195 - (JMA) Maximum of variability inside horizontal grid cell :CT4.10 - 196 - (JMA) Representative value :CT4.10 - 255 - Missing :CT4.11 - 2 - Successive times processed have same start time of forecast, forecast time is incremented :CT4.11 - 255 - Missing # NCEP :CT4.L1 7,4 255 - # JMA :CT4.L1 34,0 2 - Global forecast model :CT4.L1 34,0 11 - One-week ensemble model (GSM0103_T106L40) :CT4.L1 34,0 12 - One-week ensemble model :CT4.L1 34,0 31 - Mesoscale model :CT4.L1 34,0 51 - Hourly analysis :CT4.L1 34,0 101 - One-month ensemble model (GSM0603C_TL159L40) :CT4.L1 34,0 102 - One-month ensemble model :CT4.L1 34,0 130 - Seasonal ensemble model (GSM0103_T63L40) :CT4.L1 34,0 131 - Seasonal ensemble model (GSM0502C_TL95L40) :CT4.L1 34,0 132 - Seasonal ensemble model :CT4.L1 34,0 150 - Very short range forecast model :CT4.L1 34,0 151 - Precipitation nowcasting :CT4.L1 34,0 153 - Tornado risk nowcasting :CT4.L1 34,0 154 - Thunder risk nowcasting :CT4.L1 34,0 160 - Landslide risk joho :CT4.L1 34,0 201 - JMA radar product :CT4.L1 34,0 202 - Integrated radar product :CT4.L1 34,0 210 - Sea surface temperature analysis :CT4.L1 34,0 220 - Global wave model :CT4.L1 34,0 221 - Coastal wave model :CT4.L1 34,0 222 - Local wave model :CT4.L1 34,0 225 - Storm surge model :CT4.L1 34,0 226 - Astronomic tide model :CT4.L1 34,0 250 - Aerosol model (yellow sand) :CT4.L1 34,0 251 - Chemical transport model :CT4.L1 34,0 252 - Ultraviolet irradiation model :CT4.L1 34,255 2 - Global forecast model :CT4.L1 34,255 11 - One-week ensemble model (GSM0103_T106L40) :CT4.L1 34,255 12 - One-week ensemble model :CT4.L1 34,255 31 - Mesoscale model :CT4.L1 34,255 51 - Hourly analysis :CT4.L1 34,255 101 - One-month ensemble model (GSM0603C_TL159L40) :CT4.L1 34,255 102 - One-month ensemble model :CT4.L1 34,255 130 - Seasonal ensemble model (GSM0103_T63L40) :CT4.L1 34,255 131 - Seasonal ensemble model (GSM0502C_TL95L40) :CT4.L1 34,255 132 - Seasonal ensemble model :CT4.L1 34,255 150 - Very short range forecast model :CT4.L1 34,255 151 - Precipitation nowcasting :CT4.L1 34,255 153 - Tornado risk nowcasting :CT4.L1 34,255 154 - Thunder risk nowcasting :CT4.L1 34,255 160 - Landslide risk joho :CT4.L1 34,255 201 - JMA radar product :CT4.L1 34,255 202 - Integrated radar product :CT4.L1 34,255 210 - Sea surface temperature analysis :CT4.L1 34,255 220 - Global wave model :CT4.L1 34,255 221 - Coastal wave model :CT4.L1 34,255 222 - Local wave model :CT4.L1 34,255 225 - Storm surge model :CT4.L1 34,255 226 - Astronomic tide model :CT4.L1 34,255 250 - Aerosol model (yellow sand) :CT4.L1 34,255 251 - Chemical transport model :CT4.L1 34,255 252 - Ultraviolet irradiation model :CT4.L1 98,0 255 - Missing # NCEP :CT4.L2 7,4 84 - # JMA :CT4.L2 34,0 40 - Guidance to the background generating process :CT4.L2 34,0 255 - Missing (see background generating process) :CT4.L2 34,255 40 - Guidance to the background generating process :CT4.L2 34,255 255 - Missing (see background generating process) :CT4.L2 98,0 142 - ecmwf process i don't know :CTJMA4.9 - 1 - Clear or partly cloudy :CTJMA4.9 - 2 - Cloudy :CTJMA4.9 - 3 - Rain :CTJMA4.9 - 4 - Rain or snow :CTJMA4.9 - 5 - Snow :CTJMA4.9 - 255 - Missing :CT5.0 - 0 - Grid point data - simple packing :CT5.0 - 40 - Grid point data - JPEG 2000 code stream format :CT5.1 - 0 - Floating point :CT5.1 - 1 - Integer :CT5.40 - 0 - Lossless :CT5.40 - 1 - Lossy :CT5.40 - 255 - Missing :CT6.0 - 0 - A bit map applies to this product and is specified in this Section :CT6.0 - 254 - A bit map defined previously in the same "GRIB" message applies to this product :CT6.0 - 255 - A bit map does not apply to this product #tab subkey key value desc :FT3.3 3 0 - i direction increments not given :FT3.3 3 1 - i direction increments given :FT3.3 4 0 - j direction increments not given :FT3.3 4 1 - j direction increments given :FT3.3 5 0 - Resolved u- and v-components of vector quantities relative to easterly and northerly directions :FT3.3 5 1 - Resolved u- and v-components of vector quantities relative to the defined grind in the direction of increasing x and y (or i and j) coordinates, respectively :FT3.4 1 0 - Points of first row or column scan in the +i (+x) direction :FT3.4 1 1 - Points of first row or column scan in the -i (-x) direction :FT3.4 2 0 - Points of first row or column scan in the -j (-y) direction :FT3.4 2 1 - Points of first row or column scan in the +j (+y) direction :FT3.4 3 0 - Adjacent points in i (x) direction are consecutive :FT3.4 3 1 - Adjacent points in j (y) direction are consecutive :FT3.4 4 0 - All rows scan in the same direction :FT3.4 4 1 - Adjacent rows scans in the opposite direction # under validation :FT3.4 5 0 - Points within adjacent rows are not staggered :FT3.4 5 1 - Points within adjacent rows are staggered according to Bit 6 :FT3.4 6 0 /[.5] Points within even rows are offset by +0.5 in i (x) direction :FT3.4 6 1 /[.5] Points within even rows are offset by -0.5 in i (x) direction :FT3.4 7 0 - All rows have same number of data points :FT3.4 7 1 - Adjacent rows have different numbers of data points according to Bit 8 :FT3.4 8 0 /[.7] Odd rows contain Ni-1 data points :FT3.4 8 1 /[.7] Even rows contain Ni-1 data points # :FT3.5 1 0 - North pole is in the projection plane :FT3.5 1 1 - South pole is in the projection plane :FT3.5 2 0 - Only one projection centre is used :FT3.5 2 1 - Projection is bipolar and symmetric # IDS1 1 4 !GRIB Magick number "GRIB" IDS1 5 3 uint Total length of GRIB message (icnluding Section 0) IDS1 8 1 uint GRIB edition number (currently 1) PDS1 1 3 uint Length of section PDS1 4 1 uint GRIB tables Version No PDS1 5=Ctr 1 CCT1 Originating centre PDS1 6 1 uint Generating process identification number PDS1 7 1 uint Grid definition PDS1 8 1 FT1 Flag PDS1 9 1 CT2 Indicator of parameter PDS1 10=CT3 1 CT3 Indicator of type of level PDS1 11 2 !lv/CT3 Height, pressure, etc. of levels PDS1 13=TR 5 yMDHM Reference time of data - date and time of start of averaging or accumulation period PDS1 18 1 CT4 Indicator of unit of time range PDS1 19=P1 1 uint P1: period of time PDS1 20=P2 1 uint P2: period of time or time interval PDS1 21 1 !ft/P1/P2/CT5 Time range indicator PDS1 22=N 2 uint Number included in calculation when octet 21 refers to a statistical process, such as average or accumulation; otherwise set to zero PDS1 24 1 uint Number missing from calculation in case of statistical process PDS1 25 1 !ct/TR Century of reference time of data PDS1 26 1 CCT1b/[Ctr] Sub-centre identification PDS1 27=D 2 uint Units decimal scale factor PDX001 41 1 CTecX ECMWF local GRIB use definition identifier :CTecX - 1 - MARS labeling or ensemble forecast data PDX001 42 1 CTecC {ECMWF} GRIB Class :CTecC - 1 - od: Operational archive :CTecC - 3 - er: REANALYSE :CTecC - 5 - e4: REANALYSE40 :CTecC - 14 - ei: ERA Interim PDX001 43 1 CTecT {ECMWF} GRIB Type :CTecT - 1 - fg: First guess :CTecT - 2 - an: Analysis :CTecT - 6 - 4v: 4d variational analysis :CTecT - 9 - fc: Forecast :CTecT - 10 - cf: Control forecast :CTecT - 11 - pf: Perturbed forecast PDX001 44 2 CTecS {ECMWF} GRIB Stream :CTecS - 1025 - oper: Atmospheric model :CTecS - 1054 - rjtd: Tokyo PDX001 46 4 !GRIB {ECMWF} Version number or experiment identifier PDX001 50 1 uint perturbation number PDX001 51 1 uint number of forecast in ensemble GDS1 1 3 uint Length of section (octets) GDS1 4=NV 1 uint Number of vertical coordinate parameters GDS1 5=PV 1 uint Location of the list of vertical coorditate parameters, if present, or location of the list of numbers of points in each row GDS1 6=DR 1 uint Data representation type GDS1 7 - >GD[DR] Grid definition template GD0 7=Ni 2 uint Number of points along a parallel GD0 9=Nj 2 uint Number of points along a meridian GD0 11=La1 3 sint Latitude of first grid point GD0 14=Lo1 3 sint Longitude of first grid point GD0 17 1 FT7 Resolution and component flags GD0 18=La2 3 sint Latitude of last grid point GD0 21=Lo2 3 sint Longitude of last grid point GD0 24=Di 2 uint i Direction increment GD0 26=Dj 2 uint j Direction increment GD0 28=Sc 1 FT8 Scanning mode GD0 29 4 - Set to zero (reservred) #-- GD0 - [NV] loop List of vertical coordinate parameter GD0 33 4 uint vertical coordinate parameter GD0 - - endloop - GD0 - [Ni!Nj] loop List of numbers of points in each row GD0 33 2 uint Numbers of points in each row GD0 - - endloop - # GD10 7=Ni 2 uint Number of points along a parallel GD10 9=Nj 2 uint Number of points along a meridian GD10 11=La1 3 sint Latitude of first grid point GD10 14=Lo1 3 sint Longitude of first grid point GD10 17 1 FT7 Resolution and component flags GD10 18=La2 3 sint Latitude of last grid point GD10 21=Lo2 3 sint Longitude of last grid point GD10 24=Di 2 uint i Direction increment GD10 26=Dj 2 uint j Direction increment GD10 28=Sc 1 FT8 Scanning mode GD10 29 4 - Set to zero (reservred) GD10 33 3 sint Latitude of the southern pole in millidegrees GD10 36 3 sint Longitude of the southern pole in millidegrees GD10 39 4 mfloat Angle of rotation # GD30 7=Ni 2 uint Number of points along a parallel GD30 9=Nj 2 uint Number of points along a meridian GD30 11=La1 3 sint Latitude of first grid point GD30 14=Lo1 3 sint Longitude of first grid point GD30 17 1 FT7 Resolution and component flags GD30 18=La2 3 sint Latitude of last grid point GD30 21=Lo2 3 sint Longitude of last grid point GD30 24=Di 2 uint i Direction increment GD30 26=Dj 2 uint j Direction increment GD30 28=Sc 1 FT8 Scanning mode GD30 29 4 - Set to zero (reservred) GD30 33 3 sint Latitude of the southern pole in millidegrees GD30 36 3 sint Longitude of the southern pole in millidegrees GD30 39 4 mfloat Angle of rotation GD30 43 3 sint Latitude of pole of stretching GD30 46 3 sint Longitude of pole of stretching GD30 49 4 mfloat Stretching factor ## BMS1 1 3 uint Length of section BDS1 1 3 uint Length of section BDS1 4 1 FT11 Flag BDS1 5=E 2 sint Scale factor BDS1 7 4 mfloat Reference value BDS1 11 1 uint Number of bits containing each packed data # :FT1 1 0 - Section 2 omitted :FT1 1 1 - Section 2 included :FT1 2 0 - Section 3 omitted :FT1 2 1 - Section 3 included :CT2 - 2 Pa Pressure reduced to MSL :CT2 - 7 gpm Geopotential height :CT2 - 11 K Temperature :CT2 - 17 K Dew-point temperature :CT2 - 18 K Dew-point depression (or deficit) :CT2 - 33 m.s-1 u-component of wind :CT2 - 34 m.s-1 v-component of wind :CT2 - 35 m2.s-1 Stream function :CT2 - 36 m2.s-1 Velocity potential :CT2 - 39 Pa.s-1 Vertical velocity :CT2 - 43 s-1 Relative vorticity :CT2 - 44 s-1 Relative divergence :CT2 - 51 kg.kg-1 Specific humidity :CT2 - 52 % Relative humidity :CT2 - 61 kg.m-2 Total precipitation :CT2 - 71 % Total cloud cover :CT2 - 221 kg.kg-1 {JRA} Cloud water content :CT2 - 222 K.day-1 {JRA} Advective heating ratio :CT2 - 228 kg.kg-1 {JRA} Cloud liquid water content :CT2 - 229 kg.kg-1 {JRA} Cloud ice water content :CT2 - 237 mg.kg-1 {JRA} Ozone mixing ratio :CT3 - 1 - Ground or water surface :CT3 - 100 hPa Isobaric surface :CT3 - 102 - Mean sea level :CT4 - 0 - Minute :CT4 - 1 - Hour :CT4 - 2 - Day :CT4 - 3 - Month :CT4 - 4 - Year :CT4 - 5 - Decade :CT4 - 6 - Normal (30 years) :CT4 - 7 - Century :CT4 - 10 - 3 hours :CT4 - 11 - 6 hours :CT4 - 12 - 12 hours :CT4 - 13 - 15 minutes :CT4 - 14 - 30 minutes :CT4 - 254 - Second :CT5 - 0 - Forecast product valid for reference time + P1 (P1 > 0), or Uninitialized analysis product for reference time (P1=0), or Image product for reference time (P1=0) :CT5 - 4 - Accumulation (reference time + P1 to reference time + P2) product considered valid at reference time + P2 :CT5 - 51 - Climatological mean value for N years and P2 date range, either continuous average (P1=0) or for fixed time of the day (P1=1) :FT7 1 0 - Direction increments not given :FT7 1 1 - Direction increments given :FT7 2 0 - Earth assumed sperical with radius 6367.47 km :FT7 2 1 - Earth assumed oblate spheroidal with size as determined by IAU in 1965 (6378.160 km, 6356.775 km, f = 1/297.0) :FT7 5 0 - Resolved u- and v-components of vector quantities relative to easterly and northerly directions :FT7 5 1 - Resolved u- and v-components of vector quantities relative to the defined grid in the direction of increasing x and y (or i and j) coordinates respectively :FT8 1 0 - Points scan in +i direction :FT8 1 1 - Points scan in -i direction :FT8 2 0 - Points scan in -j direction :FT8 2 1 - Points scan in +j direction :FT8 3 0 - Adjacent points in i direction are consecutive :FT8 3 1 - Adjacent points in j direction are consecutive :FT11 1 0 - Grid-point data :FT11 1 1 - Spherical harmonic coefficients :FT11 2 0 - Simple pakcing :FT11 2 1 - Complex or second-order packing :FT11 3 0 - Floating point values (in the original data) are represented :FT11 3 1 - Integer values (in the original data) are represented :FT11 4 0 - No additional flags at octet 14 :FT11 4 1 - Octet 14 contains additional flags bits