SciTools/iris — pull request #522 by dkillick (2013-05-23 12:22:55+00:00)
Title: y-axis inversion for vertical coords

A cf attribute that can be set on vertical coordinates is 'positive', which indicates the direction in which they should be plotted to retain visual meaning. Thus positive = up indicates 0 should be plotted at the bottom of the y-axis as standard while positive = down indicates that 0 should be plotted at the top of the y-axis. This is beneficial when plotting phenomena such as air pressure or depth, both of which intuitively increase downward.

Iris plotting methods did not handle this coordinate however, which is what this PR changes. To accomplish this, I modified netcdf.py to allow the positive attribute to be added to coords on building a cube from an nc file. I then modified plot.py to pick up this attribute such that if it was found on a coordinate to be plotted then the y-axis is inverted.

I modified the tests to pass: adding a test to test_netcdf.py for the presence of positive on a dimcoord known to have it set; adding a test class to test_plot.py to test that positive = up/down are being plotted correctly; changing the cml files affected by the presence of a new attribute within a dimcoord.