Changeset 238
- Timestamp:
- Jul 20, 2011, 5:49:17 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
r237 r238 400 400 if char in ["cyl","lcc","merc","nsper","laea"]: step = findstep(wlon) 401 401 else: step = 10. 402 steplon = step*2. 403 #if back in ["geolocal"]: 404 # step = np.min([5.,step]) 405 # steplon = step 402 406 print step 403 m.drawmeridians(np.r_[-180.:180.:step *2.], labels=[0,0,0,1], color='grey', fontsize=fontsizemer)407 m.drawmeridians(np.r_[-180.:180.:steplon], labels=[0,0,0,1], color='grey', fontsize=fontsizemer) 404 408 m.drawparallels(np.r_[-90.:90.:step], labels=[1,0,0,0], color='grey', fontsize=fontsizemer) 405 409 if back: m.warpimage(marsmap(back),scale=0.75) … … 494 498 "HFX": "RdYlBu",\ 495 499 "ICETOT": "YlGnBu",\ 496 "TAU_ICE": " YlGnBu",\500 "TAU_ICE": "Blues",\ 497 501 } 498 502 if whichone not in whichcolorb: … … 535 539 "mola": domain+"mars-mola-2k.jpg",\ 536 540 "molabw": domain+"MarsElevation_2500x1250.jpg",\ 541 "clouds": "http://www.johnstonsarchive.net/spaceart/marswcloudmap.jpg",\ 542 "jupiter": "http://www.mmedia.is/~bjj/data/jupiter_css/jupiter_css.jpg",\ 543 "jupiter_voy": "http://www.mmedia.is/~bjj/data/jupiter/jupiter_vgr2.jpg",\ 537 544 } 545 ### see http://www.mmedia.is/~bjj/planetary_maps.html 538 546 if whichone not in whichlink: 539 547 print "marsmap: choice not defined... you'll get the default one... " -
trunk/MESOSCALE_DEV/PLOT/PYTHON/scripts/winds.py
r237 r238 25 25 zoom=None,\ 26 26 display=True,\ 27 itstep=None): 27 itstep=None,\ 28 hole=False): 28 29 29 30 #################################################################################################################### … … 50 51 typefile = whatkindfile(nc) ## TYPEFILE 51 52 if var not in nc.variables: var = False ## VAR 52 if winds: [uchar,vchar,metwind] = getwinddef(nc) ## WINDS 53 if uchar == 'not found': winds = False 53 if winds: ## WINDS 54 [uchar,vchar,metwind] = getwinddef(nc) 55 if uchar == 'not found': winds = False 54 56 [lon2d,lat2d] = getcoorddef(nc) ## COORDINATES, could be moved below 55 57 if proj == None: proj = getproj(nc) ## PROJECTION … … 122 124 palette = get_cmap(name=colorb) 123 125 if not tile: 124 if var in ["TAU_ICE","ICETOT"]: hole = True #nice plots with vis img 125 if not hole: what_I_plot = bounds(what_I_plot,zevmin,zevmax) 126 if not hole: what_I_plot = bounds(what_I_plot,zevmin,zevmax) 126 127 zelevels = np.linspace(zevmin,zevmax) 127 128 contourf( x, y, what_I_plot, zelevels, cmap = palette ) … … 177 178 else: zeplot = target + "/" + zeplot 178 179 ### 179 #if found_lct: makeplotpng(zeplot,pad_inches_value=0.35,disp=display) 180 if found_lct: makeplotpng(zeplot,disp=display) 180 if found_lct: makeplotpng(zeplot,pad_inches_value=0.35,disp=display) 181 181 #if found_lct: makeplotpngres(zeplot,200,disp=display) 182 182 else: print "Local time not found" … … 232 232 parser.add_option('-d', action='store_false',dest='display', default=True, help='do not pop up created images') 233 233 parser.add_option('-e', action='store',dest='itstep', type="int", default=None, help='stride time (def=4)') 234 parser.add_option('-H', action='store_true',dest='hole', default=False, help='holes above max and below min') 234 235 #parser.add_option('-V', action='store', dest='comb', type="float", default=None, help='a defined combination of variables') 235 236 (opt,args) = parser.parse_args() … … 302 303 addchar=lschar,interv=[zehour,zehourin],vmin=argvmin,vmax=argvmax,\ 303 304 tile=opt.tile,zoom=opt.zoom,display=opt.display,\ 304 itstep=opt.itstep )305 itstep=opt.itstep,hole=opt.hole) 305 306 print 'Done: '+name 306 307
Note: See TracChangeset
for help on using the changeset viewer.