Index: trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro
===================================================================
--- trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro	(revision 177)
+++ trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro	(revision 226)
@@ -1,23 +1,18 @@
 ;+
-; @file_comments 
-; 
-; 
+; @file_comments
+;
+;
 ; @categories
-; 
-; 
-; @param ANGLE 
-;
+;
+;
+; @param ANGLE
 ;
 ; @returns
-; 
-; 
+;
 ; @restrictions
-; 
-; 
+;
 ; @examples
 ;
-;
 ; @history
-; 
 ;
 ; @version
@@ -29,5 +24,5 @@
 ; by rapport at the x axis and which must do 1 cm on the drawing.
 ; Angle can be an array.
-; 
+;
 ;
 ;
@@ -53,10 +48,10 @@
 ;
 ;+
-; @file_comments 
-; 
-; 
+; @file_comments
+;
+;
 ; @categories
-; 
-; 
+;
+;
 ; @param U
 ;
@@ -64,16 +59,11 @@
 ; @param V
 ;
-;
-; @param W 
-;
+; @param W
 ;
 ; @restrictions
-; 
-; 
+;
 ; @examples
 ;
-;
 ; @history
-; 
 ;
 ; @version
@@ -87,5 +77,5 @@
   compile_opt idl2, strictarrsubs
 ;
-   IF n_elements(w) NE 0 THEN BEGIN 
+   IF n_elements(w) NE 0 THEN BEGIN
       norme = sqrt(u^2.+v^2.+w^2.)
       ind = where(norme NE 0)
@@ -98,5 +88,5 @@
       u[ind] = u[ind]/norme[ind]
       v[ind] = v[ind]/norme[ind]
-   ENDELSE 
+   ENDELSE
 END
 ;------------------------------------------------------------
@@ -111,47 +101,47 @@
 ; and is position on the sphere).
 ;
-; @categories 
+; @categories
 ; Graphics
-; 
+;
 ; @param COMPOSANTEU {in}{required}
-; It is the u component of the vector to be traced. This 2d array has the 
+; It is the u component of the vector to be traced. This 2d array has the
 ; same dimension that reduitindice2d (see further)
-; 
+;
 ; @param COMPOSANTEV {in}{required}
-; It is the v component of the vector to be traced. This 2d array has the 
+; It is the v component of the vector to be traced. This 2d array has the
 ; same dimension that reduitindice2d (see further)
-; 
+;
 ; @param NORMEVECTEUR
 ;
 ;
 ; @param INDICE2D  {in}{required}
-; It in an index allowing to to pass from an jpi or jpj array to the zoom 
+; It in an index allowing to to pass from an jpi or jpj array to the zoom
 ; on which we do the drawing
-; 
+;
 ; @param REDUITINDICE2D {in}{required}
-; It is an index allowing to pass from an array defined by indice2d to the 
-; array for which we really have vectors to be traced (to be clear, it is 
+; It is an index allowing to pass from an array defined by indice2d to the
+; array for which we really have vectors to be traced (to be clear, it is
 ; for example when we trace only one vector on two).
 ;
 ; @keyword CMREF {default=between .5 and 1.5 cm}
-; The length in cm that must measure the arrow normed normeref. By default, 
+; The length in cm that must measure the arrow normed normeref. By default,
 ; it is adjusted to other drawing and included between .5 and 1.5 cm.
 ;
 ; @keyword MISSING
-; The value of a missing value. Do not use this keyword. Fixed at 1e5 by 
+; The value of a missing value. Do not use this keyword. Fixed at 1e5 by
 ; ajoutvect.pro
-;      
-; @keyword NORMEREF 
+;
+; @keyword NORMEREF
 ; The norme of the reference arrow.
 ;
 ; @keyword VECTCOLOR {default=0}
 ; The color of the arrow. Black by default (color 0)
-; 
+;
 ; @keyword VECTTHICK {default=1}
-; The thick of the arrow. 
+; The thick of the arrow.
 ;
 ; @keyword VECTREFPOS
-; Vector composed of 2 elements specifying the position on DATA coordinates 
-; from the beginning of the reference vector. By default at the right bottom 
+; Vector composed of 2 elements specifying the position on DATA coordinates
+; from the beginning of the reference vector. By default at the right bottom
 ; of the drawing.
 ;
@@ -161,9 +151,9 @@
 ; @keyword NOVECTREF
 ; To delete the display of the reference vector.
-; 
+;
 ; @keyword _EXTRA
-; Used to pass your keywords 
-;
-; @uses 
+; Used to pass your keywords
+;
+; @uses
 ; common.pro
 ;
@@ -179,5 +169,5 @@
 ;
 ; @version
-; $Id$ 
+; $Id$
 ;
 ;-
@@ -209,5 +199,5 @@
    msk = replicate(1, nx, ny)
    if keyword_set(missing) then terre = where(abs(zu) GE missing/10) ELSE terre = -1
-   if terre[0] NE -1  then BEGIN 
+   if terre[0] NE -1  then BEGIN
       msk[terre] = 0
       zu[terre] = 0
@@ -216,28 +206,28 @@
    ENDIF
 ;
-; Stage 1: 
-;
-; Given that the directions and the sense that the vector has on the sphere, 
-; we have to try to determinate this direction and the sense that the vector 
+; Stage 1:
+;
+; Given that the directions and the sense that the vector has on the sphere,
+; we have to try to determinate this direction and the sense that the vector
 ; will have on the screen once it will have been projected.
 ;
-; In theory: on the sphere, a vector in a given point has for direction the 
-; tangent at the circle passing by the center of the Earth and by the vector. 
+; In theory: on the sphere, a vector in a given point has for direction the
+; tangent at the circle passing by the center of the Earth and by the vector.
 ; So, find the direction once the projection is done, it is find the tangent
-; to the curve representing the projection of the circle on the 2d plan at the 
-; point representing the projection of the starting point of the shere on the 
+; to the curve representing the projection of the circle on the 2d plan at the
+; point representing the projection of the starting point of the sphere on the
 ; 2d plan.
-; 
-; In practice we do no know the definition of the curve given by the projection 
+;
+; In practice we do no know the definition of the curve given by the projection
 ; of a circle so find its tangente in a point...
 ;
 ; What we do:
 ; In a 3d cartesian reference,
-;       a) We find coorinates of the point T (starting of the arrow) situed 
+;       a) We find coordinates of the point T (starting of the arrow) situed
 ;       on the sphere.
 ;       b) To each point T, we determine local directions defined by the grid
 ;       on this point and on which coordinates (u,v) of the vector refer to.
 ;       These local directions are defined by gradients of glam and gphi. Once
