Index: trunk/UTIL/PYTHON/planetoplot.py
===================================================================
--- trunk/UTIL/PYTHON/planetoplot.py	(revision 610)
+++ trunk/UTIL/PYTHON/planetoplot.py	(revision 612)
@@ -64,5 +64,7 @@
            xlab=None,\
            ylab=None,\
-           lbls=None):
+           lbls=None,\
+           lstyle=None,\
+           cross=None):
 
     ####################################################################################################################
@@ -75,5 +77,6 @@
                        fmtvar,definecolorvec,defcolorb,getprefix,putpoints,calculate_bounds,errormess,definesubplot,\
                        zoomset,getcoorddef,getwinddef,whatkindfile,reducefield,bounds,getstralt,getfield,smooth,nolow,\
-                       getname,localtime,check_localtime,polarinterv,getsindex,define_axis,determineplot,readslices,bidimfind,getlschar,hole_bounds,windamplitude
+                       getname,localtime,check_localtime,polarinterv,getsindex,define_axis,determineplot,readslices,bidimfind,getlschar,hole_bounds,\
+                       windamplitude,slopeamplitude,deltat0t1
     from mymath import deg,max,min,mean,get_tsat,writeascii,fig2data,fig2img
     import matplotlib as mpl
@@ -148,5 +151,5 @@
     ### we get the names of variables to be read. in case only one available, we choose this one.
       varname=var[vvv] 
-      if ((varname not in nc.variables) and not ((typefile in ['meso']) and (varname in ['UV','uv','uvmet']))): 
+      if ((varname not in nc.variables) and not ((typefile in ['meso']) and (varname in ['UV','uv','uvmet','slopexy','SLOPEXY','deltat','DELTAT']))): 
           if len(varinfile) == 1:   varname = varinfile[0] 
           else:                     varname = False
@@ -205,5 +208,5 @@
           ###### principle: calculate correct indices then repopulate slon and slat
           if slon is not None or slat is not None:
-              if firstfile and save == 'png' and typefile == 'meso' and "HGT" in varinfile:   iwantawhereplot = nc     #show a topo map with a cross on the chosen point
+              if firstfile and save == 'png' and typefile == 'meso' and "HGT" in varinfile and display:   iwantawhereplot = nc     #show a topo map with a cross on the chosen point
               else:                                                                           iwantawhereplot = None   #do not show anything, just select indices
               numlon = 1 ; numlat = 1 
@@ -278,5 +281,7 @@
       all_namefile[k] = namefile
       all_time[k] = time
-      if var2: all_var2[k] = getfield(nc,var2)
+      if var2: 
+         if ((var2 in ['slopexy','SLOPEXY']) and (typefile in ['meso']) and (var2 not in nc.variables)): all_var2[k] = slopeamplitude(nc)
+         else: all_var2[k] = getfield(nc,var2)
       if winds: all_windu[k] = getfield(nc,uchar) ; all_windv[k] = getfield(nc,vchar)
       #####################
@@ -293,4 +298,8 @@
       elif ((varname in ['UV','uv','uvmet']) and (typefile in ['meso']) and (varname not in nc.variables)):
           all_var[k]=windamplitude(nc)
+      elif ((varname in ['slopexy','SLOPEXY']) and (typefile in ['meso']) and (varname not in nc.variables)):
+          all_var[k]=slopeamplitude(nc)
+      elif ((varname in ['DELTAT','deltat']) and (typefile in ['meso']) and (varname not in nc.variables)):
+          all_var[k]=deltat0t1(nc)
       else:
       ##### GENERAL STUFF HERE
@@ -310,7 +319,12 @@
                    if ((all_varname[k-1] in ['UV','uv','uvmet']) and (typefile in ['meso']) and (all_varname[k-1] not in ncref.variables)):
                       all_var[k] = windamplitude(ncref)
+                   elif ((all_varname[k-1] in ['slopexy','SLOPEXY']) and (typefile in ['meso']) and (all_varname[k-1] not in ncref.variables)):
+                      all_var[k] = slopeamplitude(ncref)
+                   elif ((all_varname[k-1] in ['DELTAT','deltat']) and (typefile in ['meso']) and (all_varname[k-1] not in ncref.variables)):
+                      all_var[k]=deltat0t1(ncref)
                    else:
                       all_var[k] = getfield(ncref,all_varname[k-1])
                    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]
