-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMPRO-511 implement metadata cube saving (#538)
* Initial incorporation of metadata cube saving based on IMPRO-466/464. Some of these changes will have to be removed to avoid updating the form of difference attribute from improver-gradient * Revert changes to spatial.py and test_DifferenceBetweenAdjacentGridSquares.py pending Impro-507 / updating form_of_difference attribute. Incremented length of cubes list in test_save due to Iris 2 now saving metadata as separate cube rather than attributes on other cubes in file * Remove some print statements only used during testing * Remove superfluous comment * Correct comment typo and remove spp__form_of_difference attribute from test_save.py as per reviewers comments * Add unit test to check that metatdata prefixes cube is discarded during load * Add unit tests for append_metadata_cube functionality * inital fix to keep global attributes in netCDF file, get required global attributes from the data cubes and add them to the prefix cube * change iteritems() to items() for Python 3 compatability * Use a list of global keys as suggested by cgsandford * Pass in global_keys as an argument to append_metadata_cube so as to avoid redefining this list * Changes as per cgsandford suggestions, tests confirmed key value cannot be left as empty string * amend comments * add unit test to check global attributes added to prefix cube, revert change made to 02_basic_mean.bats used for capturing output * only use one cube in input list, compare global keys on input cube to prefix cube than rather than keys from global_keys_ref * shorten line 223 length, travis build complaining about line length of 80 characters * add check that key values are also the same in prefix and data cube * Removed redundant conversion of cubelist to be a variable of type list.
- Loading branch information
1 parent
fc48215
commit 93e01f0
Showing
4 changed files
with
168 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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