Changeset 254 for trunk/MESOSCALE_DEV/PLOT
- Timestamp:
- Aug 2, 2011, 4:28:49 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
r252 r254 21 21 def whatkindfile (nc): 22 22 if 'controle' in nc.variables: typefile = 'gcm' 23 elif 'phisinit' in nc.variables: typefile = 'gcmex' 23 24 elif 'vert' in nc.variables: typefile = 'mesoapi' 24 25 elif 'U' in nc.variables: typefile = 'meso' … … 259 260 lon2d = dumpbdy(lon2d,6) 260 261 lat2d = dumpbdy(lat2d,6) 261 elif typefile in ['gcm' ]:262 elif typefile in ['gcm','gcmex']: 262 263 [lon2d,lat2d] = getcoord2d(nc,nlat="latitude",nlon="longitude",is1d=True) 263 264 elif typefile in ['geo']: -
trunk/MESOSCALE_DEV/PLOT/PYTHON/scripts/winds.py
r251 r254 30 30 anomaly=False,\ 31 31 var2=None,\ 32 ndiv=10): 32 ndiv=10,\ 33 first=1): 33 34 34 35 #################################################################################################################### … … 86 87 ### Time loop for plotting device 87 88 found_lct = False 88 itime = 0 ## could be an argument89 itime = first 89 90 nplot = 1 90 91 error = False … … 185 186 ### Save the figure in a file in the data folder or an user-defined folder 186 187 if typefile in ['meso','mesoapi']: prefix = getprefix(nc) 187 elif typefile in ['gcm' ]: prefix = 'LMD_GCM_'188 elif typefile in ['gcm','gcmex']: prefix = 'LMD_GCM_' 188 189 else: prefix = '' 189 190 ### … … 258 259 parser.add_option('-N', '--no-api', action='store_true',dest='nocall', default=False, help='do not recreate api file') 259 260 parser.add_option('-d', '--display',action='store_false',dest='display', default=True, help='do not pop up created images') 260 parser.add_option('-e', '--it ime',action='store',dest='itstep', type="int", default=None, help='stride time (def=4)')261 parser.add_option('-e', '--itstep', action='store',dest='itstep', type="int", default=None, help='stride time (def=4)') 261 262 parser.add_option('-H', '--hole', action='store_true',dest='hole', default=False, help='holes above max and below min') 262 263 parser.add_option('-S', '--save', action='store',dest='save', type="string", default="gui", help='save mode (png,eps,svg,pdf or gui)(def=gui)') … … 264 265 parser.add_option('-w', '--with', action='store',dest='var2', type="string", default=None, help='variable contoured') 265 266 parser.add_option('--div', action='store',dest='ndiv', type="int", default=10, help='number of divisions in colorbar (def: 10)') 267 parser.add_option('-F', '--first', action='store',dest='first', type="int", default=1, help='first subscript to plot (def: 1)') 266 268 #parser.add_option('-V', action='store', dest='comb', type="float", default=None, help='a defined combination of variables') 267 269 (opt,args) = parser.parse_args() … … 338 340 tile=opt.tile,zoom=opt.zoom,display=opt.display,\ 339 341 itstep=opt.itstep,hole=opt.hole,save=opt.save,\ 340 anomaly=opt.anomaly,var2=opt.var2,ndiv=opt.ndiv )342 anomaly=opt.anomaly,var2=opt.var2,ndiv=opt.ndiv,first=opt.first) 341 343 print 'Done: '+name 342 344 system("rm -f to_be_erased")
Note: See TracChangeset
for help on using the changeset viewer.