+                   if winds: all_windu[k] = getfield(ncref,uchar) ; all_windv[k] = getfield(ncref,vchar)
                 else: errormess("fileref is missing!") 
                 if ope == "-":     all_var[k+1]= all_var[k-1] - all_var[k]
@@ -321,4 +335,5 @@
                     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
+                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"]:
                 tabtime = all_time[0];tab = all_var[0];k = 1
@@ -349,5 +364,6 @@
     ### Time loop for plotting device
     nplot = 1 ; error = False 
-    linecycler = cycle(["-","--","-.",":"])
+    if lstyle is not None: linecycler = cycle(lstyle)
+    else: linecycler = cycle(["-","--","-.",":"])
     print "********************************************"
     while error is False:
@@ -492,11 +508,12 @@
 
                     if which == "unidim":
-                        lbl = ""
-                        if indexlat is not None:  lbl = lbl + " ix" + str(indexlat[0])
-                        if indexlon is not None:  lbl = lbl + " iy" + str(indexlon[0])
-                        if indexvert is not None: lbl = lbl + " iz" + str(indexvert[0])
-                        if indextime is not None: lbl = lbl + " it" + str(indextime[0])
-                        if lbl == "": lbl = namefiles[index_f]
-                        if lbls is not None: lbl=lbls[nplot-1]
+                        if lbls is not None: lbl=lbls[index_f]
+                        else:
+                           lbl = ""
+                           if indexlat is not None:  lbl = lbl + " ix" + str(indexlat[0])
+                           if indexlon is not None:  lbl = lbl + " iy" + str(indexlon[0])
+                           if indexvert is not None: lbl = lbl + " iz" + str(indexvert[0])
+                           if indextime is not None: lbl = lbl + " it" + str(indextime[0])
+                           if lbl == "": lbl = namefiles[index_f]
 
                         if mrate is not None: x = y  ## because swapaxes...
@@ -523,4 +540,7 @@
                             if mapmode == 1:       m.contourf( x, y, what_I_plot_frame, zelevels, cmap = palette, alpha=trans)
                             elif mapmode == 0:     contourf( x, y, what_I_plot_frame, zelevels, cmap = palette, alpha=trans)
+                            if cross is not None and mapmode == 1:
+                               idx,idy=m(cross[0][0],cross[0][1])
+                               mpl.pyplot.plot([idx],[idy],'+k',mew=0.5,ms=18)
                         else:
                             if mapmode == 1:       m.pcolor( x, y, what_I_plot_frame, cmap = palette, vmin=zevmin, vmax=zevmax, alpha=trans)
@@ -553,10 +573,10 @@
                         zevminc, zevmaxc = calculate_bounds(what_I_plot_frame, vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))
                         zelevels = np.linspace(zevminc,zevmaxc,ticks/2) #20)
-                        if var2 == 'HGT': zelevels = np.arange(-10000.,30000.,2000.)
+                        if var2 == 'HGT': zelevels = np.arange(-10000.,30000.,1000.)
                         if mapmode == 0:   
                             what_I_plot_frame, x, y = define_axis( lon,lat,vert,time,indexlon,indexlat,indexvert,\
                                                               itime,what_I_plot_frame, len(all_var2[index_f].shape),vertmode )
-                            cs = contour( x,y,what_I_plot_frame, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)#, linestyles='solid')
-                        elif mapmode == 1:  cs = m.contour( x,y,what_I_plot_frame, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)# , linestyles='solid')
+                            cs = contour( x,y,what_I_plot_frame, zelevels, colors='k', linewidths = 0.33, alpha=0.5, linestyles='solid')
+                        elif mapmode == 1:  cs = m.contour( x,y,what_I_plot_frame, zelevels, colors='k', linewidths = 0.33, alpha=0.5, linestyles='solid')
                     if which in ["regular","unidim"]:
 
@@ -645,5 +665,5 @@
         if zetitle[0] != "fill": zecb.ax.set_xlabel(zetitle[index_f]) ; zetitle[index_f]=""
 
-      
+
     ##########################################################################
     ### Save the figure in a file in the data folder or an user-defined folder
