Changeset 3022


Ignore:
Timestamp:
19/11/07 13:49:00 (12 years ago)
Author:
domlowe
Message:

pointseries subsetting workign in WCS, ragged section part working

Location:
TI02-CSML/trunk/csml/API
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/API/__init__.py

    r3013 r3022  
    4343 
    4444 
    45 operationsMap={csml.parser.Dataset:ops_Dataset, csml.parser.FileExtract:ops_FileExtract, csml.parser.RawFileExtract: ops_RawFileExtract, csml.parser.AbstractFeature:ops_AbstractFeature, csml.parser.GridSeriesFeature:ops_GridSeriesFeature, csml.parser.GridFeature:ops_GridFeature, csml.parser.PointSeriesFeature:ops_PointSeriesFeature, csml.parser.PointSeriesFeature:ops_PointSeriesFeature,csml.parser.ProfileSeriesFeature:ops_ProfileSeriesFeature,csml.parser.TrajectoryFeature:ops_TrajectoryFeature, csml.parser.RaggedSectionFeature:ops_RaggedSectionFeature} 
     45operationsMap={csml.parser.Dataset:ops_Dataset, csml.parser.FileExtract:ops_FileExtract, csml.parser.RawFileExtract: ops_RawFileExtract, csml.parser.AbstractFeature:ops_AbstractFeature, csml.parser.GridSeriesFeature:ops_GridSeriesFeature, csml.parser.GridFeature:ops_GridFeature, csml.parser.PointSeriesFeature:ops_PointSeriesFeature,csml.parser.ProfileSeriesFeature:ops_ProfileSeriesFeature,csml.parser.TrajectoryFeature:ops_TrajectoryFeature, csml.parser.RaggedSectionFeature:ops_RaggedSectionFeature} 
    4646 
    4747 
  • TI02-CSML/trunk/csml/API/ops_PointSeriesFeature.py

    r3013 r3022  
    2222 
    2323    return self.domain     
     24    
     25def getLongitudeAxis(self): 
     26    return 'longitude' #dummy value not used, subsetting is by time only 
    2427 
     28def getLatitudeAxis(self): 
     29    return 'latitude' #dummy value not used,  subsetting is by time only 
    2530 
     31def getTimeAxis(self): 
     32    return 'times' 
    2633     
    2734def subsetToPointSeries(self, outputdir=None, ncname='pointseries.nc' ,times=None): 
     
    7380     
    7481    fileList=[] 
    75     for f in self.value.rangeSet.arrayDescriptor.components.fileList.fileNames.CONTENT.split(): 
     82    if hasattr(self.value.rangeSet, 'valueArray'): 
     83        fextract=self.value.rangeSet.valueArray.valueComponent.insertedExtract.components 
     84        uom = self.value.rangeSet.valueArray.valueComponent.insertedExtract.uom 
     85    else: 
     86        fextract=self.value.rangeSet.arrayDescriptor.components 
     87        uom = self.value.rangeSet.arrayDescriptor.uom 
     88    for f in fextract.fileList.fileNames.CONTENT.split(): 
    7689        fileList.append(f) 
    7790     
    78     fextract=self.value.rangeSet.arrayDescriptor.components 
    79     uom = self.value.rangeSet.arrayDescriptor.uom 
    8091    data, fillvalue=fextract.getDataFromChunks(minIndex, maxIndex) 
    8192     
  • TI02-CSML/trunk/csml/API/ops_RaggedSectionFeature.py

    r3013 r3022  
    4141            valList.append(eval(val))             
    4242        self.domain[name]=valList     
    43         self._depths=valList 
    44         self._depthname=name 
     43    self._depths=self.domain[name] 
     44    self._depthname=name 
    4545             
    4646    return self.domain 
     
    134134    var.setAxis(0,timeAx)       
    135135     
    136     depthAx=cdms.createAxis(Numeric.arrayrange(maxlen)) 
    137     depthAx.id='depth' 
     136    depthAx=cdms.createAxis(self._depths) 
     137    depthAx.id=self._depthname 
    138138    #timeAx.units=tbase   
    139139    var.setAxis(1,depthAx)       
Note: See TracChangeset for help on using the changeset viewer.