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

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



Paul,

Thanks for sending us the data file. As far as we can tell, this bug only 
manifests itself when displaying the formula as "Contour Plan View". If you 
choose another display option, say Color-Shaded Plan View, then you should be 
able to display your data without that error message.

For the contour plan view, we did indeed find a minor bug here. Please download 
the nightly version of the IDV 
http://www.unidata.ucar.edu/downloads/idv/nightly/index.jsp tomorrow and give 
it a try. You may have to play around with the contour settings to get a 
display you are happy with.

Please keep us up-to-date on your progress.

Best Wishes,

Unidata IDV Support

> Dear IDV Support,
> 
> Thanks for your reply regarding the IDV error I encountered when attempting
> to add two different 4d fields together.  I have uploaded a sample grib2
> data file which I was using when the error occurred.
> 
> I have been working on a field for tornado prediction and was experimenting
> with adding two different fields, such as CAPE and Storm Relative Helicity,
> together when the NullPointerException occurred in the following simple
> Jython function:
> 
> def addFields(F1,F2):
> return add(noUnit(F1),noUnit(F2))
> 
> I hope the file I uploaded my assist you in finding the cause of this error.
> 
> 
> Thanks for your help.
> 
> Regards,
> 
> Paul
> 
> 
> On 31 August 2013 03:05, Unidata IDV Support
> <address@hidden>wrote:
> 
> > 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
> >
> >
> 
> 
> --
> Paul Graham
> Email: address@hidden
> Mobile: 0403003784
> 
> 


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


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.