Index: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro	(revision 152)
@@ -5,5 +5,5 @@
 ;
 ; @file_comments 
-; Draw horizontal graph (map)
+; Draw horizontal graph (map) with CONTOUR procedure
 ;
 ; @categories 
@@ -11,5 +11,5 @@
 ;
 ; @param TAB1 {in}{required} 
-; The field whose we want to make the horizontal map can be 2 kind of thing:
+; The field whose we want to make the horizontal map can be:
 ;         1) an array. if needed, its mean along the z and t direction
 ;         will be automatically performed.
@@ -120,12 +120,12 @@
 ;
 ; @keyword MAXIN 
-; Allows to specify the max value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument max. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the max value we want to plot with a keyword instead of with the
+; input parameter max. If max is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword MININ 
-; Allows to specify the min value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument min. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the min value we want to plot with a keyword instead of with the
+; input parameter min. If min is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword NLEVEL 
Index: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro	(revision 152)
@@ -115,12 +115,12 @@
 ;
 ; @keyword MAXIN 
-; Allows to specify the max value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument max. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the max value we want to plot with a keyword instead of with the
+; input parameter max. If max is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword MININ 
-; Allows to specify the min value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument min. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the min value we want to plot with a keyword instead of with the
+; input parameter min. If min is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword NLEVEL 
Index: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro	(revision 152)
+++ trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro	(revision 152)
@@ -0,0 +1,193 @@
+;------------------------------------------------------------
+;+
+; @file_comments
+; Draw 2d plots with TV procedure
+;
+; @categories find a file
+; graphic
+;
+; @param DATA {in}{required} 
+; The field we want to display can be:
+;    1) an array. If the array is not a 2D array, its mean along
+;       the z and t direction will be automatically performed
+;       (as it is done in plt).
+;    2) a structure respecting all criterions specified by
+;       litchamp.pro. cf. IDL> xhelp,'litchamp'
+;
+; @param MIN {in}{optional}{default=min of DATA (on non-masked points)} 
+;
+; @param MAX {in}{optional}{default=max of DATA (on non-masked points)} 
+;
+; @keyword BOTTOM {default=0}
+; The lowest color index of the colors to be used
+;
+; @keyword BOXZOOM 
+; Vector indicating the geographic zone on which we want to cut the map. 
+;  If BOXZOOM has :
+; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]]
+; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]]
+; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])]
+; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]]
+; 6 elements: The extraction is made on Boxzoom
+;
+; Where lon1, lon2, lat1, lat2 are global variables defined at the last domdef!
+;
+; @keyword C_NAN {default=!d.n_colors < 255}
+; The color number that should be used for the NaN values.
+;
+; @keyword C_MASK {default=0}
+; The color number that should be used for the mask values.
+;
+; @keyword MASKVAL {default=1.e+20}
+; The mask value. Note that if abs(mask) < 1.e6, then the
+; exact value of the mask is used to find the maskwd point.
+; if abs(mask) > 1.e6, the test to find the masked value is ge
+; abs(mask)/10. This is necessary to avoid the rounding errors
+;
+; @keyword NCOLORS {default=(d.n_colors < 256) - 1 - BOTTOM}
+; number of colors to be used.
+;
+; @keyword NOINTERP
+; Used this keyword if you don't whant that the values
+; are interpolated from BOTTOM using NCOLORS colors.
+; This can be for example usefull when working on byte type arrays.
+;
+; @keyword _EXTRA
+; used to pass keywords to PLACEDESSIN, TV, AXE, LEGENDE, BARRECOULEUR, TERMINEDESSIN
+; 
+; @examples
+; IDL> tvplus, dist(100)
+;
+; @history
+; Aug 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr)
+;
+; @version
+; $Id$
+;
+;-
+;--------------------------------------------------------------
+
+PRO pltv, data, min, max, BOTTOM = bottom, BOXZOOM = boxzoom $
+          , C_MASK = c_mask, C_NAN = c_nan, MININ = minin, MAXIN = maxin $
+          , MASKVAL = maskval, NCOLORS = ncolors, NOINTERP = nointerp $
+          , _EXTRA = ex
+;
+  compile_opt idl2, strictarrsubs
+;
+  @cm_general ; for key_performance
+;--------------------------------------------------------------
+  tempsun = systime(1)          ; for key_performance
+;--------------------------------------------------------------
+;--------------------------------------------------------------
+; I2) Reading of the field and checkup.
+;--------------------------------------------------------------
+  IF n_elements(minin) NE 0 THEN min = minin 
+  IF n_elements(maxin) NE 0 THEN max = maxin
+  IF size(data, /type) NE 8 THEN z2d = reform(float(data)) ELSE z2d = data
+  IF size(z2d, /n_dimensions) NE 2 then BEGIN
+    if keyword_set(boxzoom) then BEGIN
+      savedbox = 1b
+      saveboxparam, 'boxparam4pltv.dat'
+    ENDIF
+    z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 
+    if z2d[0] EQ -1 then BEGIN 
+      IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat'
+      return
+    ENDIF
+  ENDIF
+  dtasize = size(z2d, /dimensions)
+;------------------------------------------------------------
+; def of ncolmax, bottom, topcol et ncolors
+;------------------------------------------------------------
+  ncolmax = !d.n_colors < 256
+  IF n_elements(bottom) EQ 0 THEN bottom = 1
+  IF NOT keyword_set(ncolors) then ncolors = ncolmax - 1 - bottom
+  topcol = (bottom + ncolors - 1) < (ncolmax - 1)
+;------------------------------------------------------------
+; Do we have NaN values in z2d???
+;------------------------------------------------------------
+  msknan = finite(z2d, /nan)
+  nan = total(msknan)
+  IF keyword_set(nan) THEN nanind = where(temporary(msknan) EQ 1)
+;------------------------------------------------------------
+; get the mask
+;------------------------------------------------------------
+  IF n_elements(maskval) EQ 0 THEN maskval = 1.e20
+  IF abs(maskval) LT 1e6 THEN BEGIN 
+    IF keyword_set(nan) THEN z2d[nanind] = 1.e20
+    msk = z2d NE maskval 
+  ENDIF ELSE BEGIN 
+    IF keyword_set(nan) THEN z2d[nanind] = 0
+    msk = abs(z2d) LT abs(maskval)/10.
+  ENDELSE
+  maskind = where(msk EQ 0, masked)
+  IF keyword_set(nan) THEN z2d[nanind] = !values.f_nan
+;------------------------------------------------------------
+; get the real min/max and the user defined min/max of the array
+;------------------------------------------------------------
+  determineminmax, z2d, msk, truemin, truemax, MININ = min, MAXIN = max, NAN = nan
+;------------------------------------------------------------
+; apply other keywords (nointerp, c_nan, c_mask) 
+;------------------------------------------------------------
+  IF NOT keyword_set(nointerp) THEN BEGIN
+; interpolation between bottom and bottom+ncolors-1
+    m = 1.*(ncolors-1)/(truemax-truemin)
+    p = bottom - 1.*truemin*m
+    z2d = m * temporary(z2d) + p
+  ENDIF
+; set c_nan for NaN values 
+  IF keyword_set(nan) THEN BEGIN
+    IF n_elements(c_nan) NE 0 THEN cnan = 0 > c_nan < (ncolmax -1) ELSE cnan = (ncolmax -1)
+    z2d[nanind] = cnan
+  ENDIF
+; c_mask for masked values
+  IF keyword_set(masked) THEN BEGIN   
+    IF n_elements(c_mask) NE 0 THEN cmask = 0 > c_mask < (ncolmax - 1) ELSE cmask = (ncolmax -1)
+    z2d[maskind] = cmask
+  ENDIF 
+  z2d = round(temporary(z2d)) 
+; use byte type to save memory
+  z2d = byte(temporary(z2d))
+;--------------------------------------------------------------
+; .
+;--------------------------------------------------------------
+  if NOT keyword_set(overplot) then reinitplt, /z, /invert
+  placedessin, 'plt', posplot, posbar, _extra = ex
+;--------------------------------------------------------------
+; 3) Drawing
+;--------------------------------------------------------------
+
+   xsize = !p.position[2] - !p.position[0]
+   ysize = !p.position[3] - !p.position[1]
+   IF !d.name EQ 'X' THEN BEGIN 
+     xsize = ceil(xsize * !d.x_size)
+     ysize = ceil(ysize * !d.y_size)
+     z2d = congrid(z2d, xsize, ysize)
+   ENDIF
+   
+   tv, z2d, !p.position[0], !p.position[1] $
+       , xsize = xsize, ysize = ysize $
+       , /normal, _EXTRA = ex
+
+;------------------------------------------------------------
+;  caption + display of these.
+;------------------------------------------------------------
+   axe, 'pltv', dtasize, _EXTRA = ex
+   legende, truemin, truemax, 'plt', DIREC = direc $
+            , INTERVALLE = float(max-min)/(topcol-bottom) $
+            , _extra = ex
+   plot, [0], [0], /noerase, /nodata, xstyle = 1, ystyle = 1
+
+   IF keyword_set(masked) THEN tracemask, msk, indgen(dtasize[0]), indgen(dtasize[1])
+;------------------------------------------------------------
+; color bar
+;------------------------------------------------------------
+   barrecouleur, 0, min,  max, 10, bottom = bottom, position = posbar, ncolors = (topcol-bottom+1), _extra = ex
+; 4) End of drawing 
+   terminedessin, _extra=ex 
+;
+  if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat'
+  if keyword_set(key_performance) NE 0 THEN print, 'time pltv', systime(1)-tempsun 
+;
+   return
+end
Index: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro	(revision 152)
@@ -97,12 +97,12 @@
 ;
 ; @keyword MAXIN 
