Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleClick here to see solution...

To use grib_dump to all of the keys for the fourth message in JSON mode, use the -j option:

No Format
$> grib_dump -j -w count=4 t2m.grib1 > t2m.grib1.output

$> head -20 t2m.grib1.output
{ "messages" : [
  [

    {
      "key" : "editionNumber",
      "value" : 1
    },
    {
      "key" : "table2Version",
      "value" : 128
    },
    {
      "key" : "centre",
      "value" : 98
    },
    {
      "key" : "generatingProcessIdentifier",
      "value" : 147
    },
    {

Similarly, for t2m.grib2:

No Format
$> grib_dump -j -w count=4 t2m.grib2 > t2m.grib2.output

$> head -20 t2m.grib1.output
{ "messages" : [
  [

    {
      "key" : "discipline",
      "value" : 0
    },
    {
      "key" : "editionNumber",
      "value" : 2
    },
    {
      "key" : "centre",
      "value" : 98
    },
    {
      "key" : "subCentre",
      "value" : 0
    },
    {


...


Info
iconfalse

Using grib_ls to find values at the nearest grid point to a specified latitude-longitude point

...