Index: trunk/UTIL/PYTHON/mcd/proto/index.html
===================================================================
--- trunk/UTIL/PYTHON/mcd/proto/index.html	(revision 759)
+++ trunk/UTIL/PYTHON/mcd/proto/index.html	(revision 760)
@@ -72,5 +72,5 @@
 <li>Presets
 <!--<input type="button" value="Now!" onClick="DefaultDateValues();DefaultTimeValues();Convert2Ls();">-->
-<input type="button" value="Curiosity" onClick="DateAndTimeValues(2012,8,6,00,00,00);Convert2Ls();PlaceValues(137.2,-4.6)">
+<input type="button" value="Curiosity" onClick="DateAndTimeValues(2012,8,6,05,30,00);Convert2Ls();PlaceValues(137.4,-4.6)">
 <input type="button" value="Phoenix" onClick="DateAndTimeValues(2008,5,25,23,38,23);Convert2Ls();PlaceValues(234.25,68.22)">
 <input type="button" value="Opportunity" onClick="DateAndTimeValues(2004,1,25,4,55,0);Convert2Ls();PlaceValues(354.47,-1.95)">
Index: trunk/UTIL/PYTHON/myplot.py
===================================================================
--- trunk/UTIL/PYTHON/myplot.py	(revision 759)
+++ trunk/UTIL/PYTHON/myplot.py	(revision 760)
@@ -866,6 +866,10 @@
     #zelatmax = 90. - step/3
     if char not in ["moll"]:
-        m.drawmeridians(np.r_[-180.:180.:steplon], labels=[0,0,0,1], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, latmax=zelatmax)
-        m.drawparallels(np.r_[-90.:90.:step], labels=[1,0,0,0], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, latmax=zelatmax)
+        if wlon[1]-wlon[0] < 2.:  ## LOCAL MODE
+            m.drawmeridians(np.r_[-1.:1.:0.05], labels=[0,0,0,1], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, fmt='%5.2f')
+            m.drawparallels(np.r_[-1.:1.:0.05], labels=[1,0,0,0], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, fmt='%5.2f')
+        else:  ## GLOBAL OR REGIONAL MODE
+            m.drawmeridians(np.r_[-180.:180.:steplon], labels=[0,0,0,1], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, latmax=zelatmax)
+            m.drawparallels(np.r_[-90.:90.:step], labels=[1,0,0,0], color=zecolor, linewidth=zelinewidth, fontsize=fontsizemer, latmax=zelatmax)
     if back: m.warpimage(marsmap(back),scale=0.75)
             #if not back:
@@ -989,4 +993,5 @@
              "def":          "%.1e",\
              "PTOT":         "%.0f",\
+             "PSFC":         "%.1f",\
              "HGT":          "%.1e",\
              "USTM":         "%.2f",\
@@ -1423,5 +1428,5 @@
 ## Author : AC
 ## Handles calls to specific computations (e.g. wind norm, enrichment factor...)
-def select_case(zvarname=None,znc=None,ztypefile=None,mode=None,ztsat=None,ylon=None,ylat=None,yalt=None,ytime=None):
+def select_getfield(zvarname=None,znc=None,ztypefile=None,mode=None,ztsat=None,ylon=None,ylat=None,yalt=None,ytime=None):
       from mymath import get_tsat
  
Index: trunk/UTIL/PYTHON/myscript.py
===================================================================
--- trunk/UTIL/PYTHON/myscript.py	(revision 759)
+++ trunk/UTIL/PYTHON/myscript.py	(revision 760)
@@ -29,5 +29,6 @@
 
     ### GENERIC GRAPHICS SETTINGS
-    parser.add_option('-c', '--color',  action='store',dest='clb',       type="string",  default="def", help='change colormap (also: nobar,onebar)')
+    parser.add_option('-c', '--color',  action='store',dest='clb',       type="string",  default=None,  help='change colormapS (also: nobar,onebar,def)')
+    parser.add_option('--trycol',       action='store_true',dest='trycol',               default=False, help='try 9 typical color palette')
     parser.add_option('--div',          action='store',dest='ndiv',      type="int",     default=10,    help='number of divisions in colorbar [10]')
     parser.add_option('--title',        action='store',dest='zetitle',   type="string",  default="fill",help='customize the whole title')
