Changeset 1341
- Timestamp:
- 31/07/06 09:00:15 (13 years ago)
- Location:
- TI02-CSML/trunk/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py
r1330 r1341 59 59 else: 60 60 pathToSubsetNetCDF='temp.nc' 61 61 62 #deal with longitude requests 63 #if the request is in -ve,+ve eg (-30,30) but the data is in (0,360) need to handle this by changing the args. 64 dc = self.getDomainComplement() 65 for key in dc.keys(): 66 if key == 'longitude': #how do we test if it is longitude properly? 67 print dc[key] 68 for val in dc[key]: 69 if val < 0: 70 pass 71 else: 72 if kwargs[key][0] < 0: 73 kwargs[key]=(kwargs[key][0]+360,kwargs[key][1]) 74 if kwargs[key][1] < 0: 75 kwargs[key]=(kwargs[key][0],kwargs[key][1]+360) 76 62 77 domainref = getDomainReference(self) 63 78 self.times=timeSubset … … 104 119 domain.domainReference=Parser.TimePositionList(timePositions=strTimes) 105 120 grid=Parser.Grid() 106 dc = self.getDomainComplement()121 #dc = self.getDomainComplement() 107 122 ordinates= [] 108 123 i=0 … … 118 133 god.definesAxis=key 119 134 straxisValues='' 135 136 #now deal with each argument: 120 137 if key in kwargs: 121 138 if kwargs[key][0] < kwargs[key][1]: … … 125 142 arraySize=arraySize+1 126 143 straxisValues=straxisValues+ str(val) + ', ' 127 else:#this if deals with selections such as longitude (330,30) 144 else:#this if deals with selections such as longitude (330,30) where the lower limit is 'greater' than the upper limit in a mathematical sense. 128 145 for val in dc[key]: 129 146 if val >= kwargs[key][0]: -
TI02-CSML/trunk/parser/apicalls.py
r1330 r1341 46 46 spatialSubsetDictionary= {} 47 47 spatialSubsetDictionary['latitude']=(-90,90) 48 spatialSubsetDictionary['longitude']=(330,340) 48 #spatialSubsetDictionary['longitude']=(330,359) 49 spatialSubsetDictionary['longitude']=(-31.265,30.258) 49 50 50 51 #request subsetted data from feature (can set paths here)
Note: See TracChangeset
for help on using the changeset viewer.