[gdal-dev] How to check whether a GRIB file uses a sphere or a spheroid?

Simon (Vsevolod) Ilyushchenko simonf at google.com
Wed Mar 11 13:25:30 PDT 2015


Hi,

If I use GDAL to read GRIB files like these:
ftp://hydro1.sci.gsfc.nasa.gov/data/s4pa/NLDAS/NLDAS_NOAH0125_H.002/2015/065/NLDAS_NOAH0125_H.A20150306.1300.002.grb

the CRS I get back is:
GEOGCS["Coordinate System imported from GRIB file",
    DATUM["unknown",
        SPHEROID["Sphere",6371200,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

Plotting these files shows that they are shifted 1.5 pixels north, but
setting CRS to EPSG:4326 that uses SPHEROID["WGS 84",6378137,298.257223563
instead fixes the issue.

I'm trying to understand whether the source files incorrectly specifies
that it's a sphere, or whether the GDAL driver is wrong, but I cannot find
a GRIB reader that would show me this information about the file. What's
the best way to debug this?

Thanks,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150311/d1a30b73/attachment.html>


More information about the gdal-dev mailing list