Index: trunk/UTIL/PYTHON/planetoplot.py
===================================================================
--- trunk/UTIL/PYTHON/planetoplot.py	(revision 759)
+++ trunk/UTIL/PYTHON/planetoplot.py	(revision 760)
@@ -23,5 +23,5 @@
            stride=3,\
            var=None,\
-           colorb="def",\
+           clb=None,\
            winds=False,\
            addchar=None,\
@@ -72,4 +72,5 @@
            cross=None,\
            facwind=1.,\
+           trycol=False,\
            streamflag=False):
 
@@ -84,5 +85,5 @@
                        zoomset,getcoorddef,getwinddef,whatkindfile,reducefield,bounds,getstralt,getfield,smooth,nolow,\
                        getname,localtime,check_localtime,polarinterv,getsindex,define_axis,determineplot,readslices,bidimfind,getlschar,hole_bounds,\
-                       getdimfromvar,select_case
+                       getdimfromvar,select_getfield
     from mymath import deg,max,min,mean,writeascii,fig2data,fig2img
     import matplotlib as mpl
@@ -113,10 +114,15 @@
 ### we initialize a few variables
     initime=-1 ; sslon = None ; sslat = None
+    k = 0 ; firstfile = True ; count = 0
+### we perform sanity checks and correct for insufficient information
     if slon is not None: sslon = np.zeros([1,2])
     if slat is not None: sslat = np.zeros([1,2])
-    k = 0 ; firstfile = True ; count = 0
+    if clb is None:            clb = ["def"]*len(var)
+    elif len(clb) < len(var):  clb = [clb[0]]*len(var) ; print "WARNING: less color than vars! setting all to 1st value."
+### we set option trycol i.e. the user wants to try a set of colorbars
+    if trycol: clb = ["Greys","Blues","YlOrRd","jet","spectral","hot","RdBu","RdYlBu","Paired"] ; zetitle = clb ; var = [var[0]]*9
 ### we avoid specific cases not yet implemented
     if mrate is not None and len(var) > 1: errormess("multivar not allowed in movies. should be fixed soon!")
-### we prepare number of plot fields [zelen] and plot instances [numplot] according to user choices
+### we prepare number of plot fields [zelen] and number of plot instances [numplot] according to user choices
 ### --> we support multifile and multivar plots : files + vars separated by commas are on the same figure
     nlon, nlat, nvert, ntime, mapmode, nslices = determineplot(slon, slat, svert, stime)
@@ -131,7 +137,7 @@
 ### we define the arrays for plot fields -- which will be placed within multiplot loops
     all_var  = [[]]*zelen ; all_var2  = [[]]*zelen 
-    all_title = [[]]*zelen ; all_varname = [[]]*zelen ; all_namefile = [[]]*zelen ; all_time = [[]]*zelen 
+    all_title = [[]]*zelen ; all_varname = [[]]*zelen ; all_namefile = [[]]*zelen ; all_time = [[]]*zelen ; all_colorb = [[]]*zelen
     all_windu = [[]]*zelen ; all_windv = [[]]*zelen
- 
+
 #############################
 ### LOOP OVER PLOT FIELDS ###
@@ -163,5 +169,5 @@
     ### we get the names of variables to be read. in case only one available, we choose this one.
     ### (we take out of the test specific names e.g. UV is not in the file but used to ask a wind speed computation)
-      varname = select_case(zvarname=var[vvv],znc=nc,ztypefile=typefile,mode='check')
+      varname = select_getfield(zvarname=var[vvv],znc=nc,ztypefile=typefile,mode='check')
     ### we get the names of wind variables to be read (if any)
       if winds:                                                    
@@ -302,12 +308,13 @@
 ####################################################################
 
