-
Notifications
You must be signed in to change notification settings - Fork 283
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
Correct handling of NetCDF VerticalPerspective and Geostationary coordinate systems #3406
Conversation
Still needs a What's New |
@@ -44,6 +45,10 @@ | |||
|
|||
|
|||
class Test_write(tests.IrisTest): | |||
# ------------------------------------------------------------------------- | |||
# It is not considered necessary to have integration tests for saving |
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.
This refers to integration tests, but this is in iris/tests/unit . Can these still be described as integration tests?
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.
You're right, I hadn't considered how oddly this reads. But the tests below (e.g. test_mercator) definitely don't fit the definition of unit test in my opinion since NetCDF saving relies on a large number of steps. Could you suggest a better word than integration, which still makes it clear that these aren't unit tests?
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.
Taking a very narrow view, just omit the word "integration" : job done!
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.
Yeah, having read through the tests I think I agree that these are closer to integration tests than unit tests. If you want to avoid confusion, it could be worth considering just getting rid of the word "integration", though I'm more convinced now that this ought to be be fine as is.
* :class:`iris.coord_systems.VerticalPerspective` coordinate system now uses | ||
the `CF Vertical perspective definition <http://cfconventions | ||
.org/cf-conventions/cf-conventions.html#vertical-perspective>`_; had been | ||
erroneously using Geostationary. |
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.
Should this not be a bug fix rather?
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.
👍
lib/iris/coord_systems.py
Outdated
@@ -645,6 +639,104 @@ def as_cartopy_projection(self): | |||
return self.as_cartopy_crs() | |||
|
|||
|
|||
class Geostationary(CoordSystem): | |||
""" | |||
An geostationary satellite image map projection. |
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.
An geostationary
-> A geostationary
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.
Without reading I copied from vertical perspective, which had been copied without reading from another coord system, so I managed to double the error! I feel appropriately ashamed 😖
lib/iris/coord_systems.py
Outdated
@@ -553,7 +555,7 @@ def as_cartopy_projection(self): | |||
|
|||
class VerticalPerspective(CoordSystem): | |||
""" | |||
An geostationary satellite image map projection. | |||
An vertical/near-side perspective satellite image map projection. |
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.
An vertical..
-> A vertical
lib/iris/coord_systems.py
Outdated
@@ -563,7 +565,7 @@ def __init__(self, latitude_of_projection_origin, | |||
longitude_of_projection_origin, perspective_point_height, | |||
false_easting=0, false_northing=0, ellipsoid=None): | |||
""" | |||
Constructs an Vertical Perspective Geostationary coord system. | |||
Constructs an Vertical Perspective coord system. |
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.
an
-> a
Needs rebase. Can you do @trexfeathers ? |
…system, in line with cf conventions documentation.
…Perspective and Geostationary
…tical Perspective coordinate system.
ad080a9
to
bbd7d14
Compare
Note that an Iris Geostationary coordinate system will only successfully plot using Cartopy >=0.17 |
Addresses #3382