...
a = read('/x/y/z/data_in_gg.grb')
pl = grib_get_long_array (a, 'pl')
print (count(pl))
print (pl)
fieldset
grib_set
( fieldset, list )
This function sets information in the given fieldset's GRIB header, automatically deducing the type from the value passed (not from the key name). The list provided as the second argument should be a set of key/value pairs, for example:
f = grib_set(f, ["date", 20150601, # integer
"time", 0600, # integer
"stepType", "avg", # string
"startStep", 0 , # integer
"endStep", 31, # integer "unitOfTimeRange", "D", # string
"longitudeOfLastGridPointInDegrees"]) 100.5 # double
fieldset
grib_set_long
( fieldset, list )
fieldset grib_set_double
( fieldset, list )
fieldset grib_set_string
( fieldset, list )
These functions set information in the given fieldset's GRIB header, and are type-specific. The list provided as the second argument should be a set of key/value pairs, for example:
...