-    ### we fill the arrays of varname, namefile, time at the current step considered (NB: why use both k and nnn ?)
+    ### we fill the arrays of varname, namefile, time, colorbar at the current step considered (NB: why use both k and nnn ?)
       all_varname[k] = varname
       all_namefile[k] = namefile
       all_time[k] = time
-      if var2:  all_var2[k] = select_case(zvarname=var2,znc=nc,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k])
+      all_colorb[k] = clb[vvv]
+      if var2:  all_var2[k] = select_getfield(zvarname=var2,znc=nc,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k])
       if winds: all_windu[k] = getfield(nc,uchar) ; all_windv[k] = getfield(nc,vchar)
     ### we fill the arrays of fields to be plotted at the current step considered
-      all_var[k] = select_case(zvarname=all_varname[k],znc=nc,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k])
+      all_var[k] = select_getfield(zvarname=all_varname[k],znc=nc,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k])
     ### we inform the user about the loop then increment the loop. this is the last line of "for namefile in namefiles" 
       print "**** GOT SUBDATA:",k," NAMEFILE:",namefile," VAR:",varname, var2 ; k += 1 ; firstfile = False
@@ -324,6 +331,6 @@
                 if fileref is not None:   
                    ncref = Dataset(fileref)
-                   all_var[k] = select_case(zvarname=all_varname[k-1],znc=ncref,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k],zvert=vert)
-                   all_varname[k] = all_varname[k-1] ; all_time[k] = all_time[k-1] ; all_namefile[k] = all_namefile[k-1] ; all_var2[k] = all_var2[k-1]
+                   all_var[k] = select_getfield(zvarname=all_varname[k-1],znc=ncref,ztypefile=typefile,mode='getvar',ztsat=tsat,ylon=lon,ylat=lat,yalt=vert,ytime=all_time[k])
+                   all_varname[k] = all_varname[k-1] ; all_time[k] = all_time[k-1] ; all_namefile[k] = all_namefile[k-1] ; all_var2[k] = all_var2[k-1] ; all_colorb[k] = all_colorb[k-1]
                    if winds: all_windu[k] = getfield(ncref,uchar) ; all_windv[k] = getfield(ncref,vchar)
                 else: errormess("fileref is missing!") 
@@ -334,5 +341,7 @@
                     masked.set_fill_value([np.NaN])
                     all_var[k+1]= 100.*(all_var[k-1] - masked)/masked
-                all_varname[k+1] = all_varname[k] ; all_time[k+1] = all_time[k] ; all_namefile[k+1] = all_namefile[k] ; all_var2[k+1] = all_var2[k] ; numplot = numplot+2
+                all_varname[k+1] = all_varname[k] ; all_time[k+1] = all_time[k] ; all_namefile[k+1] = all_namefile[k] ; all_var2[k+1] = all_var2[k] ; numplot = numplot+2 
+                if len(clb) >= zelen:  all_colorb[k+1] = clb[-1]   # last additional user-defined color is for operation plot 
+                else:                  all_colorb[k+1] = "RdBu_r"  # if no additional user-defined color... set a good default one
                 if winds: all_windu[k+1] = all_windu[k-1]-all_windu[k] ; all_windv[k+1] = all_windv[k-1] - all_windv[k]
              elif ope in ["cat"]:
@@ -355,5 +364,7 @@
              numplot = numplot + 1 ; all_time[k] = all_time[k-1] ; all_namefile[k] = all_namefile[k-1]
              all_varname[k] = all_varname[k-2] + insert + all_varname[k-1] 
-             ### only the operation plot
+             if len(clb) >= zelen: all_colorb[k] = clb[-1]   # last additional user-defined color is for operation plot 
+             else:                 all_colorb[k] = all_colorb[k-1]  # if no additional user-defined color... set same as var
+             ### only the operation plot. do not mention colorb so that it is user-defined?
              if "only" in ope: 
                  numplot = 1 ; all_var[0] = all_var[k] 
