Drop use of shapeOfTheEarth for Grib 1 #316
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #241
A more detailed summary is on that issue, in this comment but to summarise:
In eccodes v2.19.0 the default shapeOfTheEarth was changed to 0, with a radius of 6367470 m. This alligned the behaviour with GRIB2. It was also recommended to not use this key and instead use the radius key.
Previously, for backwards compatibility, we decided to circumvent this change and hardcode a value of 6 and associate this with the old radius rather than the new radius.
We have now decided to adopt the change in eccodes. This means we should also not use the shapeOfTheEarth key.
We could use the radius key instead but this assumes a spherical Earth. I think it would make more sense to use the resolutionAndComponentFlag which distinguishes between a spherical Earth and an oblate spheroidal Earth.
I have added support for a spherical Earth, but not an oblate spheroidal Earth, as this would mean adding new functionality. We could consider adding support for oblate spheroidal later should someone request it.