Index: trunk/SRC/ToBeReviewed/CALCULS/remplit.pro
===================================================================
--- trunk/SRC/ToBeReviewed/CALCULS/remplit.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/CALCULS/remplit.pro	(revision 209)
@@ -80,16 +80,12 @@
   z = zinput
   if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
+  oldkey_gridtype = key_gridtype
+; keep only the first letter of the grid type
+  key_gridtype = strmid(key_gridtype, 0, 1)
   if keyword_set(basique) then begin
-    oldkey_gridtype = key_gridtype
     key_gridtype = 'c'
     nx = (size(zinput))[1]
     ny = (size(zinput))[2]
     if NOT keyword_set(mask) then mmmask = basique ELSE mmmask = mask
-    if  key_gridtype eq 'e' then begin
-      case vargrid of
-        'T':glam = glamt[firstxt:lastxt, firstyt:lastyt]
-        'U':glam = glamu[firstxu:lastxu, firstyu:lastyu]
-      endcase
-    endif
   ENDIF ELSE grille, mmmask, glam, gphi, gdep, nx, ny, nz, _extra = ex
   if keyword_set(mask) then mmmask = mask
@@ -282,5 +278,5 @@
   endcase
 ;
-  if keyword_set(basique) then key_gridtype = oldkey_gridtype
+  key_gridtype = oldkey_gridtype
 ;---------------------------------------------------------------
   if keyword_set(key_performance) THEN print, 'temps remplit', systime(1)-tempsun 
Index: trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro
===================================================================
--- trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro	(revision 209)
@@ -82,5 +82,5 @@
   if n_elements(glamin) * n_elements(gphiin) EQ 0 then BEGIN
     grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz
-    IF keyword_set(ocean) AND key_gridtype EQ 'c' THEN BEGIN
+    IF keyword_set(ocean) AND strmid(key_gridtype, 0, 1) EQ 'c' THEN BEGIN
 ; we reduce the mask to take into account the point located ON the coastline.
       CASE vargrid OF
@@ -157,5 +157,5 @@
   if NOT keyword_set(xstride) then xstride = 1
   if NOT keyword_set(ystride) then ystride = 1
-  case key_gridtype of
+  case strmid(key_gridtype, 0, 1) of
     'c':BEGIN
       for i = 0, ny-1, ystride do begin
Index: trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
===================================================================
--- trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro	(revision 209)
@@ -99,5 +99,5 @@
                     , PARENTIN = parentin, TIMESTEP = timestep, TIMEVAR = timevar $
                     , TOUT = tout, NOSTRUCT = nostruct, CONT_NOFILL = CONT_NOFILL, INIT = init $
-                    , GRID = grid, FBASE2TBASE = fbase2tbase, CALLITSELF = callitself $
+                    , GRID = grid, CALLITSELF = callitself $
                     , ZETAFILENAME = zetafilename, ZETAZERO = zetazero $
                     , _EXTRA = ex
@@ -427,30 +427,18 @@
   ENDIF
 ;
-  IF keyword_set(fbase2tbase) THEN BEGIN
-    case strupcase(vargrid) of
-      'U':BEGIN
-        IF NOT keyword_set(key_periodic) THEN BEGIN
-          firstx = firstx+1
-          lastx = lastx+1
-        ENDIF
-      END
-      'V':BEGIN
-        firsty = firsty+1
-        lasty = lasty+1
-      END
-      'F':BEGIN
-        firsty = firsty+1
-        lasty = lasty+1
-        IF NOT keyword_set(key_periodic) THEN BEGIN
-          firstx = firstx+1
-          lastx = lastx+1
-        ENDIF
-      END
-      ELSE:
-    endcase
-  ENDIF
-;
-  IF keyword_set(fbase2tbase) AND keyword_set(key_periodic) $
-    AND (strupcase(vargrid) EQ 'U' OR strupcase(vargrid) EQ 'F') THEN key_shift =  key_shift-1
+  IF (key_gridtype EQ 'c_u' OR key_gridtype EQ 'c_f') $
+     AND (vargrid EQ 'U' OR vargrid EQ 'F') THEN BEGIN
+    IF keyword_set(key_periodic)  THEN BEGIN
+      key_shift =  key_shift-1
+    ENDIF ELSE BEGIN 
+      firstx = firstx+1
+      lastx = lastx+1    
+    ENDELSE 
+  ENDIF
+  IF (key_gridtype EQ 'c_v' OR key_gridtype EQ 'c_f') $
+      AND (vargrid EQ 'V' OR vargrid EQ 'F') THEN BEGIN
+    firsty = firsty+1
+    lasty = lasty+1
+  ENDIF
 ;
 ;---------------------------------------------------------------------