-; Allows to specify the max value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument max. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the max value we want to plot with a keyword instead of with the
+; input parameter max. If max is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword MININ 
-; Allows to specify the min value we want to consider in the drawing of contour 
-; helping by the keyword instead of the argument min. If the argument and the keyword are 
-; specified in the same time, it is the value specified by the keyword which is retained.
+; to specify the min value we want to plot with a keyword instead of with the
+; input parameter min. If min is defined by both, parameter and keyword, the
+; keyword is retained.
 ;
 ; @keyword NLEVEL 
Index: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro	(revision 152)
@@ -24,15 +24,12 @@
 ; are not coded for "scrolling window" case...
 ;
-; @keyword BOTTOM
-; The lowest color index of the colors to be loaded in
-; the bar. default is 0.
-;
-; @keyword C_NAN
+; @keyword BOTTOM {default=1}
+; The lowest color index of the colors to be used
+;
+; @keyword C_NAN {default=!d.n_colors < 255}
 ; The color number that should be used for the NaN values.
-; default value is !d.n_colors < 255
-;
-; @keyword C_MASK
+;
+; @keyword C_MASK {default=0}
 ; The color number that should be used for the mask values.
-; default value is 0
 ;
 ; @keyword OFFSET 
@@ -47,16 +44,16 @@
 ; abs(mask)/10. This is necessary to avoid the rounding errors
 ;
