Skip to content
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

Closed
wants to merge 4 commits into from
Closed

CF coord systems #52

wants to merge 4 commits into from

Conversation

bblay
Copy link
Contributor

@bblay bblay commented Aug 21, 2012

Fixes #45

@bblay
Copy link
Contributor Author

bblay commented Aug 21, 2012

Not sure about introducing a default ellipsoid. We might not be saving the same thing as we loaded...

@bblay
Copy link
Contributor Author

bblay commented Aug 21, 2012

One outstanding doctest failure:
From surface_altitude: Cell(point=399.625, bound=(-14.0, 813.25)) m
to surface_altitude: Cell(point=399.625, bound=(-14.000001, 813.25)) m
under investigation.

Looks like a str() vs repr() but not sure how that could be happening yet.

@bblay bblay mentioned this pull request Aug 22, 2012
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')
Copy link
Member

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))"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ridiculously long lines!

@bblay
Copy link
Contributor Author

bblay commented Aug 31, 2012

Um, don't know why esc24's commit is in that list...?
Perhaps a rebase debase.

@rhattersley
Copy link
Member

The history on your branch has gone bananas. Please try again!

It's showing Ed's commit 923dd25 as being on your branch:

> git log --graph --oneline -6
* 4ac7ff3 test results
* 4aa3301 review actions and immediate after effects - pre tests passing
* 71dbaa4 CF coord systems (without results)
* 923dd25 Deprecation of Coord.cos() and Coord.sin(). Equivalent private functi
*   613b497 Merge pull request #39 from bjlittle/convert_source_history
|\  
| * 674e0e6 Convert source from coord to attribute. Fixes #10
|/  

Whereas on master it's in its own branch (which has already been merged).

> git log --graph --oneline -9 upstream/master 
*   97d7cd0 Merge pull request #56 from bblay/plotdocerr
|\  
| * 3c2b9d9 review action
| * 565d526 fixed typo
* |   04699fc Merge pull request #60 from bblay/guessaxis
|\ \  
| * | 4c8bb9c removed and working
|/ /  
* |   8ce3767 Merge pull request #55 from bblay/mathdoctypo
|\ \  
| |/  
|/|   
| * 00064bb fixed the typo
|/  
*   2fad310 Merge pull request #24 from esc24/trig_refactor
|\  
| * b7344c1 Deprecation of Coord.cos() and Coord.sin(). Equivalent private functions added to calculus.py where they are used.

@bblay
Copy link
Contributor Author

bblay commented Sep 3, 2012

Replaced with #65, which has a fresh commit history.

@bblay bblay closed this Sep 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert coord-systems to CF
3 participants