Skip to main content
added 151 characters in body
Source Link

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 that GFS GRIB files wereuses 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.

The same codegrib.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.7 and reprojects data accurately.

What is the proper Proj string for GFS GRIBs?

I assumed that GFS GRIB files were 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.

The same code 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.7.

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.

Source Link

What CRS does GFS use?

What is the proper Proj string for GFS GRIBs?

I assumed that GFS GRIB files were 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.

The same code 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.7.