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

[IDV #IAA-701481]: barnes on mutiple data sources



Hi Tyn-

I added a new method to PointObFactory:

extractParameter(obs, param)

where param is the name of the parameter you want to extract
from the two datasets.  So, you could call that after you
make the TimeSeries and then merge the single parameter fields:

def myBarnes(fieldSourceOne,fieldSourceTwo,param):
from ucar.unidata.data.point.PointObFactory import *
from visad import RealType
a = fieldSourceOne
b = fieldSourceTwo
t = RealType.getRealType(param)
if (GridUtil.isTimeSequence(fieldSourceOne) == 0):
a = makeTimeSequenceOfPointObs(fieldSourceOne)
a = extractParameter(a,t)
if (GridUtil.isTimeSequence(fieldSourceTwo) == 0):
b = makeTimeSequenceOfPointObs(fieldSourceTwo)
b = extractParameter(a,t)
field = mergeData(a,b)
t = RealType.getRealType(param)
return barnes(field,t,0.1,0.1,2)


The parameter would have to have the same name in both.  You can
use either the string name or the realtype as I did above.   Essentially
the string version just calls the other with RealType.getRealType(param).

Let me know if this doesn't work for you.  It's in last night's build.

Don

> -----Original Message-----
> From: Unidata IDV Support [mailto:address@hidden]
> Sent: Monday, July 14, 2008 8:48 PM
> To: Valentijn Venus
> Cc: address@hidden
> Subject: [IDV #IAA-701481]: barnes on mutiple data sources
> 
> Hi Tyn-
> 
> > Full Name: Valentijn Venus
> > Email Address: address@hidden
> > Organization: ITC
> > Package Version: 2.6a2 build date:2008-07-14 07:06 UTC Operating
> > System: Windows XP
> > Hardware: Java: home: C:\Program Files\Java\jre1.7.0 version: 1.7.0-ea
> 
> > j3d:1.3.2 fcs (build12) Description of problem: Hi Jeff-
> >
> > can u help me preparing a barnes jython function that can use both the
> 
> > METAR and the SYNOPTIC ADDE point data server simultanous?
> >
> > Is this the rigth funtion to use?
> >
> > https://www.unidata.ucar.edu/software/idv/docs/javadoc/ucar/unidata/da
> > ta/point/PointObFactory.html#mergeData(java.util.List)
> 
> Theoretically, yes.  However, the two datasets have different parameters
> and the mergeData function assumes each field to have the same
> parameters.  At this point, there's no easy way to extract out one
> parameter from the time sequences.
> 
> Looking at the current code, it's not an easy fix to be able to do it at
> the barnes level.  I've got to do some work on this over the next few
> months.
> I'll look into allowing one to merge datasets.
> 
> Don
> 
> > def myBarnes(fieldSourceOne,fieldSourceTwo,param):
> > from ucar.unidata.data.point.PointObFactory import * from visad import
> 
> > RealType a = fieldSourceOne b = fieldSourceTwo if
> > (GridUtil.isTimeSequence(fieldSourceOne) == 0):
> > a = makeTimeSequenceOfPointObs(fieldSourceOne)
> > if (GridUtil.isTimeSequence(fieldSourceTwo) == 0):
> > b = makeTimeSequenceOfPointObs(fieldSourceTwo)
> > field = mergeData(a,b)
> > t = RealType.getRealType(param)
> > return barnes(field,t,0.1,0.1,2)
> 
> 
> Ticket Details
> ===================
> Ticket ID: IAA-701481
> Department: Support IDV
> Priority: Normal
> Status: Open
> 
> International Institute for Geo-Information Science and Earth Observation 
> (ITC)
> Chamber of Commerce: 410 27 560
> 
> E-mail disclaimer
> The information in this e-mail, including any attachments, is intended for 
> the addressee only. If you are not the intended recipient, you are hereby 
> notified that any disclosure, copying, distribution or action in relation to 
> the content of this information is strictly prohibited. If you have received 
> this e-mail by mistake, please delete the message and any attachment and 
> inform the sender by return e-mail. ITC accepts no liability for any error or 
> omission in the message content or for damage of any kind that may arise as a 
> result of e-mail transmission.
> 
> 


Ticket Details
===================
Ticket ID: IAA-701481
Department: Support IDV
Priority: Normal
Status: Open