Changeset 2220
- Timestamp:
- 01/03/07 09:38:51 (14 years ago)
- Location:
- TI02-CSML/trunk/csml/API
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/csml/API/genSubset.py
r2208 r2220 214 214 timeSelection=[] 215 215 216 times=_getTimes(timeSelection, timeName,domain) 217 216 times=_getTimes(timeSelection, timeName,domain) 218 217 219 218 return pathToSubsetNetCDF, kwargs, timeAxis,timeName, calunits, caltype, times -
TI02-CSML/trunk/csml/API/ops_FileExtract.py
r2215 r2220 3 3 import sys 4 4 import Numeric 5 import MA 5 6 6 7 … … 14 15 15 16 def setup(self): 16 self.dataArray=Numeric.array(self.data) 17 18 #try: 19 #self.dataArray=self.data.tolist() 20 #except: 21 #self.dataArray=self.data 17 #print self.data 18 #print type(self.data) 19 #self.dataArray=Numeric.array(self.data) 20 try: 21 self.dataArray=Numeric.array(self.data) 22 except MA.MA.MAError: 23 self.dataArray=self.data.tolist() 24 self.dataArray=Numeric.array(self.dataArray) 22 25 23 26 print 24 27 25 28 def testmethod(self): … … 34 37 #file position defines the position of the filename if a list of filenames exists 35 38 #**kwargs can hold subsetting request. 36 #print fileposition37 #print self.fileName38 39 39 #get the right file ##TO DO< check this is ok with FILE LIST 40 40 if fileposition is not None: -
TI02-CSML/trunk/csml/API/ops_GridSeriesFeature.py
r2211 r2220 97 97 subsettedFeature=csmlWrap.createGridSeriesFeature(value=cvg,parameter=param,featureID=self.id,description=self.description) 98 98 99 100 99 ### write netcdf using NCWriter class (wraps cdms) ### 101 100 nc=csml.csmllibs.netCDFWriter.NCwriter(pathToSubsetNetCDF) … … 106 105 nc.genWriteVar(self.id,ords, times, calunits, caltype, axislist, units, fulldata, fillvalue) 107 106 nc.closeFinishedFile() 108 107 print 'NetCDF file written to %s'%pathToSubsetNetCDF 109 108 return subsettedFeature, pathToSubsetNetCDF 110 109
Note: See TracChangeset
for help on using the changeset viewer.