SciTools/iris — pull request #1166 by ocefpaf (2014-06-06 14:19:34+00:00)
Title: Ocean sigma coordinate

Hi iris devs,

This PR is not really a PR and I apologize in advance for submitting this horrible hack. It is actually an attempt to learn a little bit about iris internals.

I started looking into how iris loads dimensionless ocean coordinates mentioned by @rsignell-usgs in #762, and I would like to ask for some feedback/help on how to do this properly.

The first question I have is regarding the `iris.aux_factory.AuxFactory`: ocean sigma, stretch and its variants are somehow derived from one another (where one being a specific or general case of the other). I am wondering if having a `Ocean{z-coord}Factory` for each is the best model? Maybe a general `OceanFactory` would be simpler? What do you think?

Here I tried to copy @bjlittle logic from #1105 and create a `OceanSigmaFactory`. Things seems to be working, but I have not create any real test that should go along with a PR. This [notebook](http://nbviewer.ipython.org/urls/gist.githubusercontent.com/ocefpaf/f9923fac1a25f69e0966/raw/4bf594b691461d6f7e94041d49168c93daf4966b/ocean_sigma.ipynb) shows that it seems to be working.

Another question is regarding the sigma units: iris checks if sigma is dimensionless, but I usually see ncfiles with `sigma_level` for `sigma` units. I disabled that check in my PR, but I think it should go back. Just don't know how.

Thanks for the attention and thanks for iris! Hopefully we will see all [Ocean Dimensionless Vertical Coordinates](http://nbviewer.ipython.org/urls/gist.githubusercontent.com/ocefpaf/f9923fac1a25f69e0966/raw/c18a90891ac52ba27194061449ac6e766449ccc2/dimensionless_z_coords.ipynb) into iris soon :smile: