Index: trunk/SRC/ToBeReviewed/GRILLE/grille.pro
===================================================================
--- trunk/SRC/ToBeReviewed/GRILLE/grille.pro	(revision 172)
+++ trunk/SRC/ToBeReviewed/GRILLE/grille.pro	(revision 231)
@@ -1,5 +1,2 @@
-;------------------------------------------------------------
-;------------------------------------------------------------
-;------------------------------------------------------------
 ;+
 ;
@@ -7,89 +4,90 @@
 ; Choose the grid which must be used to do the graph in function of
 ; vargrid and send back corresponding parameters calculated in
-; domdef.pro and reduced at the domain defined by domdef (contrarily
-; to grandegrille.pro)
-; BEWARE!! The choice of the grid is made from the value of the 
+; <pro>domdef</pro> and reduced at the domain defined by
+; <pro>domdef</pro> (contrarily to <pro>grandegrille</pro>)
+; BEWARE!! The choice of the grid is made from the value of the
 ; global variable vargrid, which can be equal to 'T', 'U', 'V', 'W' ou 'F'.
 ;
 ; @categories
 ;
-; @keyword TRI 
+; @keyword TRI
 ; This keyword serve to obtain, thanks to grille, the triangulation which
 ; refer to the grid but only on the part of the zoom. This of triangulation
 ; is passed in the variable we have equate at TRI.
 ; For example: grille,...,tri=triangulation_reduite.
-; This keyword is used in plt.pro
+; This keyword is used in <pro>plt</pro>.
 ;
 ; @keyword WDEPTH
-; To specify that the field is at W depth instead of T 
+; To specify that the field is at W depth instead of T
 ; depth (automatically activated if vargrid eq 'W')
-; 
+;
 ; @keyword FORPLT
-; In plt, we want that land points, glam and gphi, be equal to glamt and 
+; In <pro>plt</pro>, we want that land points,
+; glam and gphi, be equal to glamt and
 ; gphit regardless of the grid.
 ;
 ; @keyword NOTRI
-; Useful only when TRI is activated. In this case, grill send back -1 in the 
-; variable tri even if the variable of the common triangles_list is defined 
+; Useful only when TRI is activated. In this case, grill send back -1 in the
+; variable tri even if the variable of the common triangles_list is defined
 ; and different of-1
