-
Notifications
You must be signed in to change notification settings - Fork 286
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
CF coord systems #52
CF coord systems #52
Conversation
Not sure about introducing a default ellipsoid. We might not be saving the same thing as we loaded... |
One outstanding doctest failure: Looks like a str() vs repr() but not sure how that could be happening yet. |
icoord_systems.PrimeMeridian(label="Greenwich", value=0.0), | ||
n_pole=icoord_systems.GeoPosition(90, 0), reference_longitude=0.0 | ||
) | ||
lat_lon_coord_system = icoord_systems.GeogCS(6371229.0, units='m') |
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 is really a comment about the GeogCS
class/constructor. Can we ditch the units
keyword - CF mandates the radius and major/minor axes are expressed in metres. And the GeogCS constructor should probably cast to float to be on the safe side. That would give:
lat_lon_coord_system = icoord_systems.GeogCS(6371229)
self.maxDiff = None | ||
self.assertMultiLineEqual(result, repr(self.lat[:10])) | ||
|
||
def test_AuxCoord(self): | ||
result = "AuxCoord(array([-0.1278, -0.1269, -0.126 , -0.1251, -0.1242, -0.1233, -0.1224,\n -0.1215, -0.1206, -0.1197], dtype=float32), bounds=array([[-0.12825, -0.12735],\n [-0.12735, -0.12645],\n [-0.12645, -0.12555],\n [-0.12555, -0.12465],\n [-0.12465, -0.12375],\n [-0.12375, -0.12285],\n [-0.12285, -0.12195],\n [-0.12195, -0.12105],\n [-0.12105, -0.12015],\n [-0.12015, -0.11925]], dtype=float32), standard_name='grid_latitude', units=Unit('degrees'), coord_system=LatLonCS(SpheroidDatum(label='spherical', semi_major_axis=6371229.0, semi_minor_axis=6371229.0, flattening=0.0, units='m'), PrimeMeridian(label='Greenwich', value=0.0), GeoPosition(latitude=37.5, longitude=177.5), 0.0))" | ||
result = "AuxCoord(array([-0.1278, -0.1269, -0.126 , -0.1251, -0.1242, -0.1233, -0.1224,\n -0.1215, -0.1206, -0.1197], dtype=float32), bounds=array([[-0.12825, -0.12735],\n [-0.12735, -0.12645],\n [-0.12645, -0.12555],\n [-0.12555, -0.12465],\n [-0.12465, -0.12375],\n [-0.12375, -0.12285],\n [-0.12285, -0.12195],\n [-0.12195, -0.12105],\n [-0.12105, -0.12015],\n [-0.12015, -0.11925]], dtype=float32), standard_name='grid_latitude', units=Unit('degrees'), coord_system=RotatedGeogCS(semi_major_axis=6371229.0, semi_minor_axis=6371229.0, inverse_flattening=0.0, units=m, longitude_of_prime_meridian=0.0, grid_north_pole=GeoPos(37.5, 177.5), north_pole_lon=0.0))" |
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.
Ridiculously long lines!
…ons added to calculus.py where they are used.
Um, don't know why esc24's commit is in that list...? |
The history on your branch has gone bananas. Please try again! It's showing Ed's commit 923dd25 as being on your branch:
Whereas on master it's in its own branch (which has already been merged).
|
Replaced with #65, which has a fresh commit history. |
Fixes #45