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

corrections of some misspellings in some *.pro

Location:
trunk/SRC/ToBeReviewed/PLOTS
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro

    r171 r226  
    55; 
    66; @file_comments 
    7 ; Overlayer contour to trace a field which can be mask.  
     7; Overlayer contour to trace a field which can be mask. 
    88; Elementary brick of plt, pltz et pltt. 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Graphics 
    1212; 
     
    2121; 
    2222; @param MASK {in}{required}{type=array} 
    23 ; It is the array who mask z2d (with 0s on points we want to mask and 1s on others).  
     23; It is the array who mask z2d (with 0s on points we want to mask and 1s on others). 
    2424; If z2d is not masked, put this argument equal to 1. 
    2525; 
    2626; @param XM {in}{required} 
    27 ; Axis of the mask. Vector or array of the same size that mask.  
     27; Axis of the mask. Vector or array of the same size that mask. 
    2828; This is the coordinate of mask on x. 
    2929; 
    3030; @param YM {in}{required} 
    31 ; Axis of the mask. Vector or array of the same size that mask.  
     31; Axis of the mask. Vector or array of the same size that mask. 
    3232; This is the coordinate of mask on y. 
    3333; 
    3434; @param LEVELS {in}{optional}{type=vector} 
    35 ; Vectors which contain levels needed at the contour.  
     35; Vectors which contain levels needed at the contour. 
    3636; If it is not given, we take 20 levels between the min and the max. 
    37 ;   
     37; 
    3838; @param COLORS {in}{optional}{type=vector} 
    39 ; Vectors which contain colors needed at the contour.  
     39; Vectors which contain colors needed at the contour. 
    4040; If it is not given, we take 20 levels between the min and the max. 
    4141; 
    42 ; @keyword COLORTRICHAMP  
     42; @keyword COLORTRICHAMP 
    4343; The color we want to use to draw the triangulation which is used to make contours of the field. 
    4444; 
    45 ; @keyword COLORTRIMASK  
     45; @keyword COLORTRIMASK 
    4646; The color we want to use to draw the triangulation which is used to make contours of the mask. 
    4747; 
    48 ; @keyword COLOR_C  
     48; @keyword COLOR_C 
    4949; To draw the contour in color instead of in black 
    50 ; with filling in color  
    51 ; 
    52 ; @keyword CONT_NOFILL  
    53 ; Activate it not to fill the point mask to let them transparent!  
     50; with filling in color 
     51; 
     52; @keyword CONT_NOFILL 
     53; Activate it not to fill the point mask to let them transparent! 
    5454; Comment: Nevertheless, we trace mask's contour. 
    5555; 
     
    5757; The color of the continent. 
    5858; 
    59 ; @keyword DESSTRICHAMP  
    60 ; To draw the triangulation which is used to make field's contours.  
    61 ; 
    62 ; @keyword DESSTRIMASK  
     59; @keyword DESSTRICHAMP 
     60; To draw the triangulation which is used to make field's contours. 
     61; 
     62; @keyword DESSTRIMASK 
    6363; To draw the triangulation which is used to make mask's contours. 
    64 ;  
    65 ; @keyword FORPLT  
     64; 
     65; @keyword FORPLT 
    6666; To activate if we want that the drawing of coast be realized by tracecote rather than tracemask. 
    6767; 
    6868; @keyword I_COLORS {type=vector} 
    69 ; It is a vector specifying the colors to use to trace contours.  
     69; It is a vector specifying the colors to use to trace contours. 
    7070; It is the same thing that c_colors which act on contours. 
    7171; 
     
    7474;  % Out of range subscript encountered: <LONG      Array[38911]>. 
    7575;  % Execution halted at:  PLTBASE           151 
    76 ;             If the bug still exist, increase the value of more!  
     76;             If the bug still exist, increase the value of more! 
    7777; (The explanation and the justification of this method do not have scientific bases yet...). 
    7878; 
     
    8989; I specify we only label one contour on two. 
    9090; 
    91 ; @keyword CONTOUR  
     91; @keyword CONTOUR 
    9292; To be used since plt, pltz or pltt. (Have a look on these routines). 
    9393; 
    94 ; @keyword _EXTRA  
     94; @keyword _EXTRA 
    9595; Used to pass your keywords 
    9696; 
     
    106106; 8/2/2000 check if the tri array is not equal to 
    107107; -1. allow contour with out using a triangulation. 
    108 ;  
     108; 
    109109; @version 
    110110; $Id$ 
     
    146146;--------------------------------------------------------- 
    147147; 
    148 ; Explanation concerning contour. This keyword is activated when we trace a  
     148; Explanation concerning contour. This keyword is activated when we trace a 
    149149; colored contour different from the one with black trait. 
    150150; If it is activated (case n_elements(contour) NE 0), we pass 2 time in pltbase: 
    151151;   1) We trace colors then we leave, it is the case: 
    152152;         n_elements(contour) NE 0 AND n_elements(contour) NE 4) 
    153 ;   2) We trace contours in traits then continents, it is the case:  
     153;   2) We trace contours in traits then continents, it is the case: 
    154154;         n_elements(contour) NE 0 AND n_elements(contour) EQ 4) 
    155155; 
     
    162162; If levels and colors aren't given 
    163163;---------------------------------------------------------------------- 
    164   if n_params() EQ 4 then $  
     164  if n_params() EQ 4 then $ 
    165165    label, 0, min(z2d*mask), max(z2d*mask), ncontour, levels, colors 
    166166; attention bidouille inexplicable pour que tout se passe bien avec les 
     
    171171; Is cell_fill is a part of _extra, we desactive it if it is nt equal to 2 
    172172;---------------------------------------------------------------------- 
    173   IF chkstru(ex, 'CELL_FILL') THEN BEGIN  
     173  IF chkstru(ex, 'CELL_FILL') THEN BEGIN 
    174174    cell_fill = ex.CELL_FILL 
    175175    if ex.CELL_FILL NE 2 then ex.CELL_FILL = 0 
    176176  ENDIF ELSE cell_fill = 0      ; 
    177177;---------------------------------------------------------------------- 
    178 ; I) Filling of contours in palette colors  
     178; I) Filling of contours in palette colors 
    179179;---------------------------------------------------------------------- 
    180180  if NOT keyword_set(more) then more = 10 
    181181  if NOT keyword_set(nofill) AND NOT keyword_set(color_c) then begin 
    182     if n_elements(contour) NE 4 THEN BEGIN  
     182    if n_elements(contour) NE 4 THEN BEGIN 
    183183      if usetri EQ 2 then BEGIN 
    184184        IF size(x, /n_dimensions) EQ 1 THEN x = x#replicate(1, (size(z2d))[2]) 
     
    191191        IF size(y, /n_dimensions) EQ 2 THEN y = reform(y[0, *]) 
    192192        contour, z2d, x, y, levels = levels, c_color = colors, /noerase $ 
    193           , /fill, _extra = ex  
     193          , /fill, _extra = ex 
    194194      ENDELSE 
    195195    ENDIF 
    196196  ENDIF 
    197   if n_elements(contour) NE 0 AND n_elements(contour) NE 4 THEN GOTO, fini  
     197  if n_elements(contour) NE 0 AND n_elements(contour) NE 4 THEN GOTO, fini 
    198198  IF chkstru(ex, 'C_ORIENTATION') THEN ex = extractstru(ex, 'C_ORIENTATION') 
    199199  IF chkstru(ex, 'C_SPACING') THEN ex = extractstru(ex, 'C_SPACING') 
     
    207207; 
    208208    IF (n_elements(mask) GT 1 OR n_elements(masknan) GT 1) $ 
    209       AND NOT keyword_set(cont_nofill) THEN BEGIN  
    210       IF keyword_set(maskorg) THEN tonan = maskorg*masknan ELSE tonan = mask*masknan  
     209      AND NOT keyword_set(cont_nofill) THEN BEGIN 
     210      IF keyword_set(maskorg) THEN tonan = maskorg*masknan ELSE tonan = mask*masknan 
    211211      tonan = where(remplit(tonan, nite = 1, mask = tonan $ 
    212212                            , /basique, fillval = 0 $ 
    213213                            , fillxdir = keyword_set(realsection)) EQ 0, count) 
    214214      IF count NE 0 THEN z2d[temporary(tonan)] = !values.f_nan 
    215     ENDIF    
     215    ENDIF 
    216216; 
    217217; We do not pass if we have to make differents contours... 
     
    232232      ENDCASE 
    233233; 
    234       IF usetri EQ 2 THEN BEGIN  
     234      IF usetri EQ 2 THEN BEGIN 
    235235        IF size(x, /n_dimensions) EQ 1 THEN x = x#replicate(1, (size(z2d))[2]) 
    236236        IF size(y, /n_dimensions) EQ 1 THEN y = replicate(1, (size(z2d))[1])#y 
     
    253253    IF chkstru(ex, 'LEVELS') THEN ex = extractstru(ex, 'LEVELS') 
    254254    IF chkstru(ex, 'NODATA') THEN ex = extractstru(ex, 'NODATA') 
    255     IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) <  255     
    256 ; 
    257 ; If there is points at NaN  
    258 ; We trace points in white at NaN bafore drawing coasts with a trait. 
     255    IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) <  255 
     256; 
     257; If there is points at NaN 
     258; We trace points in white at NaN before drawing coasts with a trait. 
    259259; 
    260260    if keyword_set(trinan) THEN BEGIN 
     
    298298              , COINDESCEND = coindescendmask, CONT_COLOR = cont_color, _extra = ex 
    299299          END 
    300           ELSE:BEGIN  
     300          ELSE:BEGIN 
    301301            IF size(xm, /n_dimensions) EQ 2 THEN xm = xm[*, 0] 
    302302            IF size(ym, /n_dimensions) EQ 2 THEN ym = reform(ym[0, *]) 
     
    310310;------------------------------------------------------------ 
    311311      case 1 of 
    312         keyword_set(realsection) AND NOT keyword_set(cont_nofill):       
     312        keyword_set(realsection) AND NOT keyword_set(cont_nofill): 
    313313        keyword_set(realsection) AND keyword_set(cont_nofill): $ 
    314314          drawsectionbottom, mask, xm, ym $ 
     
    334334; 
    335335fini: 
    336   IF keyword_set(key_performance) THEN print, 'temps pltbase', systime(1)-tempsun  
     336  IF keyword_set(key_performance) THEN print, 'temps pltbase', systime(1)-tempsun 
    337337 
    338338  return 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r172 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Trace vertical graphs. 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Graphics 
    1111; 
    12 ; @param TAB  
     12; @param TAB 
    1313; The field whose we want to make a vertical cut can be 2 kind of thing: 
    14 ;         1) An 2d or 3d array.  
    15 ;         If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom.  
     14;         1) An 2d or 3d array. 
     15;         If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom. 
    1616;         If the field is 3d, we extract the section on we average possibly before to do the plot. 
    17 ;         2)  a structure respecting all criterions specified by litchamp.pro.  
     17;         2)  a structure respecting all criterions specified by litchamp.pro. 
    1818;          See IDL> xhelp,'litchamp'. The array contained in the structure must be 2 or 3d (See case 1) 
    1919; 
    2020; ces arguments ne sont pas obligatoires: 
    21 ;   
     21; 
    2222;       MAX: valeur maximum que l'on veut prendre en compte dans le trace 
    2323; des contours. Par defaut on prend le max de tab1 (sur les pts mer) 
     
    2626; des contours. Par defaut on prend le min de tab1 (sur les pts mer) 
    2727; 
    28 ; @keyword BOXZOOM  
    29 ; Vector indicating the geographic zone on which we want to cut the map.  
     28; @keyword BOXZOOM 
     29; Vector indicating the geographic zone on which we want to cut the map. 
    3030;  If BOXZOOM has : 
    3131; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     
    3737; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    3838; 
    39 ; @keyword CONTINTERVALLE  
    40 ; When CONTOUR is activated, it is the value between 2 isolines  
    41 ; traced by a trait. So it can be different from the one specified by INTERVALLE which,  
    42 ; in this case, does not control colored isolines in color anymore. If there is noone  
    43 ; specified min, we choose a contour min which goes well with the specified interval!  
    44 ; If this keyword is not specified, we trace 20 isolines from the min to the max.  
     39; @keyword CONTINTERVALLE 
     40; When CONTOUR is activated, it is the value between 2 isolines 
     41; traced by a trait. So it can be different from the one specified by INTERVALLE which, 
     42; in this case, does not control colored isolines in color anymore. If there is noone 
     43; specified min, we choose a contour min which goes well with the specified interval! 
     44; If this keyword is not specified, we trace 20 isolines from the min to the max. 
    4545; 
    4646; @keyword CONTLABEL {type=integer} 
    4747; When CONTOUR is activated, if n 
    48 ; is different of 0, choose the label type corresponding to n cases for  
    49 ; the traced by a traitisolines. To specify the type of label of the  
     48; is different of 0, choose the label type corresponding to n cases for 
     49; the traced by a traitisolines. To specify the type of label of the 
    5050; colored contour, use LABEL 
    5151; 
    5252; @keyword CONTMAX {default=max of the keyword CONTOUR (on ocean points)} 
    53 ; When CONTOUR is activated, max value we want to consider in the isoline  
     53; When CONTOUR is activated, max value we want to consider in the isoline 
    5454; traced by a trait's line. 
    5555; 
    5656; @keyword CONTMIN {default=min of the keyword CONTOUR (on ocean points)} 
    57 ; When CONTOUR is activated, min value we want to consider in the isoline  
    58 ; traced by a trait's line.  
     57; When CONTOUR is activated, min value we want to consider in the isoline 
     58; traced by a trait's line. 
    5959; 
    6060; @keyword CONTNLEVEL {default=20} 
     
    6363; CONTLABEL=0). 
    6464; 
    65 ; @keyword CONTOUR  
    66 ; If we want to trace contours of a different field than the one  
    67 ; whose we have the colored drawing (by example E-P in color and QSR in contours).  
     65; @keyword CONTOUR 
     66; If we want to trace contours of a different field than the one 
     67; whose we have the colored drawing (by example E-P in color and QSR in contours). 
    6868; It must be a field respecting same characteristics than the argument number one of plt. 
    6969; 
    70 ; @keyword ENDPOINTS  
    71 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities  
    72 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are  
    73 ; coordinates.  
    74 ; 
    75 ; @keyword INTERVALLE  
    76 ; Value of an internal between to isoline. If there is none specified min,  
    77 ; we choose a min contour which goes well with the specified interval!. If this keyword is not  
    78 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated,  
    79 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval  
     70; @keyword ENDPOINTS 
     71; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 
     72; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 
     73; coordinates. 
     74; 
     75; @keyword INTERVALLE 
     76; Value of an internal between to isoline. If there is none specified min, 
     77; we choose a min contour which goes well with the specified interval!. If this keyword is not 
     78; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 
     79; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 
    8080; between 2 isolines traced by a trait, use CONTINTERVALLE. 
    8181; 
    82 ; @keyword INV  
    83 ; Invert the color vector used to color the graph  
     82; @keyword INV 
     83; Invert the color vector used to color the graph 
    8484;               (without use the black, the white and the used palette) 
    8585; 
    8686; @keyword ZRATIO {default=2./3} 
    87 ; When the drawing has a zoomed part, it is the size rapport between the zoomed part,  
     87; When the drawing has a zoomed part, it is the size rapport between the zoomed part, 
    8888; hz (zoom height), and the whole drawing, ht (total height). 
    8989; 
    9090; @keyword LABEL {default=0}{type=integer} 
    9191; It choose the label's type corresponding to cases in label.pro. 
    92 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines.  
    93 ; For these one traced by a trait, use CONTLABEL.  
    94 ; 
    95 ; @keyword MAXIN  
     92; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 
     93; For these one traced by a trait, use CONTLABEL. 
     94; 
     95; @keyword MAXIN 
    9696; to specify the max value we want to plot with a keyword instead of with the 
    9797; input parameter max. If max is defined by both, parameter and keyword, the 
    9898; keyword is retained. 
    9999; 
    100 ; @keyword MININ  
     100; @keyword MININ 
    101101; to specify the min value we want to plot with a keyword instead of with the 
    102102; input parameter min. If min is defined by both, parameter and keyword, the 
     
    106106; Number of contour to draw by default =20. active if 
    107107; LABEL=0 or is not specified. 
    108 ;  
    109 ; @keyword NOTRI  
    110 ; To force not to use the triangulation. Beware, in this case, the  
    111 ; drawing only works if the grid is undeformed (It means that each point of a longitude  
    112 ; give one latitude and each point of a latitude give one longitude) except if we use  
    113 ; the keyword CELL_FILL=2.  
     108; 
     109; @keyword NOTRI 
     110; To force not to use the triangulation. Beware, in this case, the 
     111; drawing only works if the grid is undeformed (It means that each point of a longitude 
     112; give one latitude and each point of a latitude give one longitude) except if we use 
     113; the keyword CELL_FILL=2. 
    114114; Comment: if the field contain points !values.f_nan, then we even do a triangulation. 
    115115; 
    116 ; @keyword OVERPLOT  
    117 ; To make a plot over an other one.  
    118 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword  
     116; @keyword OVERPLOT 
     117; To make a plot over an other one. 
     118; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 
    119119; does not the caption and/or the color bar. 
    120120; 
    121 ; @keyword SIN  
    122 ; Activate this keyword if we want the x axis to be traced in sinus of the  
     121; @keyword SIN 
     122; Activate this keyword if we want the x axis to be traced in sinus of the 
    123123; latitude when we make a drawing f(y) 
    124124; 
    125 ; @keyword STRICTFILL  
    126 ; Activate this keyword to that the filling of contours be  
    127 ; precisely done between the min and the max specified letting values inferior at the  
     125; @keyword STRICTFILL 
     126; Activate this keyword to that the filling of contours be 
     127; precisely done between the min and the max specified letting values inferior at the 
    128128; specified min and values superior at the specified max in white. 
    129129; 
     
    131131; Contour's style to adopt to draw isolines 
    132132; 
    133 ; @keyword WDEPTH  
    134 ; To specify that the field is at W depth instead of T  
     133; @keyword WDEPTH 
     134; To specify that the field is at W depth instead of T 
    135135; depth (automatically activated if vargrid eq 'W') 
    136136; 
     
    209209  IF usetri EQ 1 AND keyword_set(realsection) THEN usetri = 0 
    210210; did we specify the type ? 
    211   if keyword_set(typein) then BEGIN  
     211  if keyword_set(typein) then BEGIN 
    212212    if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 
    213213      if n_elements(min) NE 0 then max = min 
     
    216216    type = typein 
    217217  ENDIF 
    218 ;  
     218; 
    219219  checktypeminmax, 'pltz', TYPE = type, MIN = min, MAX = max $ 
    220220    , XZ = xz, YZ = yz, ENDPOINTS = endpoints, _extra = ex 
    221221; 
    222222  if keyword_set(endpoints) then begin 
    223     section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $  
     223    section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 
    224224    , BOXZOOM = boxzoom, DIREC = direc, WDEPTH = wdepth, _extra = ex 
    225     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN  
     225    if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    226226      restoreboxparam, 'boxparam4pltz.dat' 
    227227      return 
    228228    ENDIF 
    229     nx = n_elements(glam)  
     229    nx = n_elements(glam) 
    230230    ny = nx 
    231231    if strupcase(vargrid) EQ 'W' then begin 
     
    240240    z2d = checkfield(tab, 'pltz', TYPE = type, BOXZOOM = boxzoom $ 
    241241                     , DIREC = direc, WDEPTH = wdepth, _extra = ex) 
    242     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN  
     242    if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    243243      restoreboxparam, 'boxparam4pltz.dat' 
    244244      return 
     
    260260  z2d = reverse(z2d, 2) 
    261261;----------------------------------------------------------------------------- 
    262 ; Determination of the mi:min and of the ma:max of z2d in the same way  
     262; Determination of the mi:min and of the ma:max of z2d in the same way 
    263263; as max: max and min: min for the drawing. 
    264264;----------------------------------------------------------------------------- 
     
    316316      z2d = remplit(z2d, nite = 1-(n_elements(maskfill) NE 0) $ 
    317317                    , mask = z2d LT valmask/10, /basique, _extra = ex) 
    318   ENDIF ELSE BEGIN  
     318  ENDIF ELSE BEGIN 
    319319; filling the mask values with 8 neighbourg 
    320320    z2d = remplit(z2d, nite = (1+(vargrid NE 'T')+keyword_set(nan)) $ 
    321321                  *(1-(n_elements(maskfill) NE 0)), mask = mask*masknan $ 
    322322                  , /basique, _extra = ex) 
    323   ENDELSE  
     323  ENDELSE 
    324324  if keyword_set(strictfill) EQ 0 AND n_elements(maskfill) EQ 0 $ 
    325325    then z2d = min > z2d <  max 
     
    329329  ENDIF 
    330330;---------------------------------------------------------- 
    331 ; check the mask and the triangulation according to the grid type and  
     331; check the mask and the triangulation according to the grid type and 
    332332; nan values. find the coordinates of the mask 
    333 ;----------------------------------------------------------  
     333;---------------------------------------------------------- 
    334334;   if (where(mask EQ 0))[0] EQ -1 AND NOT keyword_set(nan) then notri = 1 
    335335;   if keyword_set(notri) then trifield = -1 $ 
     
    347347    xmask = xxaxis 
    348348    zmask = zzaxis 
    349   ENDELSE  
    350 ; 
    351   if (usetri GE 1 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN BEGIN  
     349  ENDELSE 
     350; 
     351  if (usetri GE 1 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN BEGIN 
    352352    IF keyword_set(realsection) THEN trimsk = triangule(mask, /basic) $ 
    353353    ELSE trimsk = triangule(mask, /basic, coinmonte = coinmontemask $ 
    354354                            , coindescend = coindescendmask) 
    355   ENDIF      
     355  ENDIF 
    356356;------------------------------------------------------------ 
    357357; dessin en lui meme 
     
    387387    return 
    388388  endif 
    389   if keyword_set(contour) THEN BEGIN  
     389  if keyword_set(contour) THEN BEGIN 
    390390    pourlegende = [1, 1, 1, 1] 
    391391    oldattributs = saveatt() 
     
    403403; 3rd part: drawing of the frame, caption, colorbar... 
    404404;------------------------------------------------------------ 
    405   if keyword_set(overplot) then BEGIN  
     405  if keyword_set(overplot) then BEGIN 
    406406    !y.range =  [zoom, profmin] ; We get back on physic coordinates 
    407407    plot, [0], [0], /nodata, /noerase, title = '', subtitle = '', xstyle = 5, ystyle = 5 
     
    409409  endif 
    410410;------------------------------------------------------------ 
    411 ; Caption + dysplay of them 
     411; Caption + display of them 
    412412;------------------------------------------------------------ 
    413413  legende, mi, ma, type, CONTOUR = pourlegende, INTERVALLE = intervalle, DIREC = direc, endpoints = endpoints, _EXTRA = ex 
     
    423423; Y axis in 1 or 2 part 
    424424;------------------------------------------------------------ 
    425   if n_elements(ex) NE 0 then BEGIN  
     425  if n_elements(ex) NE 0 then BEGIN 
    426426; To do not put title anymore 
    427427    if (where(tag_names(ex) EQ 'TITLE'))[0] NE -1 then ex.TITLE = ' ' 
     
    429429    if (where(tag_names(ex) EQ 'SUBTITLE'))[0] NE -1 then ex.SUBTITLE = ' ' 
    430430; To have just one ytitle 
    431     if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then BEGIN  
     431    if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then BEGIN 
    432432      ytitle = ex.YTITLE 
    433433      ex.YTITLE = ' ' 
     
    480480  restoreboxparam, 'boxparam4pltz.dat' 
    481481; 
    482   if keyword_set(key_performance) NE 0 THEN print, 'temps pltz', systime(1)-tempsun  
     482  if keyword_set(key_performance) NE 0 THEN print, 'temps pltz', systime(1)-tempsun 
    483483  return 
    484484end 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.pro

    r223 r226  
    4343; 1) I reinitializate the graphic environment (variables !x, !y et !p): 
    4444  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 
    45 ; 2) i put the drawing on the screen like on the postcript 
     45; 2) i put the drawing on the screen like on the postscript 
    4646; if ex contains norease and c_orientation keywords we force ex.noerase = 0 
    4747  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex 
    48 ; fiddle when noerase is used with c_orentation... 
     48; fiddle when noerase is used with c_orientation... 
    4949; call contour with /nodata to get the graphic environment, then force 
    5050; noerase = 0 and overplot = 1 
    5151  IF size(ex, /type) EQ 8 THEN BEGIN 
    52 ; check if noerase is used with c_orentation 
     52; check if noerase is used with c_orientation 
    5353    alltags = strlowcase(tag_names(ex)) 
    5454    dummy = where(alltags EQ 'noerase', count1) 
     
    7171    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex 
    7272  ENDCASE 
    73 ; fiddle when noerase is used with c_orentation... draw the contour axis 
     73; fiddle when noerase is used with c_orientation... draw the contour axis 
    7474  IF keyword_set(noerase_orientation)  THEN BEGIN 
    7575    ex.noerase = 1 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/splot.pro

    r223 r226  
    4747; 1) I reinitializate the graphic environment (les variables !x, !y et !p): 
    4848   if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 
    49 ; 2) i put the drawing on the screen like on the postcript 
     49; 2) i put the drawing on the screen like on the postscript 
    5050   placedessin, 'autre', _extra = ex 
    5151; 3) Drawing 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro

    r163 r226  
    77; Enhanced version of tvscl 
    88; 
    9 ; @categories quick exploration of 2D arrays  
    10 ; 
    11 ; INPUTS:  
     9; @categories quick exploration of 2D arrays 
    1210; 
    1311; @param Z2D {in}{required} 
     
    2119; of cellsize that forces tvplus to create a window larger than 
    2220; the screen, a "scrolling window" will be displayed instead of a 
    23 ; regular window. Unfortunately the nice functionnalities of tvplus 
     21; regular window. Unfortunately the nice functionalities of tvplus 
    2422; are not coded for "scrolling window" case... 
    2523; 
     
    3331; The color number that should be used for the mask values. 
    3432; 
    35 ; @keyword OFFSET  
     33; @keyword OFFSET 
    3634; 2 elements vector used by tvplus itself when showing zoom. 
    3735; It is used to shift the ranges of xaxis and yaxis. 
    38 ; For example: tvplus,sst[x1:x2,y1:y2],offest=[x1,y1] 
    39 ; 
    40 ; @keyword MASK  
     36; For example: tvplus,sst[x1:x2,y1:y2],offset=[x1,y1] 
     37; 
     38; @keyword MASK 
    4139; The mask value. Note that if abs(mask) < 1.e6, then the 
    4240; exact value of the mask is used to find the maskwd point. 
     
    6765; @keyword _EXTRA 
    6866; used to pass keywords to TV, PLOT, COLORBAR 
    69 ;  
    70 ; @restrictions  
     67; 
     68; @restrictions 
    7169; use your mouse to scan the array values... 
    7270;     left button  : mouse position and associated array value 
     
    7472;     right button : quit 
    7573; 
    76 ; the nice functionnalities of tvplus are not coded 
     74; the nice functionalities of tvplus are not coded 
    7775; for "scrolling window" case... 
    7876; 
     
    102100  arr = reform(float(z2d)) 
    103101;------------------------------------------------------------ 
    104 ; check the size of the input array  
     102; check the size of the input array 
    105103;------------------------------------------------------------ 
    106104  if (size(arr))[0] NE 2 then begin 
     
    130128;------------------------------------------------------------ 
    131129; Compute the size (in pixel) of the square representing 1 
    132 ; point of the input array  
     130; point of the input array 
    133131;------------------------------------------------------------ 
    134132  dimensions = GET_SCREEN_SIZE() 
    135   if n_elements(cellsize) EQ 0 then BEGIN  
     133  if n_elements(cellsize) EQ 0 then BEGIN 
    136134    cellsize = min(floor(dimensions/(size(z2d))[1: 2]*.75)) 
    137   ENDIF ELSE $  
     135  ENDIF ELSE $ 
    138136; we need to use a scrolling bar window 
    139137  if cellsize GE min(floor(dimensions/(size(z2d))[1: 2]*.75)) then scrolling = 1 
     
    145143; Change the value of the masked value for the min of the non-masked values 
    146144;------------------------------------------------------------ 
    147   if n_elements(mask) then BEGIN  
    148     if abs(mask) LT 1e6 then BEGIN  
     145  if n_elements(mask) then BEGIN 
     146    if abs(mask) LT 1e6 then BEGIN 
    149147      masked = where(arr EQ mask) 
    150148      if masked[0] NE -1 then arr[masked] = min(arr[where(arr NE mask)]) 
    151     ENDIF ELSE BEGIN  
     149    ENDIF ELSE BEGIN 
    152150      masked = where(abs(arr) GE abs(mask)/10.) 
    153151      if masked[0] NE -1 then arr[masked] = min(arr[where(abs(arr) LT abs(mask)/10.)]) 
     
    157155; apply min/max keywords 
    158156;------------------------------------------------------------ 
    159   if n_elements(min) NE 0 then BEGIN  
     157  if n_elements(min) NE 0 then BEGIN 
    160158    arr = min > arr 
    161159    truemin = min 
    162160  ENDIF ELSE truemin = min(arr) 
    163   if n_elements(max) NE 0 then BEGIN  
     161  if n_elements(max) NE 0 then BEGIN 
    164162    arr = arr < max 
    165163    truemax = max 
     
    171169  ENDIF 
    172170;------------------------------------------------------------ 
    173 ; apply other keywords (nointerp, c_nan, c_mask)  
     171; apply other keywords (nointerp, c_nan, c_mask) 
    174172;------------------------------------------------------------ 
    175173  if NOT keyword_set(nointerp) then BEGIN 
     
    177175    m = 1.*(ncolors-1)/(truemax-truemin) 
    178176    p = bottom-1.*truemin*m 
    179     arr = round(m*temporary(arr)+p)  
    180   endif 
    181 ; set c_nan for NaN values  
     177    arr = round(m*temporary(arr)+p) 
     178  endif 
     179; set c_nan for NaN values 
    182180  if keyword_set(nan) then begin 
    183181    if n_elements(c_nan) NE 0 THEN arr[nanindex] = c_nan <  (ncolmax -1) $ 
     
    190188  arr = byte(temporary(arr)) 
    191189; increase the size of the array in order to be displayed 
    192 ; with the suitable size  
     190; with the suitable size 
    193191  szarr = size(arr, /dimensions) 
    194192  arr = congrid(temporary(arr), szarr[0]*cellsize, szarr[1]*cellsize) 
     
    205203    if NOT keyword_set(window) then window = 0 
    206204    window, window, xsize = nx+marginpix[0]+marginpix[1] $ 
    207             , ysize = ny+marginpix[2]+marginpix[3]  
     205            , ysize = ny+marginpix[2]+marginpix[3] 
    208206; for 24 bits colors, make sure thate the background color is the good one... 
    209207    if !d.n_colors gt 256 then BEGIN 
     
    215213    tv, arr, marginpix[0], marginpix[2], _EXTRA = ex 
    216214; 
    217 ; axis and plot frame  
     215; axis and plot frame 
    218216; 
    219217; get the normalized position of the tv (we just done above) 
     
    233231    xenvsauve = !x & yenvsauve = !y & penvsauve = !p 
    234232; 
    235 ; draw the colorbar  
     233; draw the colorbar 
    236234; 
    237235    IF truemin ne truemax THEN BEGIN 
     
    244242    ENDIF 
    245243;      !p.position = poscadre 
    246   ENDIF ELSE BEGIN  
     244  ENDIF ELSE BEGIN 
    247245;------------------------------------------------------------ 
    248246; scrolling bar window case... 
     
    261259                 , yvisible = round(.7*dimensions[1]) < (size(arr))[2], /register, congrid = 0, show_full = 0 
    262260    return 
    263   ENDELSE  
     261  ENDELSE 
    264262;------------------------------------------------------------ 
    265263; Use the mouse to get nice functionalities 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro

    r163 r226  
    55; 
    66; @file_comments 
    7 ; Overlayeur of colorbar 
     7; Overlayer of colorbar 
    88; 
    99; @categories 
     
    2323; 
    2424; @keyword NOCOLORBAR 
    25 ;  
     25; 
    2626; 
    2727; @keyword CB_TITLE 
    28 ;  
     28; 
    2929; 
    3030; @keyword NOFILL 
    31 ;  
     31; 
    3232; 
    3333; @keyword COLOR_c 
    34 ;  
     34; 
    3535; 
    3636; @keyword MIN 
     
    4141; 
    4242; @keyword DIVISIONS 
    43 ;  
     43; 
    4444; 
    4545; @keyword CB_SUBTITLE 
    46 ;  
     46; 
    4747; 
    4848; @keyword POST 
    49 ;  
     49; 
    5050; 
    5151; @keyword _EXTRA 
     
    8484  if keyword_set(divisions) THEN  clbdiv = divisions 
    8585  nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) $ 
    86                + keyword_set(color_c)   
     86               + keyword_set(color_c) 
    8787;------------------------------------------------------------ 
    8888    def_myuniquetmpdir 
     
    9999   ENDELSE 
    100100;------------------------------------------------------------ 
    101    if keyword_set(nocolorbar) then return  
     101   if keyword_set(nocolorbar) then return 
    102102;------------------------------------------------------------ 
    103103   ancienx = !x 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro

    r163 r226  
    77; Determine the min and the max of a mask array 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Plotting 
    1111; 
     
    1414; 
    1515; @param MASK {in}{required} 
    16 ; The mask array  
     16; The mask array 
    1717; 
    1818; @keyword MININ {type=scalar} 
     
    2222; If it is not defined, it takes the value of VRAIMAX 
    2323; 
    24 ; @keyword ZEROMIDDLE  
     24; @keyword ZEROMIDDLE 
    2525; Force the middle of the colorbar to be equal 
    2626; to 0 (force max=max(abs([min,max])) and min=-max) 
    27 ;  
     27; 
    2828; @keyword _EXTRA 
    2929; used to pass your keywords 
     
    3131; @keyword USETRI 
    3232; To force using triangulation. 
    33 ;  
     33; 
    3434; @param VRAIMIN {out} 
    3535; The min of the array 
     
    6464;----------------------------------------------------------------------------- 
    6565;----------------------------------------------------------------------------- 
    66 ; Type o fthe vertical grid: 
     66; Type of the vertical grid: 
    6767  if vargrid EQ 'W' then nz = nzw ELSE nz = nzt 
    6868; liste des points mer 
    6969  if (size(mask))[0] EQ 3 then mer = mask[*, *, 0] $ 
    7070  ELSE mer = mask 
    71 ; If key_irregular eq 1, we mask also points which are not in the geographic  
     71; If key_irregular eq 1, we mask also points which are not in the geographic 
    7272; domain defined by lon1,lon2,lat1,lat2 
    7373  if keyword_set(key_irregular) AND n_elements(glam) NE 0 AND n_elements(gphi) NE 0 then begin 
     
    8989; ma and mi : max and min on ocean points 
    9090  vraimax = max(tab[mer], min = vraimin, _extra = ex) 
    91   sameminmax = testvar(var = minin) EQ testvar(var = maxin)  
     91  sameminmax = testvar(var = minin) EQ testvar(var = maxin) 
    9292  if n_elements(maxin) EQ 0 OR sameminmax then maxin = vraimax 
    93   if n_elements(minin) EQ 0 OR sameminmax then BEGIN  
     93  if n_elements(minin) EQ 0 OR sameminmax then BEGIN 
    9494    if keyword_set(intervalle) then minin = floor(vraimin/intervalle)*intervalle $ 
    9595    ELSE minin = vraimin 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Putting into place of the drawing/ opening of the window or of the PS 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Utilities 
    1111; 
     
    1313; It specify what procedure is called by PLACEDESSIN: 'plt', 'pltz' or 'pltt' 
    1414; 
    15 ; @keyword LANDSCAPE  
     15; @keyword LANDSCAPE 
    1616; Force the page or the window on the screen to be in lengthened position. 
    1717; 
    1818; @keyword LCT {type=integer} 
    19 ; It designate the number of the palette of color we want to use for the plot.  
     19; It designate the number of the palette of color we want to use for the plot. 
    2020;        
    21 ; @keyword MAP  
     21; @keyword MAP 
    2222; We use it when we want to do a projection. 
    2323; This keyword can be of two types: 
    2424;     MAP=[P0lat,P0lon,Rot]. For the description of these 3 values (see the online help of MAP_SET). 
    25 ;     /MAP: In this case, map is automatically calculated have the value:  
     25;     /MAP: In this case, map is automatically calculated have the value: 
    2626;          map = [0, (lon1+lon2)/2., 0] 
    2727; Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo: 
    2828; IDL> demo 
    2929; Then choose earth sciences and  mapping. 
    30 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map).  
     30; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 
    3131; If we want an other projection, MAP must be activated and we have to add the keyword: /nom_projection. 
    3232; For example, for a polar projection centered on the south pole: 
     
    3434; IDL> plt, tab, /stereo,map=[-90,0,0] 
    3535;        
    36 ; @keyword NOCOLORBAR  
     36; @keyword NOCOLORBAR 
    3737; We active it if we do not want the colorbar. 
    3838 
    39 ;; @keyword NOFILL  
     39;; @keyword NOFILL 
    4040; We active it if we only want contours in black and white with a white background. 
    4141; 
    42 ; @keyword NOERASE  
     42; @keyword NOERASE 
    4343; We active it to make a drawing without creating a new frame. 
    4444; 
    45 ; @keyword SMALL  
    46 ; Vector composed of 3 or 4 elements, applied to make a drawing on a  
     45; @keyword SMALL 
     46; Vector composed of 3 or 4 elements, applied to make a drawing on a 
    4747; small portion of a page or screen. It delimit the zone where the drawing will be done. 
    4848;     If there is 4 elements: 
    49 ; then is constituted of coordinates (expressed in cm located from the up and  
    50 ; left corner of the page or the window (in portrait like in landscape)) of the bottom  
     49; then is constituted of coordinates (expressed in cm located from the up and 
     50; left corner of the page or the window (in portrait like in landscape)) of the bottom 
    5151; and left corner and of the up and right corner of the drawing zone. 
    5252;     If there is 3 elements: 
    53 ; in this case, we divide the page or the screen in small[0] columns and in small[1] lines  
    54 ; the drawing made in the box numbered small[2]. The numerotation starting up and left by  
     53; in this case, we divide the page or the screen in small[0] columns and in small[1] lines 
     54; the drawing made in the box numbered small[2]. The numerotation starting up and left by 
    5555; the number 1 and then, following the writing direction. 
    56 ; By default, we make the largest drawing we can do, conserving the aspect rapport  
     56; By default, we make the largest drawing we can do, conserving the aspect rapport 
    5757; (except when REMPLI is activated). 
    58 ;  
    59 ; @keyword PORTRAIT  
     58; 
     59; @keyword PORTRAIT 
    6060; Force the page or the window to be in standing position. 
    6161; 
    62 ; @keyword POST  
     62; @keyword POST 
    6363; Make a postscript. Only works if we made one drawing on the page. 
    6464; If we make several drawing, use \@ps. 
    6565; 
    66 ; @keyword REMPLI  
     66; @keyword REMPLI 
    6767; Force the drawing to occupy the whole space defined by small. 
    6868; 
    69 ; @keyword WINDOW  
    70 ; Number of the window on which we want to do the graph (Allow to open several windows).  
     69; @keyword WINDOW 
     70; Number of the window on which we want to do the graph (Allow to open several windows). 
    7171; By default, we open 'IDL0' 
    7272; 
    73 ; @keyword CB_TITLE  
     73; @keyword CB_TITLE 
    7474; The colorbar's title 
    7575; 
    76 ; @keyword CONTOUR  
    77 ; If we want to trace contours of a different field than the one  
    78 ; whose we have the colored drawing (by example E-P in color and QSR in contours).  
     76; @keyword CONTOUR 
     77; If we want to trace contours of a different field than the one 
     78; whose we have the colored drawing (by example E-P in color and QSR in contours). 
    7979; It must be a field respecting same characteristics than the argument number one of plt. 
    8080; 
    81 ; @keyword ENDPOINTS  
    82 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities  
    83 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are  
    84 ; coordinates.  
     81; @keyword ENDPOINTS 
     82; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 
     83; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 
     84; coordinates. 
    8585; 
    8686; @keyword VECTEUR {type=vector} 
     
    9494; @keyword DIREC 
    9595; 't' 'x' 'y' 'z' 'xys' 'xz' 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 
    96 ;       'xzt' 'yzt' 'xyzt' Direction on which do averages  
     96;       'xzt' 'yzt' 'xyzt' Direction on which do averages 
    9797; 
    9898; @keyword _EXTRA 
    9999; Used to pass your keywords. 
    100100; 
    101 ; @keyword COLOR_C  
     101; @keyword COLOR_C 
    102102; To draw the contour in color instead of in black 
    103 ; with filling in color  
     103; with filling in color 
    104104; 
    105105; @param POSFENETRE {out}{type=vector} 
    106 ; It is a vector composed by 4 elements containing the position of the frame  
    107 ; containing captions and the graph in normalized coordinates.  
    108 ; Comment: To position the drawing; we have to do !p.position=posfenetre  
     106; It is a vector composed by 4 elements containing the position of the frame 
     107; containing captions and the graph in normalized coordinates. 
     108; Comment: To position the drawing; we have to do !p.position=posfenetre 
    109109; after the call of the caliber 
    110110; 
    111111; @param POSBAR {out}{type=vector} 
    112 ; Like POSFENETRE but for the color bar.  
     112; Like POSFENETRE but for the color bar. 
    113113; Same comment to position the color bar, !p.position=posbar 
    114114; 
     
    148148; 1) Determination of the size of margins (unity=number of lines or columns) 
    149149; to the left, to the right, up and down. 
    150 ; BEWARE in margebar, the last element is the right up corner  
     150; BEWARE in margebar, the last element is the right up corner 
    151151; instead of the up margin 
    152152;------------------------------------------------------------- 
     
    157157    margebar = 1.*[marge[0]+1, marge[1]+1,  marge[2]-8,  marge[2]-6] 
    158158    if keyword_set(barmarges) then margebar = margebar+barmarges 
    159   ENDIF ELSE BEGIN  
    160     nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) + keyword_set(color_c)   
     159  ENDIF ELSE BEGIN 
     160    nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) + keyword_set(color_c) 
    161161    case typedessin of 
    162162      'plt':marge = 1.*[6, 2, 4, 3] 
     
    186186; Portrait or landscape 
    187187;-------------------------------------------------------------- 
    188   IF NOT keyword_set(noerase) THEN BEGIN  
     188  IF NOT keyword_set(noerase) THEN BEGIN 
    189189    CASE 1 OF 
    190190      n_elements(portrait) NE 0:key_portrait = portrait 
     
    192192      ELSE: 
    193193    ENDCASE 
    194   ENDIF  
     194  ENDIF 
    195195;-------------------------------------------------------------- 
    196196; What type of aspect rapport (it will be crushed if YXASPECT exist) 
     
    218218;------------------------------------------------------------ 
    219219  case 1 of 
    220 ; case of the first drawing on a postcript 
     220; case of the first drawing on a postscript 
    221221    keyword_set(post) AND !d.name ne 'PS':openps, _extra = ex 
    222222; case of the first drawing on a screen 
     
    236236      windsize = givewindowsize() 
    237237      window, window, xsize = windsize[0], ysize = windsize[1],  retain = 2, _extra = ex 
    238 ; When we used colors which are coded on 24bit, we can not stipulate the background color  
     238; When we used colors which are coded on 24bit, we can not stipulate the background color 
    239239; of a window thanks to !p.background, so we have to to this: 
    240240;          if !d.n_colors gt 256 then begin 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/restoreatt.pro

    r163 r226  
    55; 
    66; @file_comments 
    7 ; Allows to reattribuate global variables associated with a field  
     7; Allows to reattribute global variables associated with a field 
    88; when we give a structure created by saveatt.pro by example. 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Utilities 
    1212; 
    1313; @param STRUCT {in}{required} 
    14 ; a structure like the one who read litchamp.  
     14; a structure like the one who read litchamp. 
    1515;        See IDL> xhelp,'litchamp' 
    1616; 
     
    1919; 
    2020; @restrictions 
    21 ; Change the value if global variables attribute of a field: vargrid,  
     21; Change the value if global variables attribute of a field: vargrid, 
    2222; varname, varunit, vardate, varexp , valmask and time. 
    2323; 
     
    4747         'e':varexp = struct.(i) 
    4848         'm':valmask = struct.(i) 
    49          'd':BEGIN  
    50             if size(struct.(i),/type) EQ 7 THEN BEGIN  
     49         'd':BEGIN 
     50            if size(struct.(i),/type) EQ 7 THEN BEGIN 
    5151               vardate = struct.(i) 
    5252            ENDIF ELSE BEGIN 
     
    5555            ENDELSE 
    5656         end 
    57          ELSE:BEGIN  
     57         ELSE:BEGIN 
    5858            ras = report('Le nom '+nomelements[i]+' ne correspont a aucun element reconnu de la structure. !C cf. IDL> xhelp, ''litchamp''') 
    5959         end 
  • trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro

    r163 r226  
    1313; Number of the type of the label we want to trace 
    1414;        
    15 ; @param MIN {in}{required}  
     15; @param MIN {in}{required} 
    1616; Smallest value for the drawing of the contour. 
    1717; 
     
    2020; 
    2121; @keyword INTERVALLE {default=20} 
    22 ; Value of an interval between two isolines. By default, it is calculated to  
     22; Value of an interval between two isolines. By default, it is calculated to 
    2323; draw 20 isolines. In all cases, this keyword must be returned have a nice 
    2424; caption. If levels do not contain regular intervals, put it at -1. 
     
    2929; @param NCONTOUR {out} 
    3030; Number of contour to be drawn. 
    31 ;  
     31; 
    3232; @param LEVEL_Z2D {out} 
    3333; Vector containing values of contours we draw. 
     
    3939; common.pro 
    4040; 
    41 ; @history  
     41; @history 
    4242; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    4343;                       7/5/98 
    4444; 
    45 ; @version  
     45; @version 
    4646; $Id$ 
    4747; 
     
    8686         ncontour  = fix((max-min)/intervalle) 
    8787         ncontour = 1 > ncontour 
    88          level_z2d = min + intervalle*findgen(Ncontour)  
     88         level_z2d = min + intervalle*findgen(Ncontour) 
    8989         colnumb   = ncoul*(findgen(Ncontour))/Ncontour+ncoul/(2*ncontour) 
    9090         max=level_z2d[Ncontour-1]+intervalle 
  • 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 
  • trunk/SRC/ToBeReviewed/PLOTS/axe.pro

    r209 r226  
    88; pltz and pltt 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Graphics 
    1212; 
    1313; @param COUPE {type=string} 
    14 ; It designate the type of cut to which the axes we create  
     14; It designate the type of cut to which the axes we create 
    1515; must report. For example: 'xy','xt'... 
    1616; 
    1717; @param TEMPSMIN {in}{required} 
    18 ; In the case where we do cut containing the time dimension, we have  
     18; In the case where we do cut containing the time dimension, we have 
    1919; to specify the beginning of the time's axis in julian days. 
    2020; 
    2121; @param TEMPSMAX {in}{required} 
    22 ; In the case where we do cut containing the time dimension, we have  
     22; In the case where we do cut containing the time dimension, we have 
    2323; to specify the end of the time's axis in julian days. 
    2424; 
    25 ; @keyword SIN  
     25; @keyword SIN 
    2626; activated when we trace in sinus of the latitude 
    2727; 
    2828; @keyword SEPDATE {type=string} 
    29 ; It separate the different constituents of the date. By default,  
    30 ; it is a return to the line when we do a 'yt', 'zt' or a 't'.  
    31 ; In the other cases, it is a blank.  
     29; It separate the different constituents of the date. By default, 
     30; it is a return to the line when we do a 'yt', 'zt' or a 't'. 
     31; In the other cases, it is a blank. 
    3232; 
    3333; @keyword DIGITSYEAR 
     
    3636; information on %Z and %Y. 
    3737; 
    38 ; @keyword _EXTRA  
     38; @keyword _EXTRA 
    3939; used to pass your keywords 
    40 ;  
     40; 
    4141; @uses 
    4242; common.pro 
     
    6565   tempsun = systime(1)         ; pour key_performance 
    6666;-------------------------------------------------------------- 
    67 ; Management of ticks of the time axis in the case of TEMPSMIN  
    68 ; and TEMPSMAX are definied 
     67; Management of ticks of the time axis in the case of TEMPSMIN 
     68; and TEMPSMAX are defined 
    6969;-------------------------------------------------------------- 
    7070   divday = 0 
     
    9494          ymax-ymin+1 GT 10: BEGIN & freq = 2. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 
    9595          ELSE: BEGIN & freq = 1. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 
    96           ENDCASE  
     96          ENDCASE 
    9797          nticks = ceil((ymax-ymin)/freq) + 2 
    9898          yminf = (floor(ymin/freq))*freq 
     
    174174          for mn = 0, nticks-1 do ticknom[mn] = julday(mmin, dmin, ymin, hmin, mnminf + freq*mn, 0, _EXTRA = ex) 
    175175          ticknom = ticknom[where(ticknom GE tempsmin AND ticknom LE tempsmax, nticks)] 
    176           datfmt = '%H:%I'  
     176          datfmt = '%H:%I' 
    177177        END 
    178178; second base 
     
    201201      dummy = label_date(0, 0, 0, DATE_FORMAT = datfmt, _EXTRA = ex) 
    202202      if chkstru(ex, 'DATE_FORMAT') then ex.DATE_FORMAT = '' 
    203    ENDIF  
     203   ENDIF 
    204204;-------------------------------------------------------------- 
    205205; Definition of axes parameters case by case 
    206206;-------------------------------------------------------------- 
    207207   case coupe of 
    208       'pltv':BEGIN  
     208      'pltv':BEGIN 
    209209        dtasize = tempsmin 
    210210         !x.range = [-0.5, dtasize[0] - 0.5] 
    211          !y.range = [-0.5, dtasize[1] - 0.5]  
     211         !y.range = [-0.5, dtasize[1] - 0.5] 
    212212         if keyword_set(reverse_x) then !x.range=reverse(!x.range) 
    213213         if keyword_set(reverse_y) then !y.range=reverse(!y.range) 
     
    215215         !y.title = 'ny' 
    216216      END 
    217       'xy':BEGIN  
     217      'xy':BEGIN 
    218218         if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 
    219219         if keyword_set(reverse_y) then !y.range=[lat2,lat1] ELSE !y.range=[lat1,lat2] 
     
    221221         IF key_onearth THEN !y.tickformat='lataxe' 
    222222      END 
    223       'yz':BEGIN  
     223      'yz':BEGIN 
    224224         if keyword_set(reverse_x) then !x.range=[lat2,lat1] ELSE !x.range=[lat1,lat2] 
    225225         if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] 
     
    227227; number of ticks by default 
    228228            plot, [0], [0], /noerase, /nodata, xtick_get = xaxe 
    229 ; We increase this number to it be around 10  
     229; We increase this number to it be around 10 
    230230            ticks = n_elements(xaxe)-1 
    231231            ticks = ticks*[1, 2, 4, 8] 
     
    241241         endif 
    242242      end 
    243       'xz':BEGIN  
     243      'xz':BEGIN 
    244244         if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 
    245245         if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] 
     
    252252;          result = LABEL_DATE(DATE_FORMAT = '%M'+sep+fmtyr) 
    253253;          !y.tickformat='LABEL_DATE' 
    254          !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex)  
     254         !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex) 
    255255         !y.ticklen=1. 
    256256         !y.gridstyle=2 
     
    266266         if keyword_set(reverse_y) then !y.range=[lat2, lat1] ELSE !y.range=[lat1,lat2] 
    267267         IF key_onearth THEN !y.tickformat='lataxe' 
    268          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     268         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    269269         !x.ticklen=1. 
    270270         !x.gridstyle=2 
     
    278278         if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 
    279279         ELSE !x.range=[tempsmin,tempsmax]-tempsmin 
    280          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1]  
    281          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     280         if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 
     281         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    282282         !x.ticklen=1. 
    283283         !x.gridstyle=2 
     
    291291         if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 
    292292         ELSE !x.range=[tempsmin,tempsmax]-tempsmin 
    293          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     293         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    294294         !x.ticklen=1. 
    295295         !x.gridstyle=2 
     
    308308; Number of ticks by default 
    309309            plot, [0], [0], /nodata, /noerase, xstyle = 5, ystyle = 5, xtick_get = xaxe 
    310 ; We increase this number to it be around 10  
     310; We increase this number to it be around 10 
    311311            ticks = n_elements(xaxe)-1 
    312312            ticks = ticks*[1, 2, 4, 8] 
     
    324324      END 
    325325      'z' : begin 
    326 ;          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1]  
     326;          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 
    327327;          if keyword_set(reverse_y) then !y.range=[gdep[0], gdep[n_elements(gdep)-1]] $ 
    328328;          ELSE !y.range=[gdep[n_elements(gdep)-1], gdep[0]] 
    329       END  
     329      END 
    330330   endcase 
    331    if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun  
     331   if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun 
    332332   return 
    333333end 
Note: See TracChangeset for help on using the changeset viewer.