I am trying to read a GRIB2 file using pygrib. I manage to open files and read data without problems, but I need to automate the process, and, unfortunately, each file contains several very similar fields:
1:Total Cloud Cover:% (avg):regular_ll:unknown:level 0 214:fcst time 0-1 hrs (avg):from 201705200000
2:Total Cloud Cover:% (avg):regular_ll:unknown:level 0 224:fcst time 0-1 hrs (avg):from 201705200000
3:Total Cloud Cover:% (avg):regular_ll:unknown:level 0 234:fcst time 0-1 hrs (avg):from 201705200000
4:Total Cloud Cover:% (avg):regular_ll:unknown:level 0 10:fcst time 0-1 hrs (avg):from 201705200000
5:Total Cloud Cover:% (instant):regular_ll:unknown:level 0 244:fcst time 1 hrs:from 201705200000
6:Total Cloud Cover:% (avg):regular_ll:unknown:level 0 211:fcst time 0-1 hrs (avg):from 201705200000
The only difference (as seen by pygrib) for this file is the field typeOfFirstFixedSurface, but I donβt know what the field is (and cannot find the relevant information on the site where I received the grib2 files). I looked through all the key / value parameters for each message and did not find any other useful information that I could use to distinguish between the fields ....
However, when using Panoply, I see much more options, for example:
float Total_cloud_cover_convective_cloud(time=1, lat=721, lon=1440);
:long_name = "Total cloud cover @ Convective cloud layer";
:units = "%";
:abbreviation = "TCDC";
:missing_value = NaNf; // float
:grid_mapping = "LatLon_Projection";
:coordinates = "reftime time lat lon ";
:Grib_Variable_Id = "VAR_0-6-1_L244";
:Grib2_Parameter = 0, 6, 1; // int
:Grib2_Parameter_Discipline = "Meteorological products";
:Grib2_Parameter_Category = "Cloud";
:Grib2_Parameter_Name = "Total cloud cover";
:Grib2_Level_Type = "Convective cloud layer";
:Grib2_Generating_Process_Type = "Forecast";
long_name Grib_Variable_Id , "" pygrib.
pygrib?