Skip to content

Conversation

@frazane
Copy link
Contributor

@frazane frazane commented Feb 2, 2026

When indexing GRIB files using the anemoi-datasets grib-index, it might occur that the program fails due to duplicated messages even though they are not really duplicates. This occurs for instance with soil variables, where by default values for level are interpreted as integers which leads to values such as 0.01, 0.004, etc. to all be decoded as "0".

To solve this, one needs to use the key:type syntax to decode a key in a specific type, e.g. level:d. However, this leads to another error because SQLite does not support column names that contain colons.

As a simple fix, the proposed solution (and one that is recommended by Mistral AI) is to quote the columns.

Extra: since I noticed the "grid definition" support was missing from this source (it's on other GRIB-based sources), I allowed myself to include this change as well, since it's small and should not impact the rest.


By opening this pull request, I affirm that all authors agree to the Contributor License Agreement.

@frazane frazane marked this pull request as ready for review February 5, 2026 18:55
@frazane frazane force-pushed the fix/grib-index-float-values branch from 4899c7b to 61f3e84 Compare February 5, 2026 19:00
@frazane
Copy link
Contributor Author

frazane commented Feb 5, 2026

Since I noticed the "grid definition" support was missing from this source (it's on other GRIB-based sources), I allowed myself to include this change as well. It's small and should not impact the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: To be triaged

Development

Successfully merging this pull request may close these issues.

1 participant