Ignore:
Timestamp:
06/02/07 15:43:35 (13 years ago)
Author:
domlowe
Message:

units and missing values now working properly in subsetgridseries

File:
1 edited

Legend:

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

    r2105 r2112  
    2525        name=gridOrd.coordAxisLabel.CONTENT 
    2626        if hasattr(gridOrd.coordAxisValues, '__insertedExtract'): 
    27             self.domain[name]=gridOrd.coordAxisValues.__insertedExtract.getData() 
     27            self.domain[name], fill=gridOrd.coordAxisValues.__insertedExtract.getData() 
    2828        else: 
    2929            vals=gridOrd.coordAxisValues.coordinateList.CONTENT 
     
    5959    
    6060     
    61     strTimes, axisorder, fulldata=csml.API.genSubset.getTheData(self, selection, times, timeName) 
     61    strTimes, axisorder, units, fulldata, fillvalue =csml.API.genSubset.getTheData(self, selection, times, timeName) 
    6262    
    6363     
     
    6666     
    6767    # define domain/coverage  to use in 'value' attribute    
    68     domain=csml.parser.GridSeriesDomain() 
     68    newdomain=csml.parser.GridSeriesDomain() 
    6969    domainSubset, totalArraySize=csml.API.genSubset.subsetDomain(timeName,strTimes,self.domain, **kwargs) 
    7070    cTT=csml.API.genSubset.getCoordTransformTable(domainSubset, crs) 
    71     domain.coordTransformTable=cTT 
     71    newdomain.coordTransformTable=cTT 
    7272    rangeSet=csml.parser.RangeSet() 
    7373    rangeSet.arrayDescriptor=csml.parser.NetCDFExtract(id=self.id,fileName=csml.parser.csString(pathToSubsetNetCDF),variableName=csml.parser.csString(self.id),arraySize=csml.parser.csString(totalArraySize)) 
     
    7676    cvg=csml.parser.GridSeriesCoverage() 
    7777    cvg.rangeSet=rangeSet 
    78     cvg.gridSeriesDomain=domain     
     78    cvg.gridSeriesDomain=newdomain     
    7979    csmlWrap=csml.csmllibs.csmlfeaturewrap.CSMLWrapper() 
    8080     
     
    8686    nc=csml.csmllibs.netCDFWriter.NCwriter(pathToSubsetNetCDF) 
    8787    ords=cTT.gridOrdinates 
    88     nc.genWriteVar(self.id,ords, times, calunits, caltype, axisorder, fulldata) 
     88    nc.genWriteVar(self.id,ords, times, calunits, caltype, axisorder, units, fulldata, fillvalue) 
    8989    nc.closeFinishedFile() 
    9090     
Note: See TracChangeset for help on using the changeset viewer.