This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Full Name: Francisco Ferri > Email Address: address@hidden > Organization: Museo Nacional de Ciencias Naturales > Package Version: 2.9u3 build date:2011-01-14 00:05 UTC > Operating System: Windows XP > Hardware: Java: home: C:\Program Files\IDV_2.9u3\jre version: 1.6.0_20 > j3d:1.5.2 fcs (build4) > Description of problem: > > Creating display: Image Display > visad.UnitException: visad.UnitException > org.python.core.PyException > > When a formula uses two parameters from different Netcdf files, formula > invariably crashes. When you used two different parameters with different unit in the formula, you need to make sure units of two variables are meaningful to the IDV. I am guessing this is the cause of your problem. For example in the formula a + b, if a is temperature with unit K, and b is pressure with unit Pa, and the IDV will throw unit exception. The solution is to call the formula inside the formula to change the unit, a + b will be noUnit(a) + noUnit(b), the noUnit formula will remove the unit of a, and b. Let me know if you need further help. Yuan > > ****************** > Stack trace: > Traceback (innermost last): > File "<string>", line 1, in ? > at visad.RealType.binary(RealType.java:473) > > at visad.FunctionType.binary(FunctionType.java:270) > > at visad.FunctionType.binary(FunctionType.java:270) > > at visad.DataImpl.binary(DataImpl.java:138) > > at visad.DataImpl.add(DataImpl.java:179) > > at visad.DataImpl.__add__(DataImpl.java:1393) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > > visad.UnitException: visad.UnitException > > > Ticket Details =================== Ticket ID: JKV-615810 Department: Support IDV Priority: Normal Status: Closed