Ignore:
Timestamp:
31/03/08 14:52:45 (12 years ago)
Author:
domlowe
Message:

Added Ag's file cache code to DataInterface?. The Data Interface is read only

File:
1 edited

Legend:

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

    r3584 r3704  
    99import csml.csmllibs.csmlcrs 
    1010import csmlutils 
     11import os 
    1112 
    1213def testmethod(self): 
     
    350351 
    351352    odir=outputdir 
    352     profileSeries, pSfile, descriptor=self.subsetToProfileSeries(odir, ncname, **kwargs)    
     353    tmpfile= csml.csmllibs.csmlextra.getRandomID()+'.nc' 
     354    profileSeries, pSfile, descriptor=self.subsetToProfileSeries(odir, tmpfile, **kwargs)    
    353355    del kwargs['latitude']    #TODO - need to remove excess kwargs based on the domain of the temporary profileSeries feature 
    354356    del kwargs['longitude'] 
    355357    subsettedFeature, pathToSubsetNetCDF, descriptor =profileSeries.subsetToProfile(odir,ncname, **kwargs)     
     358    tmpfile=odir + '/' + tmpfile 
     359    os.remove(tmpfile) 
    356360    return subsettedFeature, pathToSubsetNetCDF, descriptor 
    357361 
     
    364368    @param kwargs:      subset selection by axis name. 
    365369    @return:     subsettedFeature (PointSeriesFeature instance)  pathToSubsetNetCDF (filepath), descriptor (array descriptor instance)''' 
    366      
    367     profileSeries, pSfile, descriptor =self.subsetToProfileSeries(outputdir, ncname, **kwargs)    
     370    tmpfile= csml.csmllibs.csmlextra.getRandomID()+'.nc' 
     371    profileSeries, pSfile, descriptor =self.subsetToProfileSeries(outputdir, tmpfile, **kwargs)    
    368372    del kwargs['latitude']    #TODO - need to remove excess kwargs based on the domain of the temporary profileSeries feature 
    369373    del kwargs['longitude'] 
    370374    subsettedFeature, pathToSubsetNetCDF, descriptor=profileSeries.subsetToPointSeries(outputdir, ncname, **kwargs)     
     375    tmpfile=outputdir + '/' + tmpfile 
     376    os.remove(tmpfile) 
    371377    return subsettedFeature, pathToSubsetNetCDF, descriptor 
Note: See TracChangeset for help on using the changeset viewer.