Changeset 1330
- Timestamp:
- 26/07/06 15:00:36 (15 years ago)
- Location:
- TI02-CSML/trunk/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py
r1329 r1330 119 119 straxisValues='' 120 120 if key in kwargs: 121 for val in dc[key]: 122 if val >= kwargs[key][0]: 123 if val <= kwargs[key] [1]: 124 arraySize=arraySize+1 125 straxisValues=straxisValues+ str(val) + ', ' 126 else: # this dimension has not been subsetted 121 if kwargs[key][0] < kwargs[key][1]: 122 for val in dc[key]: 123 if val >= kwargs[key][0]: 124 if val <= kwargs[key] [1]: 125 arraySize=arraySize+1 126 straxisValues=straxisValues+ str(val) + ', ' 127 else:#this if deals with selections such as longitude (330,30) 128 for val in dc[key]: 129 if val >= kwargs[key][0]: 130 arraySize=arraySize+1 131 straxisValues=straxisValues+ str(val) + ', ' 132 for val in dc[key]: 133 if val <= kwargs[key] [1]: 134 arraySize=arraySize+1 135 straxisValues=straxisValues+ str(val) + ', ' 136 else: # this dimension has not been subsetted at all 127 137 for val in dc[key]: 128 138 arraySize=arraySize+1 … … 180 190 elif len(grid.ordinates)==2: 181 191 feature_var =ncfile.createVariable (self.id, Float,('t',axisorder[1],axisorder[2])) 192 print feature_var.shape 193 print shape(fulldata) 182 194 feature_var[:]=fulldata[:] 183 195 ncfile.close() -
TI02-CSML/trunk/parser/apicalls.py
r1329 r1330 29 29 #get the domain complement of the feature 30 30 print '\n The feature has domain complement :' 31 #print feature.getDomainComplement()31 print feature.getDomainComplement() 32 32 33 33 #get combined domain … … 45 45 46 46 spatialSubsetDictionary= {} 47 spatialSubsetDictionary['latitude']=(- 0,30.0)48 spatialSubsetDictionary['longitude']=( 90, 120.0)47 spatialSubsetDictionary['latitude']=(-90,90) 48 spatialSubsetDictionary['longitude']=(330,340) 49 49 50 50 #request subsetted data from feature (can set paths here)
Note: See TracChangeset
for help on using the changeset viewer.