-;       we have obtain these directions, we considare them like orthogonal and
+;       we have obtain these directions, we consider them like orthogonal and
 ;       by norming them, we build an orthonormal reference (nu,nv) on which
 ;       coordinates (u,v) of the vector refer to. In the starting 3d cartesian
@@ -254,5 +244,5 @@
 ;       e) We pass coordinates of these points in normalized coordinates, then
 ;       in polar coordinates in order to find the angle and the direction they
-;       dertermine on the drawing.
+;       determine on the drawing.
 ;
 ;
@@ -280,6 +270,6 @@
 ; points u[i,j] and u[i-1,j] (resp v[i,j] and v[i,j-1]) which define, for each
 ; point on the sphere, local directions associated with u and v. These vectors
-; define a local orthonormal reference. 
-; These vectors are built in a cartesian reference (cv_coord). We have choose a 
+; define a local orthonormal reference.
+; These vectors are built in a cartesian reference (cv_coord). We have choose a
 ; unity radius of the Earth (unit).
 ;
@@ -294,5 +284,5 @@
    uy = reform(r[1, *], nxgd, nygd)
    uz = reform(r[2, *], nxgd, nygd)
-; calculation of nu 
+; calculation of nu
    nux = ux-shift(ux, 1, 0)
    nuy = uy-shift(uy, 1, 0)
@@ -311,5 +301,5 @@
    IF finite(glamv[0]*gphiv[0]) NE 0 THEN $
    coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius[*]] ]) $
-   ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ])                
+   ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ])
    r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees)
 ; coordinates of points of the grid in cartesian.
@@ -317,5 +307,5 @@
    vy = reform(r[1, *], nxgd, nygd)
    vz = reform(r[2, *], nxgd, nygd)
-; calcul of nv 
+; calcul of nv
    nvx = vx-shift(vx, 0, 1)
    nvy = vy-shift(vy, 0, 1)
@@ -383,11 +373,11 @@
 ; Stage 1, e)
 ;
-   r = convert_coord(glam,gphi,/data,/to_normal) 
+   r = convert_coord(glam,gphi,/data,/to_normal)
    x0 = r[0, *]                 ; normal coordinates of the beginning of the array.
-   y0 = r[1, *]                 ; 
-   
-   r = convert_coord(glam1,gphi1,/data,/to_normal) 
+   y0 = r[1, *]                 ;
+
+   r = convert_coord(glam1,gphi1,/data,/to_normal)
    x1 = r[0, *]                 ; normal coordinates of the ending of the array (Before scaling).
-   y1 = r[1, *]                 ; 
+   y1 = r[1, *]                 ;
 ;
 ; tests to avoid that arrows be drawing out of the domain.
@@ -397,5 +387,5 @@
    if out[0] NE -1 THEN x0[out] = !values.f_nan
 ;
-; Following projections, there may are points at NaN when we pass in normal coordinates. 
+; Following projections, there may are points at NaN when we pass in normal coordinates.
 ; We delete these points.
 ;
@@ -422,7 +412,7 @@
 ; Now we take care of the norme...
 ;
-; Automatic putting at the scale 
-;
-   if NOT keyword_set(cmref) then BEGIN 
+; Automatic putting at the scale
+;
+   if NOT keyword_set(cmref) then BEGIN
       mipgsz = min(page_size, max = mapgsz)
       sizexfeuille = mipgsz*key_portrait+mapgsz*(1-key_portrait)
@@ -438,6 +428,6 @@
    cm = 1.*normeref/cmref
 ;
-; We modify the array norme to an element having the value cm be represented 
-; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors 
+; We modify the array norme to an element having the value cm be represented
+; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors
 ; we want to draw.
 ;
@@ -446,5 +436,5 @@
 ;
 ; Stage 3
-; Now that we have the angle and the norme, we recuperate coordinates in 
+; Now that we have the angle and the norme, we recuperate coordinates in
 ; rectangular and we draw arrows.
 ;
@@ -467,5 +457,5 @@
 ;
    if NOT keyword_set(novectref) then BEGIN
-      dx = cmref*cv_cm2normal(0) ; Lenght of the vector of reference in normalzed coordinates.
+      dx = cmref*cv_cm2normal(0) ; Length of the vector of reference in normalzed coordinates.
       if keyword_set(vectrefformat) then $
        normelegende = strtrim(string(normeref, format = vectrefformat), 1)+' ' $
@@ -490,11 +480,11 @@
 ;
 
-   if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun 
+   if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun
 ;------------------------------------------------------------
 ;------------------------------------------------------------
    return
-END 
-
-
-
-
+END
+
+
+
+