-; 
-; @keyword _EXTRA 
-; Used to pass your keywords
+;
+; @keyword _EXTRA
+; Used to pass keywords
 ;
 ; @keyword TOUT
 ;
 ; @param MASK {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  GLAM {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  GPHI {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  GDEP {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  NX {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  NY {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  NZ {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  FIRSTX {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  FIRSTY {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  FIRSTZ {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-;         
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param GLAM {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param GPHI {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param GDEP {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param NX {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param NY {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param NZ {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param FIRSTX {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param FIRSTY {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param FIRSTZ {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
 ; @param LASTX {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  LASTY {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  LASTZ {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  E1 {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-;
-; @param  E2 {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
-; 
-; @param  E3 {out}{optional}
-; For the definition, see domdef and the management of subdomains on the web.
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param LASTY {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param LASTZ {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param E1 {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param E2 {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
+;
+; @param E3 {out}{optional}
+; For the definition, see <pro>domdef</pro> and the management of subdomains on the web.
 ;
 ; @uses
-; cm_4mesh 
+; cm_4mesh
 ; cm_4data
 ;
-; @restrictions 
+; @restrictions
 ; Use the variable vargrid
 ;
@@ -103,15 +101,12 @@
 ;
 ; @version
-; $Id$ 
-;
-; @todo Comment ecrire la remarque sur les inputs?
-; 
+; $Id$
+;
+; @todo
+; Comment ecrire la remarque sur les inputs?
+;
 ;-
-;------------------------------------------------------------
-;------------------------------------------------------------
-;------------------------------------------------------------
-pro grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex
-;------------------------------------------------------------
-; include commons
+;
+PRO grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex
 ;
   compile_opt idl2, strictarrsubs
@@ -138,5 +133,5 @@
 ;------------------------------------------------------------
   IF keyword_set(wdepth) THEN BEGIN
-    firstz = firstzw 
+    firstz = firstzw
     lastz = lastzw
     nz = nzw
@@ -148,5 +143,5 @@
 ;------------------------------------------------------------
 ;------------------------------------------------------------
-  CASE 1 OF 
+  CASE 1 OF
 ;------------------------------------------------------------
 ; grid T and W
@@ -165,5 +160,5 @@
       IF arg_present(e1) THEN e1 = e1t[firstx:lastx, firsty:lasty]
       IF arg_present(e2) THEN e2 = e2t[firstx:lastx, firsty:lasty]
-;3d vectors 
+;3d vectors
       IF keyword_set(forplt) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz] $
       ELSE IF arg_present(mask) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz:lastz]
@@ -204,5 +199,5 @@
         no1 = temporary(tmp1)*temporary(tmp2)
         tmp = temporary(eastboarder)*temporary(no1)*mask
-        mask[0:nx-2, *] = 0b 
+        mask[0:nx-2, *] = 0b
         tmp = temporary(tmp)+temporary(mask)
         tmp = where(tmp GE 1)
@@ -233,5 +228,5 @@
       IF arg_present(glam) THEN glam = glamv[firstx:lastx, firsty:lasty]
       IF arg_present(gphi) THEN gphi = gphiv[firstx:lastx, firsty:lasty]
-      if keyword_set(forplt) then BEGIN 
+      if keyword_set(forplt) then BEGIN
         mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz]
         northboarder = mask-shift(mask, 0, 1)*mask
@@ -271,5 +266,5 @@
 ; grid F
 ;------------------------------------------------------------
-    vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 
+    vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $
       or vargrid eq 'F': begin
 ;scalars
@@ -283,5 +278,5 @@
       IF arg_present(glam) THEN glam = glamf[firstx:lastx, firsty:lasty]
       IF arg_present(gphi) THEN gphi = gphif[firstx:lastx, firsty:lasty]
-      if keyword_set(forplt) then BEGIN 
+      if keyword_set(forplt) then BEGIN
         mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz]
         eastboarder = mask-shift(mask, 1, 0)*mask
@@ -313,6 +308,6 @@
         no1 = temporary(tmp1)*temporary(tmp2)
         tmp = (temporary(northboarder)+temporary(eastboarder))*mask*temporary(no1)
-        mask[0:nx-2, *] = 0b 
-        mask[*, 0:ny-2] = 0b 
+        mask[0:nx-2, *] = 0b
+        mask[*, 0:ny-2] = 0b
         tmp = temporary(tmp)+temporary(mask)
         tmp = where(tmp GE 1)
@@ -324,10 +319,10 @@
       IF arg_present(e1) THEN e1  = e1f[firstx:lastx, firsty:lasty]
       IF arg_present(e2) THEN e2  = e2f[firstx:lastx, firsty:lasty]
-;3d vectors 
+;3d vectors
       IF keyword_set(forplt) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz] $
       ELSE IF arg_present(mask) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz]
     END
 ;------------------------------------------------------------
-    ELSE:BEGIN 
+    ELSE:BEGIN
       ras = report('Wrong definition of vargrid = '+vargrid+'. Only T, U, V, W or F are acceptable')
       stop
@@ -391,5 +386,5 @@
   IF keyword_set(type) AND n_elements(romszinfos) NE 0 THEN BEGIN
     romsdp = romsdepth()
-    IF romsdp[0] NE -1 THEN BEGIN 
+    IF romsdp[0] NE -1 THEN BEGIN
       IF jpt EQ 1 THEN BEGIN
         CASE type OF
@@ -400,5 +395,5 @@
           ELSE:
         ENDCASE
-      ENDIF ELSE BEGIN 
+      ENDIF ELSE BEGIN
         CASE type OF
           'z':gdep = moyenne(temporary(romsdp), 'xyt')
@@ -420,5 +415,5 @@
 ;------------------------------------------------------------
   if arg_present(TRI) then $
-    if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN 
+    if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN
     tempdeux = systime(1)       ; pour key_performance =2
     msk = bytarr(jpi, jpj)
@@ -444,19 +439,12 @@
 
   if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4grille.dat'
-  if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun 
+  if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun
 
 ;------------------------------------------------------------
   IF NOT keyword_set(key_forgetold) THEN BEGIN
 @updateold
-  ENDIF 
+  ENDIF
 ;---------------------
   return
 
 end
-
-
-
-
-
-
-
