Index: /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 200)
+++ /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 201)
@@ -255,10 +255,22 @@
     return m
 
+def fmtvar (whichvar="def"):
+        fmtvar    =     { \
+                "tk":           "%.0f",\
+                "tpot":         "%.0f",\
+                "def":          "%.1e",\
+                "PTOT":         "%.0f",\
+                "USTM":         "%.2f",\
+                        }
+        if whichvar not in fmtvar:
+                whichvar = "def"
+        return fmtvar[whichvar]
+
 def marsmap (whichone="vishires"):
 	whichlink = 	{ \
 		"vis":		"http://maps.jpl.nasa.gov/pix/mar0kuu2.jpg",\
-		"vishires":	"http://users.info.unicaen.fr/~karczma/TEACH/InfoGeo/Images/Planets/MarsMap_2500x1250.jpg",\
+		"vishires":	"http://dl.dropbox.com/u/11078310/MarsMap_2500x1250.jpg",\
 		"mola":		"http://www.lns.cornell.edu/~seb/celestia/mars-mola-2k.jpg",\
-		"molabw":	"http://users.info.unicaen.fr/~karczma/TEACH/InfoGeo/Images/Planets/MarsElevation_2500x1250.jpg",\
+		"molabw":	"http://dl.dropbox.com/u/11078310/MarsElevation_2500x1250.jpg",\
 			}
 	if whichone not in whichlink: 
Index: /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py	(revision 200)
+++ /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py	(revision 201)
@@ -16,10 +16,11 @@
            numplot=4,\
            var=None,\
-           colorb=None,\
+           colorb=True,\
            winds=True,\
            addchar=None,\
            interv=[0,1],\
            vmin=None,\
-           vmax=None):
+           vmax=None,\
+           tile=False):
 
     ####################################################################################################################
@@ -29,5 +30,5 @@
     ### Load librairies and functions
     from netCDF4 import Dataset
-    from myplot import getcoord2d,define_proj,makeplotpng,simplinterv,vectorfield,ptitle,latinterv,getproj,wrfinterv,dumpbdy
+    from myplot import getcoord2d,define_proj,makeplotpng,simplinterv,vectorfield,ptitle,latinterv,getproj,wrfinterv,dumpbdy,fmtvar
     from mymath import deg,max,min,mean
     from matplotlib.pyplot import contourf, subplot, figure, rcParams, savefig, colorbar, pcolor
@@ -111,5 +112,5 @@
             elif dimension == 3:   field = nc.variables[var][:,:,:]
             elif dimension == 4:   field = nc.variables[var][:,nvert,:,:]  
-        dev = np.std(field)*2.5
+        dev = np.std(field)*3.0
         if vmin is None:  zevmin = mean(field) - dev
         else:             zevmin = vmin
@@ -117,5 +118,5 @@
         else:             zevmax = vmax
         print "bounds ", zevmin, zevmax
-  
+ 
     ###########################
     ### Get length of time axis
@@ -146,5 +147,6 @@
         if   numplot == 4: 
             sub = 221
-            fig.subplots_adjust(wspace = 0.1, hspace = 0.3)
+            #fig.subplots_adjust(wspace = 0.1, hspace = 0.3)
+            fig.subplots_adjust(wspace = 0.3, hspace = 0.3)
             rcParams['font.size'] = int( rcParams['font.size'] * 2. / 3. )
         elif numplot == 2: 
@@ -203,6 +205,6 @@
             ### If only one local time is requested (numplot < 0)
        elif numplot <= 0: 
-           if ltst + numplot != 0:   continue
-           else:                            found_lct = True
+           if int(ltst) + numplot != 0:		continue
+           else:                  		found_lct = True
 
        ### Map projection
@@ -216,7 +218,10 @@
                if dimension == 2:                what_I_plot = field[:,:]
                elif dimension == 3:              what_I_plot = field[i,:,:]
-           #contourf( x, y, what_I_plot, 30, cmap = get_cmap(name=colorb), vmin=zevmin, vmax=zevmax )
-           pcolor( x, y, what_I_plot, cmap = get_cmap(name=colorb), vmin=zevmin, vmax=zevmax )
-           if colorb:     colorbar(fraction=0.05,pad=0.1,format='%.1e')
+           if not tile:
+               zelevels = np.linspace(zevmin,zevmax)
+               contourf( x, y, what_I_plot, cmap = get_cmap(name=colorb), levels = zelevels )
+           else:    
+               pcolor( x, y, what_I_plot, cmap = get_cmap(name=colorb), vmin=zevmin, vmax=zevmax )
+           if colorb:     colorbar(fraction=0.05,pad=0.1,format=fmtvar(var))
 
        ### Vector plot
@@ -288,8 +293,10 @@
     parser.add_option('-n', action='store', dest='numplot',     type="int",     default=4,     help='number of plots (def=1)(<0: 1 plot of LT -*numplot*)')
     parser.add_option('-i', action='store', dest='interp',      type="int",     default=None,  help='interpolation method (2: press, 3: z-amr, 4:z-als)')
-    parser.add_option('-c', action='store', dest='colorb',      type="string",  default=None,  help='change colormap (and draw a colorbar)')
+    parser.add_option('-c', action='store', dest='colorb',      type="string",  default=True,  help='change colormap (and draw a colorbar)')
     parser.add_option('-x', action='store_false', dest='winds',                 default=True,  help='flag: no wind vectors')
     parser.add_option('-m', action='store', dest='vmin',        type="float",   default=None,  help='bounding minimum value for color plot')    
     parser.add_option('-M', action='store', dest='vmax',        type="float",   default=None,  help='bounding maximum value for color plot') 
+    parser.add_option('-T', action='store_true', dest='tile',                   default=False, help='draw a tiled plot')
+    #parser.add_option('-V', action='store', dest='comb',        type="float",   default=None,  help='a defined combination of variables')
     (opt,args) = parser.parse_args()
     if opt.namefile is None: 
@@ -326,5 +333,5 @@
     name = winds (zefile,int(zelevel),\
            proj=opt.proj,back=opt.back,target=opt.target,stride=opt.stride,var=opt.var,numplot=opt.numplot,colorb=opt.colorb,winds=opt.winds,\
-           addchar=lschar,interv=[zehour,zehourin],vmin=opt.vmin,vmax=opt.vmax)
+           addchar=lschar,interv=[zehour,zehourin],vmin=opt.vmin,vmax=opt.vmax,tile=opt.tile)
 
     #########################################################