-; @keyword MIN 
-; Scalar used to specify the min value of the color bar. default is 0
+; @keyword MIN
+; Scalar used to specify the min value to be drawn.
 ;
 ; @keyword MAX
-; Scalar used to specify the max value of the color bar. default is !d.n_colors < 255
-;
-; @keyword NCOLORS
-; This is the number of colors in the color bar. default is !d.n_colors<255 -1
+; Scalar used to specify the max value to be drawn.
+;
+; @keyword NCOLORS {default=(d.n_colors < 256) - 1 - bottom}
+; number of colors to be used.
 ;
 ; @keyword NOINTERP
 ; Used this keyword if you don't whant that the values
-; are interpolated between 0 (or min) and !d.n_colors < 255 (or max).
+; are interpolated from BOTTOM using NCOLORS colors.
 ; This can be for example usefull when working on byte type arrays.
 ;
@@ -68,4 +65,7 @@
 ; default is window number 0.
 ;
+; @keyword _EXTRA
+; used to pass keywords to TV, PLOT, COLORBAR
+; 
 ; @restrictions 
 ; use your mouse to scan the array values...
@@ -112,6 +112,6 @@
 ;------------------------------------------------------------
   ncolmax = !d.n_colors < 256
-  IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 0
-  if NOT keyword_set(ncolors) then ncolors = ncolmax-bottom
+  IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 1
+  if NOT keyword_set(ncolors) then ncolors = ncolmax - 1 - bottom
   topcol = (bottom+ncolors-1) < (ncolmax-1)
 ;------------------------------------------------------------
@@ -177,5 +177,5 @@
     m = 1.*(ncolors-1)/(truemax-truemin)
     p = bottom-1.*truemin*m
