Changeset 723 for trunk/UTIL/PYTHON/mcd
- Timestamp:
- Jul 16, 2012, 5:49:10 PM (12 years ago)
- Location:
- trunk/UTIL/PYTHON/mcd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/mcd.py
r653 r723 247 247 for i in range(nd): self.xz = self.xcoord[i] ; self.update() ; self.put1d(i) 248 248 249 def seasonal(self,nd=12,start=0.,end=360.): 250 ### retrieve a seasonal slice 251 self.xlabel = "Areocentric longitude (degrees)" 252 self.prepare(ndx=nd) ; self.xcoord = np.linspace(start,end,nd) 253 for i in range(nd): self.xdate = self.xcoord[i] ; self.update() ; self.put1d(i) 254 249 255 def latlon(self,ndx=37,startx=-180.,endx=180.,ndy=19,starty=-90.,endy=90.): 250 256 ### retrieve a latitude/longitude slice … … 283 289 self.extvartab[i,j,1:100] = self.extvar[0:99] ## note: var numbering according to MCD manual is kept 284 290 285 def makemap2d(self,choice ):291 def makemap2d(self,choice,incwind=False): 286 292 ### one 2D map is created for the user-defined variable in choice. 293 self.latlon() ## a map is implicitely a lat-lon plot. otherwise it is a plot (cf. makeplot2d) 287 294 (field, fieldlab) = self.definefield(choice) 288 myplot.maplatlon(self.xcoord,self.ycoord,field,title=fieldlab,proj="moll") 289 290 def map2d(self,tabtodo): 295 if incwind: 296 (windx, fieldlabwx) = self.definefield("u") 297 (windy, fieldlabwy) = self.definefield("v") 298 myplot.maplatlon(self.xcoord,self.ycoord,field,title=fieldlab,proj="cyl",vecx=windx,vecy=windy) 299 else: 300 myplot.maplatlon(self.xcoord,self.ycoord,field,title=fieldlab,proj="moll") 301 302 def map2d(self,tabtodo,incwind=False): 291 303 ### complete 2D figure with possible multiplots 292 304 if isinstance(tabtodo,np.str): tabtodo=[tabtodo] ## so that asking one element without [] is possible. 293 305 if isinstance(tabtodo,np.int): tabtodo=[tabtodo] ## so that asking one element without [] is possible. 294 306 fig = mpl.figure() ; subv,subh = myplot.definesubplot( len(tabtodo) , fig ) 295 for i in range(len(tabtodo)): mpl.subplot(subv,subh,i+1) ; self.makemap2d(tabtodo[i] )307 for i in range(len(tabtodo)): mpl.subplot(subv,subh,i+1) ; self.makemap2d(tabtodo[i],incwind=incwind) 296 308 297 309 ### TODO: makeplot2d, plot2d, passer plot settings, vecteurs, plot loct pas fixe -
trunk/UTIL/PYTHON/mcd/proto/index.html
r639 r723 51 51 <li>Altitude 52 52 <input type="radio" name="isaltfree" value="0" checked> Value: <input type="text" size="2" name="altitude" value="10."> 53 <input type="radio" name="isaltfree" value="1"> All [0 ; 100000] km53 <input type="radio" name="isaltfree" value="1"> All [0 ; 100000] m 54 54 </li> 55 55 </ul>
Note: See TracChangeset
for help on using the changeset viewer.