Fix to automatic deriving of units when saving in netcdf format#1943
Merged
marqh merged 1 commit intoSciTools:masterfrom Feb 19, 2016
Merged
Conversation
Member
|
please add a what's new contribution for this change |
| # TODO: Use #61 to get the units. | ||
| if isinstance(coord.coord_system, iris.coord_systems.GeogCS): | ||
| if "latitude" in coord.standard_name: | ||
| if ((isinstance(coord.coord_system, iris.coord_systems.GeogCS) or |
Member
There was a problem hiding this comment.
perhaps an in-line comment here would help a little. I would suggest
Set the 'units' of 'latitude' and 'longitude' coordinates specified in 'degrees' to 'degrees_north' and 'degrees_east' respectively, as defined in the CF conventions for netCDF files: sections 4.1 and 4.2.
Member
|
looking good @djkirkham I think this is ready to be adopted please may you squish the commits? |
… or 'degree_north' in netcdf files. Remove other unsafe unit changes
a8adac8 to
4460482
Compare
Member
|
excellent, thanks @djkirkham |
marqh
added a commit
that referenced
this pull request
Feb 19, 2016
…aving Fix to automatic deriving of units when saving in netcdf format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make coords with standard name 'latitude' and 'longitude' which have no coordsystem to be saved with units 'degree_north' and 'degree_east' respectively in netcdf files. Remove other unsafe unit changes.
Change some unit test expected output to recognise these changes.