@@ -460,6 +448,6 @@
 ;---------------------------------------------------------------------
 ;
-  IF keyword_set(fbase2tbase) AND keyword_set(key_periodic) $
-    AND (strupcase(vargrid) EQ 'U' OR strupcase(vargrid) EQ 'F') THEN key_shift =  key_shift+1
+  IF (key_gridtype EQ 'c_u' OR key_gridtype EQ 'c_f') AND keyword_set(key_periodic) $
+    AND (strupcase(vargrid) EQ 'U' OR strupcase(vargrid) EQ 'F') THEN key_shift = key_shift+1
 ;---------------------------------------------------------------------
 ; We define global variable joined with the variable.
@@ -504,6 +492,9 @@
 
 ; we apply reverse
-  if keyword_set(key_yreverse) AND ny NE 1 THEN $
-     res = reverse(reform(res, nx, ny, nz, jpt, /overwrite),  2)
+  IF keyword_set(key_yreverse) AND ny NE 1 THEN BEGIN 
+    IF varcontient.ndims - ((where(varcontient.dim EQ contient.recdim))[0] NE -1) EQ 2 THEN $
+       res = reverse(reform(res, nx, ny, jpt, /overwrite),  2) $
+    ELSE res = reverse(reform(res, nx, ny, nz, jpt, /overwrite),  2)
+  ENDIF
   if keyword_set(key_zreverse) AND nz NE 1 $
      AND varcontient.ndims - ((where(varcontient.dim EQ contient.recdim))[0] NE -1) EQ 3 THEN $
Index: trunk/SRC/ToBeReviewed/PLOTS/axe.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/axe.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/PLOTS/axe.pro	(revision 209)
@@ -82,5 +82,5 @@
       CASE 1 OF
 ; yearly base
-        tempsmax GT julday(mmin, dmin, ymin + 3, hmin, mnmin, smin):BEGIN ; more than 3 years
+        ymin NE 0 AND tempsmax GT julday(mmin, dmin, ymin + 3, hmin, mnmin, smin):BEGIN ; more than 3 years
           CASE 1 OF
           ymax-ymin+1 GT 5000: BEGIN & freq = 500. & tminor = 5 & datfmt = fmtyr & end
Index: trunk/SRC/ToBeReviewed/TRIANGULATION/tracecote.pro
===================================================================
--- trunk/SRC/ToBeReviewed/TRIANGULATION/tracecote.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/TRIANGULATION/tracecote.pro	(revision 209)
@@ -95,6 +95,5 @@
    tempvar = SIZE(TEMPORARY(ind)) ; we delete ind
 ;
-   if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
-   case key_gridtype of
+   case strmid(key_gridtype, 0, 1) of
       'c':drawcoast_c, mask, xf, yf, nx, ny, _extra = ex
       'e':drawcoast_e, mask, xf, yf, nx, ny, onemore = onemore, _extra = ex
Index: trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro
===================================================================
--- trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro	(revision 206)
+++ trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro	(revision 209)
@@ -73,5 +73,5 @@
    if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
    if n_elements(maskentree) EQ 0 then maskentree = tmask[*, *, 0]
-   case key_gridtype of
+   case strmid(key_gridtype, 0, 1) of
       'e':res = triangule_e(maskentree, _extra = ex)
       'c':res = triangule_c(maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex)
