Ignore:
Timestamp:
03/16/07 10:22:26 (17 years ago)
Author:
pinsard
Message:

corrections of some misspellings in some *.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro

    r163 r226  
    11;+ 
    2 ; @file_comments  
    3 ;  
    4 ;  
     2; @file_comments 
     3; 
     4; 
    55; @categories 
    6 ;  
    7 ;  
    8 ; @param ANGLE  
    9 ; 
     6; 
     7; 
     8; @param ANGLE 
    109; 
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @restrictions 
    15 ;  
    16 ;  
     13; 
    1714; @examples 
    1815; 
    19 ; 
    2016; @history 
    21 ;  
    2217; 
    2318; @version 
     
    2924; by rapport at the x axis and which must do 1 cm on the drawing. 
    3025; Angle can be an array. 
    31 ;  
     26; 
    3227; 
    3328; 
     
    5348; 
    5449;+ 
    55 ; @file_comments  
    56 ;  
    57 ;  
     50; @file_comments 
     51; 
     52; 
    5853; @categories 
    59 ;  
    60 ;  
     54; 
     55; 
    6156; @param U 
    6257; 
     
    6459; @param V 
    6560; 
    66 ; 
    67 ; @param W  
    68 ; 
     61; @param W 
    6962; 
    7063; @restrictions 
    71 ;  
    72 ;  
     64; 
    7365; @examples 
    7466; 
    75 ; 
    7667; @history 
    77 ;  
    7868; 
    7969; @version 
     
    8777  compile_opt idl2, strictarrsubs 
    8878; 
    89    IF n_elements(w) NE 0 THEN BEGIN  
     79   IF n_elements(w) NE 0 THEN BEGIN 
    9080      norme = sqrt(u^2.+v^2.+w^2.) 
    9181      ind = where(norme NE 0) 
     
    9888      u[ind] = u[ind]/norme[ind] 
    9989      v[ind] = v[ind]/norme[ind] 
    100    ENDELSE  
     90   ENDELSE 
    10191END 
    10292;------------------------------------------------------------ 
     
    111101; and is position on the sphere). 
    112102; 
    113 ; @categories  
     103; @categories 
    114104; Graphics 
    115 ;  
     105; 
    116106; @param COMPOSANTEU {in}{required} 
    117 ; It is the u component of the vector to be traced. This 2d array has the  
     107; It is the u component of the vector to be traced. This 2d array has the 
    118108; same dimension that reduitindice2d (see further) 
    119 ;  
     109; 
    120110; @param COMPOSANTEV {in}{required} 
    121 ; It is the v component of the vector to be traced. This 2d array has the  
     111; It is the v component of the vector to be traced. This 2d array has the 
    122112; same dimension that reduitindice2d (see further) 
    123 ;  
     113; 
    124114; @param NORMEVECTEUR 
    125115; 
    126116; 
    127117; @param INDICE2D  {in}{required} 
    128 ; It in an index allowing to to pass from an jpi or jpj array to the zoom  
     118; It in an index allowing to to pass from an jpi or jpj array to the zoom 
    129119; on which we do the drawing 
    130 ;  
     120; 
    131121; @param REDUITINDICE2D {in}{required} 
    132 ; It is an index allowing to pass from an array defined by indice2d to the  
    133 ; array for which we really have vectors to be traced (to be clear, it is  
     122; It is an index allowing to pass from an array defined by indice2d to the 
     123; array for which we really have vectors to be traced (to be clear, it is 
    134124; for example when we trace only one vector on two). 
    135125; 
    136126; @keyword CMREF {default=between .5 and 1.5 cm} 
    137 ; The length in cm that must measure the arrow normed normeref. By default,  
     127; The length in cm that must measure the arrow normed normeref. By default, 
    138128; it is adjusted to other drawing and included between .5 and 1.5 cm. 
    139129; 
    140130; @keyword MISSING 
    141 ; The value of a missing value. Do not use this keyword. Fixed at 1e5 by  
     131; The value of a missing value. Do not use this keyword. Fixed at 1e5 by 
    142132; ajoutvect.pro 
    143 ;       
    144 ; @keyword NORMEREF  
     133; 
     134; @keyword NORMEREF 
    145135; The norme of the reference arrow. 
    146136; 
    147137; @keyword VECTCOLOR {default=0} 
    148138; The color of the arrow. Black by default (color 0) 
    149 ;  
     139; 
    150140; @keyword VECTTHICK {default=1} 
    151 ; The thick of the arrow.  
     141; The thick of the arrow. 
    152142; 
    153143; @keyword VECTREFPOS 
    154 ; Vector composed of 2 elements specifying the position on DATA coordinates  
    155 ; from the beginning of the reference vector. By default at the right bottom  
     144; Vector composed of 2 elements specifying the position on DATA coordinates 
     145; from the beginning of the reference vector. By default at the right bottom 
    156146; of the drawing. 
    157147; 
     
    161151; @keyword NOVECTREF 
    162152; To delete the display of the reference vector. 
    163 ;  
     153; 
    164154; @keyword _EXTRA 
    165 ; Used to pass your keywords  
    166 ; 
    167 ; @uses  
     155; Used to pass your keywords 
     156; 
     157; @uses 
    168158; common.pro 
    169159; 
     
    179169; 
    180170; @version 
    181 ; $Id$  
     171; $Id$ 
    182172; 
    183173;- 
     
    209199   msk = replicate(1, nx, ny) 
    210200   if keyword_set(missing) then terre = where(abs(zu) GE missing/10) ELSE terre = -1 
    211    if terre[0] NE -1  then BEGIN  
     201   if terre[0] NE -1  then BEGIN 
    212202      msk[terre] = 0 
    213203      zu[terre] = 0 
     
    216206   ENDIF 
    217207; 
    218 ; Stage 1:  
    219 ; 
    220 ; Given that the directions and the sense that the vector has on the sphere,  
    221 ; we have to try to determinate this direction and the sense that the vector  
     208; Stage 1: 
     209; 
     210; Given that the directions and the sense that the vector has on the sphere, 
     211; we have to try to determinate this direction and the sense that the vector 
    222212; will have on the screen once it will have been projected. 
    223213; 
    224 ; In theory: on the sphere, a vector in a given point has for direction the  
    225 ; tangent at the circle passing by the center of the Earth and by the vector.  
     214; In theory: on the sphere, a vector in a given point has for direction the 
     215; tangent at the circle passing by the center of the Earth and by the vector. 
    226216; So, find the direction once the projection is done, it is find the tangent 
    227 ; to the curve representing the projection of the circle on the 2d plan at the  
    228 ; point representing the projection of the starting point of the shere on the  
     217; to the curve representing the projection of the circle on the 2d plan at the 
     218; point representing the projection of the starting point of the sphere on the 
    229219; 2d plan. 
    230 ;  
    231 ; In practice we do no know the definition of the curve given by the projection  
     220; 
     221; In practice we do no know the definition of the curve given by the projection 
    232222; of a circle so find its tangente in a point... 
    233223; 
    234224; What we do: 
    235225; In a 3d cartesian reference, 
    236 ;       a) We find coorinates of the point T (starting of the arrow) situed  
     226;       a) We find coordinates of the point T (starting of the arrow) situed 
    237227;       on the sphere. 
    238228;       b) To each point T, we determine local directions defined by the grid 
    239229;       on this point and on which coordinates (u,v) of the vector refer to. 
    240230;       These local directions are defined by gradients of glam and gphi. Once 
    241 ;       we have obtain these directions, we considare them like orthogonal and 
     231;       we have obtain these directions, we consider them like orthogonal and 
    242232;       by norming them, we build an orthonormal reference (nu,nv) on which 
    243233;       coordinates (u,v) of the vector refer to. In the starting 3d cartesian 
     
    254244;       e) We pass coordinates of these points in normalized coordinates, then 
    255245;       in polar coordinates in order to find the angle and the direction they 
    256 ;       dertermine on the drawing. 
     246;       determine on the drawing. 
    257247; 
    258248; 
     
    280270; points u[i,j] and u[i-1,j] (resp v[i,j] and v[i,j-1]) which define, for each 
    281271; point on the sphere, local directions associated with u and v. These vectors 
    282 ; define a local orthonormal reference.  
    283 ; These vectors are built in a cartesian reference (cv_coord). We have choose a  
     272; define a local orthonormal reference. 
     273; These vectors are built in a cartesian reference (cv_coord). We have choose a 
    284274; unity radius of the Earth (unit). 
    285275; 
     
    294284   uy = reform(r[1, *], nxgd, nygd) 
    295285   uz = reform(r[2, *], nxgd, nygd) 
    296 ; calculation of nu  
     286; calculation of nu 
    297287   nux = ux-shift(ux, 1, 0) 
    298288   nuy = uy-shift(uy, 1, 0) 
     
    311301   IF finite(glamv[0]*gphiv[0]) NE 0 THEN $ 
    312302   coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius[*]] ]) $ 
    313    ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ])                 
     303   ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ]) 
    314304   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    315305; coordinates of points of the grid in cartesian. 
     
    317307   vy = reform(r[1, *], nxgd, nygd) 
    318308   vz = reform(r[2, *], nxgd, nygd) 
    319 ; calcul of nv  
     309; calcul of nv 
    320310   nvx = vx-shift(vx, 0, 1) 
    321311   nvy = vy-shift(vy, 0, 1) 
     
    383373; Stage 1, e) 
    384374; 
    385    r = convert_coord(glam,gphi,/data,/to_normal)  
     375   r = convert_coord(glam,gphi,/data,/to_normal) 
    386376   x0 = r[0, *]                 ; normal coordinates of the beginning of the array. 
    387    y0 = r[1, *]                 ;  
    388     
    389    r = convert_coord(glam1,gphi1,/data,/to_normal)  
     377   y0 = r[1, *]                 ; 
     378 
     379   r = convert_coord(glam1,gphi1,/data,/to_normal) 
    390380   x1 = r[0, *]                 ; normal coordinates of the ending of the array (Before scaling). 
    391    y1 = r[1, *]                 ;  
     381   y1 = r[1, *]                 ; 
    392382; 
    393383; tests to avoid that arrows be drawing out of the domain. 
     
    397387   if out[0] NE -1 THEN x0[out] = !values.f_nan 
    398388; 
    399 ; Following projections, there may are points at NaN when we pass in normal coordinates.  
     389; Following projections, there may are points at NaN when we pass in normal coordinates. 
    400390; We delete these points. 
    401391; 
     
    422412; Now we take care of the norme... 
    423413; 
    424 ; Automatic putting at the scale  
    425 ; 
    426    if NOT keyword_set(cmref) then BEGIN  
     414; Automatic putting at the scale 
     415; 
     416   if NOT keyword_set(cmref) then BEGIN 
    427417      mipgsz = min(page_size, max = mapgsz) 
    428418      sizexfeuille = mipgsz*key_portrait+mapgsz*(1-key_portrait) 
     
    438428   cm = 1.*normeref/cmref 
    439429; 
    440 ; We modify the array norme to an element having the value cm be represented  
    441 ; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors  
     430; We modify the array norme to an element having the value cm be represented 
     431; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors 
    442432; we want to draw. 
    443433; 
     
    446436; 
    447437; Stage 3 
    448 ; Now that we have the angle and the norme, we recuperate coordinates in  
     438; Now that we have the angle and the norme, we recuperate coordinates in 
    449439; rectangular and we draw arrows. 
    450440; 
     
    467457; 
    468458   if NOT keyword_set(novectref) then BEGIN 
    469       dx = cmref*cv_cm2normal(0) ; Lenght of the vector of reference in normalzed coordinates. 
     459      dx = cmref*cv_cm2normal(0) ; Length of the vector of reference in normalzed coordinates. 
    470460      if keyword_set(vectrefformat) then $ 
    471461       normelegende = strtrim(string(normeref, format = vectrefformat), 1)+' ' $ 
     
    490480; 
    491481 
    492    if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun  
     482   if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun 
    493483;------------------------------------------------------------ 
    494484;------------------------------------------------------------ 
    495485   return 
    496 END  
    497  
    498  
    499  
    500  
     486END 
     487 
     488 
     489 
     490 
Note: See TracChangeset for help on using the changeset viewer.