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

[IDV #PRY-290340]: averageOverTime method



Hi Bill-

> Full Name: bill fingerhut
> Email Address: address@hidden
> Organization: lyndon state college
> Package Version: 2.4 build date:2007-12-20 16:34 UTC
> Operating System: Windows XP
> Hardware: Java: home: C:\Documents and Settings\waf01060\Program 
> Files\IDV_2.4\jre version: 1.5.0_11 j3d:1.3.2 fcs (build12)
> Description of problem: I am having trouble use the system library method, 
> averageOverTime, with GFS data
> from the northern hemisphere. No contours are drawn and the range is from 
> infinity to
> negative infinity.
> 
> I copied the method to my library and did some experimentation. The following 
> snipet:
> 
> for t in range(domainSet.getLength()):
> cnt=cnt+1
> rangeValue = field.getSample(t)
> print "   ",cnt,t,rangeValue[1]
> 
> confirms that a few time levels are missing. This seems to produce the 
> failure.
> 
> The following test on rangeValue[1] would work if I knew what to test for - 
> None is not
> correct.
> 
> if(cnt == 1):
> current = rangeValue;
> if(rangeValue[1] == None):
> print "      is None";
> else:
> print "      is not None"
> current = current + rangeValue;
> 
> What do you think ?

Are the timesteps completely missing or is just part of the grid missing?

The downside I see to the checking just the first point is that it could
be missing, but there could be valid points in the grid.  The RUC grids
are like this where there are NaN's along the edge.  There is a method
GridUtil.isAllMissing(grid) which checks for all missing values.  You
could call that instead of checking rangeValue[1].

However, what would you want the value to be at a point if in
one timestep it was missing, but all the other values were okay,
e.g.:

30,20,31,28,NaN,25,27

Adding those up and dividing by 7 would give you a NaN (missing).

Don

Ticket Details
===================
Ticket ID: PRY-290340
Department: Support IDV
Priority: Normal
Status: Open