NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #DIZ-849299]: NullPointerException adding two different fields



Paul,

I belatedly read the "Adding two different 4d grids" thread on the IDV Users 
list.

I have been using your formula to add 4D fields that physically do not make 
sense (e.g., geopotential height and relative humidity) without problems in the 
IDV. The IDV/Jython seem to be handling the unit incompatibility without 
problems for the fields I am experimenting with. Again, specific examples of 
what you are trying to achieve may be helpful.

Best,

Unidata IDV Support


> Paul,
> 
> I tried your formula and was able to make it work in my scenario so we are 
> going to have to find out a bit more about what you are trying to achieve. 
> Where is the data coming from? What fields are you trying to add? You can 
> upload a data file for us to examine at 
> http://motherlode.ucar.edu/repository/alias/idvupload.
> 
> Best Wishes,
> 
> Unidata IDV Support
> 
> 
> > Full Name: Paul Graham
> > Email Address: address@hidden
> > Organization: Weathersim
> > Package Version: 4.0u1 build date:2013-03-29 18:10 UTC
> > Operating System: Mac OS X
> > Hardware: Java: home: 
> > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home version: 
> > 1.6.0_51 j3d:1.5.2 fcs (build4)
> > Description of problem:
> >
> > When attempting to add two different fields in IDV using the following
> > simple Jython method:
> >
> > def simpleAdd(F1,F2):
> > res = add(noUnit(F1),noUnit(F2))
> > return res
> >
> > The following error occurs:
> >
> > "Making the widget component
> > java.lang.NullPointerException"
> >
> >
> >
> > ******************
> > Stack trace:
> > java.lang.NullPointerException
> > at 
> > ucar.unidata.idv.control.GridDisplayControl.getDataRangeInColorUnits(GridDisplayControl.java:264)
> > at 
> > ucar.unidata.idv.control.GridDisplayControl.getInitialRange(GridDisplayControl.java:233)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.getRange(DisplayControlImpl.java:10001)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.getRangeForColorTable(DisplayControlImpl.java:10029)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.getControlWidgets(DisplayControlImpl.java:7588)
> > at 
> > ucar.unidata.idv.control.PlanViewControl.getControlWidgets(PlanViewControl.java:1543)
> > at 
> > ucar.unidata.idv.control.ContourPlanViewControl.getControlWidgets(ContourPlanViewControl.java:218)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.doMakeWidgetComponent(DisplayControlImpl.java:7483)
> > at 
> > ucar.unidata.idv.control.PlanViewControl.doMakeContents(PlanViewControl.java:1498)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.doMakeWindow(DisplayControlImpl.java:4266)
> > at 
> > ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1141)
> > at 
> > ucar.unidata.idv.ControlDescriptor.initControl(ControlDescriptor.java:986)
> > at ucar.unidata.idv.ControlDescriptor$1.run(ControlDescriptor.java:911)
> > at ucar.unidata.util.Misc$3.run(Misc.java:1249)
> >
> >
> >
> 


Ticket Details
===================
Ticket ID: DIZ-849299
Department: Support IDV
Priority: Normal
Status: Open