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.
Hi Tyn- > Full Name: Valentijn Venus > Email Address: address@hidden > Organization: ITC > Package Version: 2.7a1 build date:2009-01-05 22:38 UTC > Operating System: Windows XP > Hardware: Java: home: C:\Program Files\Java\jre6 version: 1.6.0_12-ea > j3d:1.5.3-build2-experimental 13 Aug 2008 16:42:15 PDT > Description of problem: Hi Don, Jeff and others, > > happy wishes to you all! Same to you! > I'm preparing a function to aggregate 3-hourly fields to a daily average, and > therefore was > first attempting your makeTimeSequence, as a clone here wouldn't be the thing. > > But i keep gettin this exception: > > visad.UnitException: visad.UnitException: Set: units dimension 1 does not > match Domain dimension 2 > > See the script below, can be any 2D gridded data source to test it on makeTimeSequence take an array of single time grids of the form Time->grid and merges them all together. In your code, you are passing in an array of grids with no time. seqA is just the grid. Since the grid already has multiple times, I'm not sure what you are attempting here. Don > # Time series functions (call this jython function for image sequences) > > def getTestAlgorithmGridSeqN52(a): > import sys; > sys.add_package('visad.meteorology'); > sys.add_package('GridUtil'); > > from java.util import TimeZone > from visad import DateTime > tz = TimeZone.getTimeZone("GMT"); > > import ucar.unidata.data.grid.GridUtil as gu > if (gu.isTimeSequence(a)): > newA = a.clone() > #params = zeros(2,"d") > array = [] > for t in range(a.getDomainSet().getLength()): > seqA = a.getSample(t) > #seqB = b.getSample(t) > dateTime = gu.getDateTimeList(a).get(t) > > julianday = (int)(dateTime.formattedString("DDD", tz)) > array.append(seqA) > print "array: " > print len(array) > return makeTimeSequence(array) > else: > return getTestProductionAlgorithmGridN52(a,b,c) > > > Ticket Details =================== Ticket ID: OOS-765621 Department: Support IDV Priority: Normal Status: Open