@@ -413,8 +424,8 @@
            if mult != 2718.:  what_I_plot = what_I_plot*mult 
            else:              what_I_plot = np.log10(what_I_plot) ; print "log plot"
-                      
+                  
        if var2:      ### what is contoured.
            what_I_plot_contour, error = reducefield( all_var2[index_f], d4=indextime, d1=indexlon, d2=indexlat , d3=indexvert, \
-                                             yint=yintegral, alt=vert )
+                                                     yint=yintegral, alt=vert )
        if winds:     ### what is plot as vectors.
            vecx, error = reducefield( all_windu[index_f], d4=indextime, d3=indexvert, yint=yintegral, alt=vert)
@@ -443,4 +454,5 @@
        changesubplot = (numplot > 1) and (len(what_I_plot.shape) != 1)  ## default for 1D plots: superimposed. to be reworked for better flexibility.
        if changesubplot: subplot(subv,subh,nplot) #; subplots_adjust(wspace=0,hspace=0)
+       colorb = all_colorb[index_f]
        ####################################################################
        if error:
@@ -466,5 +478,5 @@
                if (fileref is not None) and (index_f == numplot-1):    zevmin, zevmax = calculate_bounds(what_I_plot,vmin=minop,vmax=maxop)
                else:                                                   zevmin, zevmax = calculate_bounds(what_I_plot,vmin=vmin,vmax=vmax)
-               if (fileref is not None) and (index_f == numplot-1):    colorb = "RdBu_r"
+               #if (fileref is not None) and (index_f == numplot-1):    colorb = "RdBu_r"
                if colorb in ["def","nobar","onebar"]:                  palette = get_cmap(name=defcolorb(fvar.upper()))
                else:                                                   palette = get_cmap(name=colorb)
@@ -750,4 +762,5 @@
     if mrate is None:
         pad_inches_value = 0.35
+        if wlon[1]-wlon[0] < 2.: pad_inches_value = 0.5  # LOCAL MODE (small values)
         print "********** SAVE ", save
         if save == 'png': 
Index: trunk/UTIL/PYTHON/pp.py
===================================================================
--- trunk/UTIL/PYTHON/pp.py	(revision 759)
+++ trunk/UTIL/PYTHON/pp.py	(revision 760)
@@ -55,5 +55,5 @@
       if typefile in ["meso"]:          
           [lschar,zehour,zehourin] = getlschar ( zefiles[0] )
-          if opt.var is None:  opt.var = ["HGT"] ; opt.clb = "nobar"
+          if opt.var is None:  opt.var = ["HGT"] #; opt.clb = "nobar" # otherwise breaks the automatic one-var file capability
       elif typefile in ["geo"]:
           [lschar,zehour,zehourin] = ["",0,0]
@@ -162,5 +162,5 @@
         name = planetoplot (zefiles,level=int(zelevel),vertmode=opt.itp,\
                 proj=opt.proj,back=opt.back,target=opt.tgt,stride=opt.ste,var=zevars,\
-                colorb=opt.clb,winds=opt.winds,\
+                clb=separatenames(opt.clb),winds=opt.winds,\
                 addchar=lschar,interv=[zehour,zehourin],vmin=zevmin,vmax=zevmax,\
                 tile=opt.tile,zoom=opt.zoom,display=opt.display,\
@@ -175,5 +175,6 @@
                 mrate=opt.rate,mquality=opt.quality,trans=opt.trans,zarea=opt.area,axtime=opt.axtime,\
                 redope=opt.redope,seevar=opt.seevar,xlab=opt.xlab,ylab=opt.ylab,lbls=separatenames(opt.labels),\
-                lstyle=separatenames(opt.linestyle),cross=readslices(opt.mark),facwind=opt.facwind,streamflag=opt.stream)
+                lstyle=separatenames(opt.linestyle),cross=readslices(opt.mark),facwind=opt.facwind,\
+                trycol=opt.trycol,streamflag=opt.stream)
         print 'DONE: '+name
         system("rm -f to_be_erased")