-    arr = round(1.*m*arr+p) 
+    arr = round(m*temporary(arr)+p) 
   endif
 ; set c_nan for NaN values 
@@ -188,8 +188,9 @@
     arr[masked] = c_mask < (ncolmax -1)
 ; use byte type to save memory
-  arr = byte(arr)
+  arr = byte(temporary(arr))
 ; increase the size of the array in order to be displayed
 ; with the suitable size 
-  arr = congridseb(arr, (size(arr))[1]*cellsize, (size(arr))[2]*cellsize)
+  szarr = size(arr, /dimensions)
+  arr = congrid(temporary(arr), szarr[0]*cellsize, szarr[1]*cellsize)
 ;------------------------------------------------------------
 ; open a window with the correct size
Index: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro	(revision 152)
@@ -27,5 +27,5 @@
                   , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $
                   , NOFILL = nofill, COLOR_c = color_c $
-                  , min = min, max = max, divisions = divisions $
+                  , MIN = min, MAX = max, divisions = divisions $
                   , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex
 ;------------------------------------------------------------
Index: trunk/SRC/ToBeReviewed/PLOTS/axe.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/axe.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/axe.pro	(revision 152)
@@ -172,4 +172,13 @@
 ;--------------------------------------------------------------
    case coupe of
+      'pltv':BEGIN 
+        dtasize = tempsmin
+         !x.range = [-0.5, dtasize[0] - 0.5]
+         !y.range = [-0.5, dtasize[1] - 0.5] 
+         if keyword_set(reverse_x) then !x.range=reverse(!x.range)
+         if keyword_set(reverse_y) then !y.range=reverse(!y.range)
+         !x.title = 'nx'
+         !y.title = 'ny'
+      END
       'xy':BEGIN 
          if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2]
Index: trunk/SRC/ToBeReviewed/PLOTS/legende.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/legende.pro	(revision 151)
+++ trunk/SRC/ToBeReviewed/PLOTS/legende.pro	(revision 152)
@@ -49,52 +49,52 @@
 ;------------------------------------------------------------
 ;------------------------------------------------------------
-pro legende,mi,ma,coupe,CONTOUR = contour,ENDPOINTS = endpoints, DIREC = direc $
-            , VECTLEGENDE = vectlegende $
-            , INTERVALLE = intervalle, TYPE_YZ = type_yz, VARNAME2 = varname2 $
-            , NPTS = npts, _EXTRA = ex
+pro legende, mi, ma, coupe, CONTOUR = contour, ENDPOINTS = endpoints, DIREC = direc $
+             , VECTLEGENDE = vectlegende $
+             , INTERVALLE = intervalle, TYPE_YZ = type_yz, VARNAME2 = varname2 $
+             , NPTS = npts, _EXTRA = ex
 ;
   compile_opt idl2, strictarrsubs
 ;
 @common
-   tempsun = systime(1)         ; pour key_performance
-;------------------------------------------------------------
-   grille, -1, -1, -1, gdep, nx, ny, nz
+  tempsun = systime(1)          ; pour key_performance
+;------------------------------------------------------------
+  grille, -1, -1, -1, gdep, nx, ny, nz
 ;
 ; English legends
 ;
