...
For data in GRIB1 format the earth model is a sphere with radius = 6367.47 km, as defined in the WMO GRIB Edition 1 specifications, Table 7, GDS Octet 17
For data in GRIB2 format the earth model is a sphere with radius = 6371.2290 km, as defined in the WMO GRIB2 specifications, section 2.2.1, Code Table 3.2, Code figure 6.
...