-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing keys for GDT10 Mercator #446
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than tiny query -- LGTM
@@ -776,10 +776,35 @@ def grid_definition_template_10(section, metadata): | |||
# intersects the Earth | |||
standard_parallel = section["LaD"] * _GRID_ACCURACY_IN_DEGREES | |||
|
|||
if "orientationOfTheGrid" in section and not np.isclose( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the need for "if ... in section" here -- have I misunderstood something ?
By my understanding, if gdt is 10 then this key should always be present, though it may have missing/None value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the same, but some of my tests failed so I had to add 44437da . Of course I suppose there is a chance that it is present but also None
...
if not ( | ||
np.isclose(section["longitudeOfLastGridPoint"], final_x_point) | ||
and np.isclose(section["latitudeOfLastGridPoint"], final_y_point) | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Experiments so far have produced many cases where this block is true, which makes me worried I need an extra factor in here like scaling or units or something. That's why I changed the PR back to draft.
Closes #188