-   fmt_mm = '(f12.2)'
-   fmt_bt = '(f7.1)'
-   colorf = ''
-   contourf = 'Contour plot,'
-   vecteurf = 'Vector norm  '
-   expf = ''
-   datef = '   '
-   fieldf = '   '
-   depthf = '   '
-   endpointsf = 'Diag. Section'
-   zonalf = ''
-   IF key_onearth THEN latintf = 'latitudes in ' ELSE latintf = 'j index in '
-   timintf = 'time in '
-   onf = ' - '
-   depthf2 = 'Depth (m)'
-   Meridf = 'Zonal Mean  '
-   IF key_onearth THEN lonintf = 'longitudes in ' ELSE lonintf = 'i in '
-   hovxt = 'XT-plot   '
-   diaghovxt = 'Diag. XT-plot   '
-   depintf = 'depths in '
-   timef = 'Time'
-   hovyt = 'YT-plot   '
-   diaghovyt = 'Diag. YT-plot   '
-   hovzt = 'ZT-plot   '
-   hovt = ''
-   IF key_onearth THEN lontitle = 'Longitude' ELSE lontitle = 'i index'
-   IF key_onearth THEN lattitle = 'Latitude' ELSE lattitle = 'j index'
-   
-   vertz = depthf2
-   legniv = ' m'
-   IF keyword_set(TYPE_YZ) THEN BEGIN
-     IF type_yz EQ 'hPa' THEN vertz = 'hPa' 
-     IF type_yz EQ 'hPa' THEN legniv = ' hPa' 
-   ENDIF 
+  fmt_mm = '(f12.2)'
+  fmt_bt = '(f7.1)'
+  colorf = ''
+  contourf = 'Contour plot,'
+  vecteurf = 'Vector norm  '
+  expf = ''
+  datef = '   '
+  fieldf = '   '
+  depthf = '   '
+  endpointsf = 'Diag. Section'
+  zonalf = ''
+  IF key_onearth THEN latintf = 'latitudes in ' ELSE latintf = 'j index in '
+  timintf = 'time in '
+  onf = ' - '
+  depthf2 = 'Depth (m)'
+  Meridf = 'Zonal Mean  '
+  IF key_onearth THEN lonintf = 'longitudes in ' ELSE lonintf = 'i in '
+  hovxt = 'XT-plot   '
+  diaghovxt = 'Diag. XT-plot   '
+  depintf = 'depths in '
+  timef = 'Time'
+  hovyt = 'YT-plot   '
+  diaghovyt = 'Diag. YT-plot   '
+  hovzt = 'ZT-plot   '
+  hovt = ''
+  IF key_onearth THEN lontitle = 'Longitude' ELSE lontitle = 'i index'
+  IF key_onearth THEN lattitle = 'Latitude' ELSE lattitle = 'j index'
+  
+  vertz = depthf2
+  legniv = ' m'
+  IF keyword_set(TYPE_YZ) THEN BEGIN
+    IF type_yz EQ 'hPa' THEN vertz = 'hPa' 
+    IF type_yz EQ 'hPa' THEN legniv = ' hPa' 
+  ENDIF 
 ;
 ; Start legende
@@ -103,174 +103,174 @@
 ; definition and possible complement of !p.subtitle
 ;------------------------------------------------------------
-   if n_elements(varunit) ne 0 then unite='('+varunit+')' else unite=''
-   !p.subtitle=colorf+unite+': Min= '+strtrim(string(format=fmt_mm,mi), 2)$
-    +', Max= '+strtrim(string(format=fmt_mm,ma), 2)
-   if keyword_set(intervalle) then BEGIN
-      if intervalle NE -1 then $
-       !p.subtitle=!p.subtitle+', Int= '+strtrim(string(format=fmt_mm,intervalle), 2)
-   endif
-   if size(contour, /type) EQ 8 then BEGIN ; it is a structure 
-      unite='('+contour.(1)+')'
-      !p.subtitle=!p.subtitle+'!C '+contourf+unite $
-       +': Min= '+strtrim(string(format=fmt_mm,contour.(0)[0]), 2)$
-       +', Max= '+strtrim(string(format=fmt_mm,contour.(0)[1]), 2)
-      if contour.inter NE -1  then $
-       !p.subtitle=!p.subtitle+', Int= '+strtrim(string(format=fmt_mm,contour.inter), 2)
-   ENDIF
-   if size(vectlegende, /type) EQ 8  then begin
-      unite='('+vectlegende.(1)+')'
-      !p.subtitle=!p.subtitle+'!C '+vecteurf+unite $
-       +': Min= '+strtrim(string(format=fmt_mm,vectlegende.(0)[0]), 2)$
-       +', Max= '+strtrim(string(format=fmt_mm,vectlegende.(0)[1]), 2)
-   endif
+  if n_elements(varunit) ne 0 then unite = '('+varunit+')' else unite = ''
+  !p.subtitle = colorf+unite+': Min= '+strtrim(string(format = fmt_mm, mi), 2)$
+                +', Max= '+strtrim(string(format = fmt_mm, ma), 2)
+  if keyword_set(intervalle) then BEGIN
+    if intervalle NE -1 then $
+       !p.subtitle = !p.subtitle+', Int= '+strtrim(string(format = fmt_mm, intervalle), 2)
+  endif
+  if size(contour, /type) EQ 8 then BEGIN ; it is a structure 
+    unite = '('+contour.(1)+')'
+    !p.subtitle = !p.subtitle+'!C '+contourf+unite $
+                  +': Min= '+strtrim(string(format = fmt_mm, contour.(0)[0]), 2)$
+                  +', Max= '+strtrim(string(format = fmt_mm, contour.(0)[1]), 2)
+    if contour.inter NE -1  then $
+       !p.subtitle = !p.subtitle+', Int= '+strtrim(string(format = fmt_mm, contour.inter), 2)
+  ENDIF
+  if size(vectlegende, /type) EQ 8  then begin
+    unite = '('+vectlegende.(1)+')'
+    !p.subtitle = !p.subtitle+'!C '+vecteurf+unite $
+                  +': Min= '+strtrim(string(format = fmt_mm, vectlegende.(0)[0]), 2)$
+                  +', Max= '+strtrim(string(format = fmt_mm, vectlegende.(0)[1]), 2)
+  endif
 ;------------------------------------------------------------
 ; Shapping of subdomain 's dimensions
 ;------------------------------------------------------------  
