question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No latitudes/longitudes provided by ecCodes for gridType

See original GitHub issue

cfgrib relies on the ECMWF ecCodes C-library for encoding and decoding the GRIB format, including everything related to the coordinate systems. GRIB files encoded in a gridType not supported by the installed ecCodes version will print the warning: No latitudes/longitudes provided by ecCodes for gridType.

The GRIB file will be opened but the geographic portion of the data will be represented by as single dimension without coordinate named values.

For example:

>>> cfgrib.open_dataset('../ST4.2018080204.01h')
No latitudes/longitudes provided by ecCodes for gridType = 'polar_stereographic'
<xarray.Dataset>
Dimensions:     (values: 987601)
Coordinates:
    time        datetime64[ns] ...
    step        timedelta64[ns] ...
    surface     int64 ...
    valid_time  datetime64[ns] ...
Dimensions without coordinates: values
Data variables:
    tp          (values) float32 ...
Attributes:
    GRIB_edition:            1
    GRIB_centre:             kwbc
    GRIB_centreDescription:  US National Weather Service - NCEP 
    GRIB_subCentre:          4
    history:                 GRIB to CDM+CF via cfgrib-0.9.../ecCodes-2.8...

The list of known supported gridTypes is:

  • latitude and longitude as dimension coordinates
    • regular_ll
    • regular_gg
  • xand y as dimensions and latitude and longitude as non-dimension coordinates
    • rotated_ll
    • rotated_gg
    • lambert
    • lambert_azimuthal_equal_area
    • albers
    • polar_stereographic (ecCodes > 2.9.0)
  • values as dimension and latitude and longitude as non-dimension coordinates
    • reduced_ll
    • reduced_gg
    • unstructured_grid

see http://xarray.pydata.org/en/stable/data-structures.html#coordinates for details on xarray naming conventions.

Initially noted in #27.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
alexamicicommented, Jan 8, 2020

@marcowurth you can add backend_kwargs={'errors': 'ignore'} to your xr.open_dataset call to have all errore silenced, e.g.:

>>> xr.open_dataset('dwd.grib', engine='cfgrib', backend_kwargs={'errors': 'ignore'})
0reactions
shahramncommented, Mar 31, 2021

@winash12 Apologies. I am using the ecCodes command line tools to decode these ICON files.

The sample file you mentioned (igfff00000000) doesn’t seem to have any lat/lon info. None of its parameters are using the parameter category 191 which gives you “Geographical latitude” and “Geographical longitude”. In the ICON files I had seen before, there were two GRIB messages providing those values.

So for this one I’m afraid you would have to contact the data provider

Read more comments on GitHub >

github_iconTop Results From Across the Web

GRIB Keys - ECMWF Confluence Wiki
ecCodes uses a key / value approach to access the information in a GRIB message. numberOfPointsAlongAParallel → Number of points along a ...
Read more >
which grid types are supported - ecCodes GRIB FAQ
Reduced latitude/longitude; Reduced Gaussian; Lambert conformal; Lambert azimuthal equal area; Polar stereographic; Mercator; Space view. If the ...
Read more >
ecCodes GRIB Keys - ECMWF Confluence Wiki
conversions are provided from one type to another when possible ... The value of a key is not always coded in the GRIB...
Read more >
Online Computing Training Week 2021
the message: No latitudes/longitudes provided by ecCodes for gridType. Is there any plan to add the ability to read the Lon/lat to encodes?...
Read more >
grib_get_data - ECMWF Confluence Wiki
The missing value is given through this option. ... C style format for latitudes/longitudes. Default is "%9.3f%9.3f". -w key[:{s|d|i}]{=|!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found