Changeset 247 for trunk/MESOSCALE_DEV/PLOT
- Timestamp:
- Jul 29, 2011, 3:47:26 PM (13 years ago)
- Location:
- trunk/MESOSCALE_DEV/PLOT/PYTHON
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/myplot.py
r241 r247 362 362 meanlat = 0.5*(wlat[0]+wlat[1]) 363 363 if wlat[0] >= 80.: blat = 40. 364 elif wlat[1] <= -80.: blat = -40. 365 else: blat = max([wlat[0],wlat[1]]) 364 elif wlat[1] <= -80.: blat = -40. 365 elif wlat[1] >= 0.: blat = wlat[0] 366 elif wlat[0] <= 0.: blat = wlat[1] 366 367 print blat 367 368 h = 50. ## en km … … 441 442 442 443 def bounds(what_I_plot,zevmin,zevmax): 444 from mymath import max,min,mean 443 445 ### might be convenient to add the missing value in arguments 444 446 what_I_plot[ what_I_plot < zevmin ] = zevmin*(1. + 1.e-7) 447 print "new min ", min(what_I_plot) 445 448 what_I_plot[ what_I_plot > 9e+35 ] = -9e+35 446 449 what_I_plot[ what_I_plot > zevmax ] = zevmax*(1. - 1.e-7) 450 print "new max ", max(what_I_plot) 447 451 return what_I_plot 448 452 -
trunk/MESOSCALE_DEV/PLOT/PYTHON/scripts/winds.py
r244 r247 150 150 if not tile: 151 151 if not hole: what_I_plot = bounds(what_I_plot,zevmin,zevmax) 152 zelevels = np.linspace(zevmin ,zevmax) #,num=20)152 zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20) 153 153 contourf( x, y, what_I_plot, zelevels, cmap = palette ) 154 154 else: … … 177 177 vectorfield(vecx, vecy,\ 178 178 x, y, stride=stride, csmooth=2,\ 179 scale=15., factor=300., color=colorvec, key=key) 179 #scale=15., factor=300., color=colorvec, key=key) 180 scale=20., factor=250., color=colorvec, key=key) 180 181 #200. ## or csmooth=stride 181 182
Note: See TracChangeset
for help on using the changeset viewer.