-  la1=strtrim(string(format=fmt_bt, lat1), 2)
-   la2=strtrim(string(format=fmt_bt, lat2), 2)
-   lo1=strtrim(string(format=fmt_bt, lon1), 2)
-   lo2=strtrim(string(format=fmt_bt, lon2), 2)
-   pr1=strtrim(string(format=fmt_bt, vert1), 2)
-   pr2=strtrim(string(format=fmt_bt, vert2), 2)
+  la1 = strtrim(string(format = fmt_bt, lat1), 2)
+  la2 = strtrim(string(format = fmt_bt, lat2), 2)
+  lo1 = strtrim(string(format = fmt_bt, lon1), 2)
+  lo2 = strtrim(string(format = fmt_bt, lon2), 2)
+  pr1 = strtrim(string(format = fmt_bt, vert1), 2)
+  pr2 = strtrim(string(format = fmt_bt, vert2), 2)
 ;------------------------------------------------------------
 ; Management of the date
 ;------------------------------------------------------------  
- if n_elements(vardate) EQ 0 then vardate = ''
-   if NOT keyword_set(direc) then direc = ''
-   if strpos(direc, 't') NE -1 then begin
-      svardate = strtrim(vairdate(time[0]), 1)+' - '+strtrim(vairdate(time[jpt-1]), 1)
-   ENDIF ELSE svardate = vardate
+  if n_elements(vardate) EQ 0 then vardate = ''
+  if NOT keyword_set(direc) then direc = ''
+  if strpos(direc, 't') NE -1 then begin
+    svardate = strtrim(vairdate(time[0]), 1)+' - '+strtrim(vairdate(time[jpt-1]), 1)
+  ENDIF ELSE svardate = vardate
 ;------------------------------------------------------------
 ; case on the caes where the caption is applied
 ;------------------------------------------------------------   
