ValueError: Invalid units: sigma must be dimensionless.

39 views
Skip to first unread message

Jack Yu

unread,
Feb 12, 2015, 3:44:46 AM2/12/15
to scitoo...@googlegroups.com
Hi, 
I got an error when trying to load an netCDF file using iris.load().  It looks like this:

http://nbviewer.ipython.org/gist/qAp/212122b92a881ef30216/iris_test.ipynb

I am not very familiar with the CF conventions and suspected that it was because different variables have different dimensions, or because some created dimensions do not have a corresponding variable.  However, this does not seem to be the case.

Has anyone seen this before or know what might be the cause?

Thanks

Filipe Pires Alvarenga Fernandes

unread,
Feb 12, 2015, 6:38:10 AM2/12/15
to Jack Yu, scitoo...@googlegroups.com
Hi Jack,

What version of iris are you using?  There were a few changes on how iris deals with dimensionless units that might help your case.

1) Units "no units" now are treated are dimensionless:

2) The `aux_factory` now it issues a warning instead of raising a ValueError:

The second will not guarantee that the Auxiliary Coordinate will be automatically built!  But you will be able to get the data cube, slice it be "sigma" or even build the z-coord yourself.

-Filipe

--
You received this message because you are subscribed to the Google Groups "Iris" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scitools-iri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jack Yu

unread,
Feb 12, 2015, 8:36:21 PM2/12/15
to scitoo...@googlegroups.com, lla...@gmail.com
Hi Felipe,
The version is 1.7.4-DEV
In [1]: import iris

In [2]: iris.__version__
Out[2]: '1.7.4-DEV'

In [3]:

Is this the version you referred to?

Filipe Pires Alvarenga Fernandes

unread,
Mar 2, 2015, 10:21:53 AM3/2/15
to Jack Yu, scitoo...@googlegroups.com
Hi Jack,

I was the changes I mentioned went towards iris 1.8.0-DEV and your 1.7.4-DEV will not work.  See the notebook below:


Hope that helps,

-Filipe

On Sun, Mar 1, 2015 at 10:36 PM, Jack Yu <lla...@gmail.com> wrote:
Hi Felipe,

Let me know if you want the data to be shared some other way.

Thanks


On Mon, Feb 16, 2015 at 7:25 PM, Filipe Pires Alvarenga Fernandes <oce...@gmail.com> wrote:
On Thu, Feb 12, 2015 at 10:36 PM, Jack Yu <lla...@gmail.com> wrote:
Hi Felipe,
The version is 1.7.4-DEV
In [1]: import iris

In [2]: iris.__version__
Out[2]: '1.7.4-DEV'

In [3]:

Is this the version you referred to?
 
Yes, you should have everything I mentioned in that release.  Not sure about what might be happening there.

Can you make a small sample of that data available online so we can test it?

-Filipe
Reply all
Reply to author
Forward
0 new messages