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.


My ansatz for what cyl means is likely Equidistant Cylindrical Projection, because in the older Basemap module, 'cyl' was the shortname for that projection.

But the reality is that since the GFS is a global spectral model with a latitude-longitude grid, it likely does not require a CRS. That is, it presupposes a sphere, where a CRS projects the spherical coordinates (latitude, longitude) onto a shape (such as a cone).

  • $\begingroup$ @BaroclinicCplusplus Isn't GFS a spectral model ? $\endgroup$ – gansub Jun 25 '20 at 1:26
  • 1
    $\begingroup$ @gansub Yes, but a spectral model just describes how a model is solved, not necessarily the CRS of the model. Although it is easier to on a global latitude/longitude grid, there are a few regional spectral models, such as the RSM or ALADIN which use Fourier and/or Legendre transforms. The latter of those models, for example, uses a Mercator or Lambert Conformal projection (umr-cnrm.fr/gmapdoc/IMG/pdf/ykarpbasics46t1r1.pdf) $\endgroup$ – BarocliniCplusplus Jun 25 '20 at 17:57
  • $\begingroup$ @BaroncliniCplussplus So my Proj string should be "+proj='eqc' +R=6371229" where eqc is Equidistant Cylindrical (Plate Carrée) and R is the radius of the sphere (the given a and b, the major and minor axis of the underlying ellipse, are equal)? $\endgroup$ – Lance Berc Jun 26 '20 at 18:37
  • $\begingroup$ @LanceBerc If that is what you want, sure. But the choice of projection is moot. A CRS tries to project a field on a sphere as if it were on a geometrical object, say a cylinder. The projection of the map matters if the model has a projection. But since the GFS doesn't have a projection, then really no projection matters. It is entirely your choice. All of this to say, for the GFS, your choice in map will only alter what the map looks like, not how the data looks on the map. $\endgroup$ – BarocliniCplusplus Jun 26 '20 at 19:15
  • 1
    $\begingroup$ @BarocliniCplusplus I see what you mean. But since I'm using pyproj.Transformer.from_crs() to transform Lon/Lat to x/y it wants a source CRS; Plate Carrée seems to be a good choice. Thank you. $\endgroup$ – Lance Berc Jun 26 '20 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.