-   case coupe of
-      'xy':begin          
-        if strupcase(vargrid) EQ 'W' then firstz = firstzw $
-        ELSE firstz = firstzt
-        if(strpos(direc, 'z') EQ -1 AND firstz NE 0) then BEGIN
-          prof = strtrim(round(gdep[0]), 1)
-          !p.title = expf+varexp+datef+svardate+fieldf+varname+depthf+prof+legniv
-        ENDIF ELSE !p.title = expf+varexp+datef+svardate+fieldf+varname
-        !x.title = lontitle
-        !y.title = lattitle
-      end
-
-      'xz':begin
-         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(ny, 1)
-         IF long(n) LE 3 THEN zonalf = 'Section   '
-         if keyword_set(endpoints) AND lat1 NE lat2 then $
-          !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
-          !p.title = zonalf+varexp+datef+svardate+fieldf+varname
-         !x.title = lontitle
-         if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
-         ENDIF
-         !y.title = depthf2
-      end
-
-      'yz':begin
-         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx, 1)
-         IF long(n) LE 3 THEN meridf = ''
-         if keyword_set(endpoints) AND lon1 NE lon2 then $
-          !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
-          !p.title = meridf+varexp+datef+svardate+fieldf+varname
-         !y.title = vertz
-         !x.title = lattitle
-         if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
-         ENDIF
-      end
-
-      'xt':begin
+  case coupe of
+    'xy':begin          
+      if strupcase(vargrid) EQ 'W' then firstz = firstzw $
+      ELSE firstz = firstzt
+      if(strpos(direc, 'z') EQ -1 AND firstz NE 0) then BEGIN
+        prof = strtrim(round(gdep[0]), 1)
+        !p.title = expf+varexp+datef+svardate+fieldf+varname+depthf+prof+legniv
+      ENDIF ELSE !p.title = expf+varexp+datef+svardate+fieldf+varname
+      !x.title = lontitle
+      !y.title = lattitle
+    end
+
+    'xz':begin
+      IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n = strtrim(ny, 1)
+      IF long(n) LE 3 THEN zonalf = 'Section   '
+      if keyword_set(endpoints) AND lat1 NE lat2 then $
+         !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
+            !p.title = zonalf+varexp+datef+svardate+fieldf+varname
+      !x.title = lontitle
+      if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
+      ENDIF
+      !y.title = depthf2
+    end
+
+    'yz':begin
+      IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n = strtrim(nx, 1)
+      IF long(n) LE 3 THEN meridf = ''
+      if keyword_set(endpoints) AND lon1 NE lon2 then $
+         !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
+            !p.title = meridf+varexp+datef+svardate+fieldf+varname
+      !y.title = vertz
+      !x.title = lattitle
+      if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
+      ENDIF
+    end
+
+    'xt':begin
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1)
-         if keyword_set(endpoints) AND lat1 NE lat2 then $
-          !p.title = diaghovxt+varexp+fieldf+varname ELSE $
-         !p.title  =     hovxt+varexp+fieldf+varname
-         IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !y.title = timef
-         !x.title = lontitle
-         if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
-         ENDIF
-      end
-
-      'yt':begin
+      if keyword_set(endpoints) AND lat1 NE lat2 then $
+         !p.title = diaghovxt+varexp+fieldf+varname ELSE $
+            !p.title  =     hovxt+varexp+fieldf+varname
+      IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !y.title = timef
+      !x.title = lontitle
+      if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
+      ENDIF
+    end
+
+    'yt':begin
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1) 
-         if keyword_set(endpoints) AND lon1 NE lon2 then $
-          !p.title = diaghovyt+varexp+fieldf+varname ELSE $
-         !p.title  =     hovyt+varexp+fieldf+varname
-         IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
-         !y.title = lattitle
-         if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
-         ENDIF
-      end
-
-      'zt':begin
+      if keyword_set(endpoints) AND lon1 NE lon2 then $
+         !p.title = diaghovyt+varexp+fieldf+varname ELSE $
+            !p.title  =     hovyt+varexp+fieldf+varname
+      IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
+      !y.title = lattitle
+      if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
+      ENDIF
+    end
+
+    'zt':begin
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*ny, 1)
-         !p.title = hovzt+varexp+fieldf+varname
-         !y.title = depthf2
-         IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
-      end
-      't':begin
+      !p.title = hovzt+varexp+fieldf+varname
+      !y.title = depthf2
+      IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
+    end
+    't':begin
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE BEGIN 
 ;            if keyword_set(integration3d) then n=strtrim(nx*ny*nz, 1) ELSE n=strtrim(nx*ny, 1)
 ;         ENDELSE 
-         !p.title = hovt+varexp+fieldf+varname
-         !y.title = varname
-         IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
-      end
-      'x':begin            
+      !p.title = hovt+varexp+fieldf+varname
+      !y.title = varname
+      IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef
+    end
+    'x':begin            
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(ny*nz, 1)
-         if keyword_set(endpoints) AND lat1 NE lat2 then $
-          !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
-         !p.title  =            varexp+datef+svardate+fieldf+varname
-         !x.title = lontitle
-         if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
-         ENDIF
-         !y.title = varname
-      end
-      'y':begin            
+      if keyword_set(endpoints) AND lat1 NE lat2 then $
+         !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
+            !p.title  =            varexp+datef+svardate+fieldf+varname
+      !x.title = lontitle
+      if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1)
+      ENDIF
+      !y.title = varname
+    end
+    'y':begin            
 ;         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*nz, 1)
