Ticket #329 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

API needs to cope with multiple time steps in one NetCDF input file

Reported by: astephen Owned by: domlowe
Priority: required Milestone: PreBeta
Component: CSML Version:
Keywords: CSML Cc:


If you scan the file:


Then when you try and subset it using similar calls to apicalls.py you get an error. Tracked it down to:


69 for time in self.times: 70 listPosition=domainreft?.split().index(time) 71 strTimes= strTimes + ' ' + time 72 for comp in self.rangeSet.aggregatedArray.component: 73 data=comp.getData(fileposition=listPosition, kwargs) 74 self.files.append(comp.fileName.split()[listPosition]) 75 if fulldata ==[]: 76 fulldata = data.tolist() 77 else: 78 for item in data.tolist(): 79 fulldata.append(item)

The deepest loop is appending the whole array again even though already got it once.

Change History

comment:1 Changed 14 years ago by domlowe

  • Status changed from new to assigned

There's a more general issue here too.

In the CSML how do we relate the list of times in the rangeSet to the list of filenames? I've assumed a 1:1 relationship (time:filename) for now (which is why the above error occurs). But we need to consider what other patterns are acceptable and whether the relationship needs encoding explicity in CSML or whether we can just have a useable convention.

comment:2 Changed 14 years ago by domlowe

  • Status changed from assigned to closed
  • Resolution set to fixed

This 1:1 relationship is no longer assumed, and it should work okay in CSML 2.

Note: See TracTickets for help on using tickets.