Versions Compared

Key

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


Excerpt
hiddentrue

Let's say you want your message to use the product definition template 40 (The full list is defined in Code table 4.0):


Info

This article relates to GRIB edition 2

Step-by-step guide

Let's say you want your message to use the product definition template 40 (The full list is defined in Code table 4.0):

Code Block
% grib_set -s productDefinitionTemplateNumber=40 input.grib2 output.grib2

Now you can do a "grib_dump -O" to inspect the section 4 (Product definition section) of the output.grib2 file to see the new key "constituentType" (For other templates you will see other keys added).

Of course you can also set any key which belongs to this product via this command. Let's say we want the new product as well as the Ozone constituent type:

Code Block
% grib_set -s productDefinitionTemplateNumber=40,constituentType=1 input.grib2 output.grib2

Here we've done two things in one command:

  • First choose the right product template. This will give birth to the key "constituentType".
  • Then change the constituent type from the default (0) to 1 (=Ozone)

Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("kb-how-to-article","eccodes-faqs","grib","grib_set","template") and label in ("grib","grib2","grib_set") and type = "page" and space = "UDOC"
labelskb-how-to-article