-         if keyword_set(endpoints) AND lon1 NE lon2 then $
-          !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
-         !p.title  =            varexp+datef+svardate+fieldf+varname
-         !x.title = lattitle
-         if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
-           IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
-         ENDIF
-         !y.title = varname
-      end
-      'z':begin
-         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*ny, 1)
-         !p.title = varexp+datef+svardate+fieldf+varname
-         !y.title = depthf2
-         !x.title = varname
-      end
-      'yfx': BEGIN
-         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*ny*nz, 1)
-         !p.title = varexp+datef+svardate+varunit
-         !x.title = varname2
-         !y.title = varname
-      END 
-      else:
-   ENDCASE
-   if keyword_set(direc) then BEGIN
-      if strpos(direc, 'x') NE -1 then $
+      if keyword_set(endpoints) AND lon1 NE lon2 then $
+         !p.title = endpointsf+varexp+datef+svardate+fieldf+varname ELSE $
+            !p.title  =            varexp+datef+svardate+fieldf+varname
+      !x.title = lattitle
+      if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 
+        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1)
+      ENDIF
+      !y.title = varname
+    end
+    'z':begin
+      IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n = strtrim(nx*ny, 1)
+      !p.title = varexp+datef+svardate+fieldf+varname
+      !y.title = depthf2
+      !x.title = varname
+    end
+    'yfx': BEGIN
+      IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n = strtrim(nx*ny*nz, 1)
+      !p.title = varexp+datef+svardate+varunit
+      !x.title = varname2
+      !y.title = varname
+    END 
+    else:
+  ENDCASE
+  if keyword_set(direc) then BEGIN
+    if strpos(direc, 'x') NE -1 then $
        !p.subtitle = lonintf+'['+lo1+', '+lo2+']'+onf+'('+strtrim(nx, 1)+' points)  !C' +!p.subtitle
-      if strpos(direc, 'y') NE -1 then BEGIN
-         if strpos(!p.subtitle, '[') EQ -1 then $
-          !p.subtitle = latintf+'['+la1+', '+la2+']'+onf+'('+strtrim(ny, 1)+' points)  !C'+!p.subtitle $
-         ELSE !p.subtitle = latintf+'['+la1+', '+la2+']'+onf+'('+strtrim(ny, 1)+' points)  '+!p.subtitle
-      ENDIF
-      if strpos(direc, 'z') NE -1 AND (nz NE 1 OR coupe NE 'xy') then BEGIN 
-         if strpos(!p.subtitle, '[') EQ -1 then $
-          !p.subtitle = depintf+'['+pr1+', '+pr2+']'+onf+'('+strtrim(nz, 1)+' points)  !C'+!p.subtitle $
-         ELSE !p.subtitle = depintf+'['+pr1+', '+pr2+']'+onf+'('+strtrim(nz, 1)+' points)  '+!p.subtitle
-      ENDIF
-   ENDIF
-   if keyword_set(endpoints) AND coupe NE 'yt' AND lat1 NE lat2 then !p.title = !p.title+'!C!C'
-   
-   if keyword_set(key_performance) THEN print, 'temps legende', systime(1)-tempsun 
-   return
+    if strpos(direc, 'y') NE -1 then BEGIN
+      if strpos(!p.subtitle, '[') EQ -1 then $
+         !p.subtitle = latintf+'['+la1+', '+la2+']'+onf+'('+strtrim(ny, 1)+' points)  !C'+!p.subtitle $
+      ELSE !p.subtitle = latintf+'['+la1+', '+la2+']'+onf+'('+strtrim(ny, 1)+' points)  '+!p.subtitle
+    ENDIF
+    if strpos(direc, 'z') NE -1 AND (nz NE 1 OR coupe NE 'xy') then BEGIN 
+      if strpos(!p.subtitle, '[') EQ -1 then $
+         !p.subtitle = depintf+'['+pr1+', '+pr2+']'+onf+'('+strtrim(nz, 1)+' points)  !C'+!p.subtitle $
+      ELSE !p.subtitle = depintf+'['+pr1+', '+pr2+']'+onf+'('+strtrim(nz, 1)+' points)  '+!p.subtitle
+    ENDIF
+  ENDIF
+  if keyword_set(endpoints) AND coupe NE 'yt' AND lat1 NE lat2 then !p.title = !p.title+'!C!C'
+  
+  if keyword_set(key_performance) THEN print, 'temps legende', systime(1)-tempsun 
+  return
 end
