I'm trying to reproject GRIB data from NOAA forecasts onto other data using Python and the pygrib and proj packages (among many others). What is the proper Proj string for GFS GRIBs?
The projection should come from the GRIB file and I assumed GFS uses Mercator, but pygrib grib.projparams()
returns
{'a': 6371229, 'b': 6371229, 'proj': 'cyl'}
. 'cyl' is not a legal proj CRS and other cylindrical projections (Central Cylindrical, Plate Carree) don't have a or b parameters. I assume that a & b are defining the earth as a sphere with radius 6371229m.
grib.projparams()
with an HRRR GRIB returns
{'a': 6371229, 'b': 6371229, 'proj': 'lcc', 'lon_0': 262.5, 'lat_0': 38.5, 'lat_1': 38.5, 'lat_2': 38.5}
which is perfectly legal in the eyes of Proj and reprojects data accurately.