Ignore:
Timestamp:
03/19/07 18:15:51 (17 years ago)
Author:
pinsard
Message:

improvements/corrections of some *.pro headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checkfield.pro

    r163 r231  
    11;+ 
    2 ; @file_comments  
    3 ;  
    4 ;  
     2; 
     3; @file_comments 
     4; 
    55; @categories 
    6 ;  
    7 ;  
     6; 
    87; @param TYPE {in}{required}{type=string} 
    98; A string of two characters specifying the type of plot we do 
     
    2120; 
    2221; @returns 
    23 ;  
    24 ;  
     22; 
    2523; @restrictions 
    26 ;  
    27 ;  
     24; 
    2825; @examples 
    2926; 
    30 ; 
    3127; @history 
    32 ;  
    3328; 
    3429; @version 
    3530; $Id$ 
    3631;- 
     32; 
    3733FUNCTION err_1d, type, n1, name, n2 
    3834; 
     
    4541; 
    4642;+ 
    47 ; @file_comments  
    48 ;  
    49 ;  
     43; 
     44; @file_comments 
     45; 
    5046; @categories 
    51 ;  
    52 ;  
     47; 
    5348; @param TYPE {in}{required}{type=string} 
    5449; A string of two characters specifying the type of plot we do 
    5550; 
    56 ; @param SZ {in}{optional}{default=defined by grille.pro}  
    57 ;  
    58 ; @param NX {in}{optional}{default=defined by grille.pro}  
    59 ;  
    60 ; @param NY {in}{optional}{default=defined by grille.pro}   
    61 ;  
     51; @param SZ {in}{optional}{default=defined by <pro>grille<pro>} 
     52; 
     53; @param NX {in}{optional}{default=defined by <pro>grille</pro>} 
     54; 
     55; @param NY {in}{optional}{default=defined by <pro>grille</pro>} 
     56; 
    6257; @param NZ 
    63 ;  
    64 ;  
     58; 
    6559; @returns 
    66 ;  
    67 ;  
     60; 
    6861; @restrictions 
    69 ;  
    70 ;  
     62; 
    7163; @examples 
    7264; 
    73 ; 
    7465; @history 
    75 ;  
    7666; 
    7767; @version 
    7868; $Id$ 
    7969;- 
     70; 
    8071FUNCTION err_2d, type, sz, nx, ny, nz 
    8172; 
     
    9586; 
    9687;+ 
    97 ; @file_comments  
    98 ;  
    99 ;  
     88; 
     89; @file_comments 
     90; 
    10091; @categories 
    101 ;  
    102 ;  
     92; 
    10393; @param TYPE {in}{required}{type=string} 
    10494; A string of two characters specifying the type of plot we do 
    10595; 
    106 ; @param SZ {in}{optional}{default=defined by grille.pro}  
    107 ;  
    108 ; @param NX {in}{optional}{default=defined by grille.pro}  
    109 ;  
    110 ; @param NY {in}{optional}{default=defined by grille.pro}   
    111 ;  
     96; @param SZ {in}{optional}{default=defined by <pro>grille</pro>} 
     97; 
     98; @param NX {in}{optional}{default=defined by <pro>grille</pro>} 
     99; 
     100; @param NY {in}{optional}{default=defined by <pro>grille</pro>} 
     101; 
    112102; @param NZ 
    113 ;  
    114 ;  
     103; 
    115104; @returns 
    116 ;  
    117 ;  
     105; 
    118106; @restrictions 
    119 ;  
    120 ;  
     107; 
    121108; @examples 
    122109; 
    123 ; 
    124110; @history 
    125 ;  
    126111; 
    127112; @version 
    128113; $Id$ 
     114; 
    129115;- 
     116; 
    130117FUNCTION err_3d, type, sz, nx, ny, nz 
    131118; 
     
    143130                  + ', ' + strtrim(jpt, 1) + ']'], /simple) 
    144131END 
    145 ;------------------------------------------------------------ 
    146 ;------------------------------------------------------------ 
    147 ;------------------------------------------------------------ 
     132; 
    148133;+ 
    149134; 
    150135; @file_comments 
    151 ; In input of plt, pltz, pltt and plt1d, it check that the field give  
    152 ; a size compatible with the domain and, if needed, average to give us  
     136; In input of plt, pltz, pltt and plt1d, it check that the field give 
     137; a size compatible with the domain and, if needed, average to give us 
    153138; a 2d array if we make a plot of the type: 'xy', 'xz', 'xt', 'yz', 'yt' 
    154139; , 'zt' or a 1d array if we make a plot of the type: 'x', 'y', 'z', 't'. 
     
    156141; @categories 
    157142; Graphics 
    158 ;  
     143; 
    159144; @param FIELD {in}{required}{type=field} 
    160 ; It respect litchamp.pro's criterions. See IDL>xhelp,'litchamp' 
     145; It respect <pro>litchamp</pro>'s criterions. See IDL>xhelp,'litchamp' 
    161146; 
    162147; @param PROCEDURE {in}{required} 
    163148; 
    164 ;  
    165149; @keyword TYPE 
    166150; 
    167 ; 
    168151; @keyword NOQUESTION 
    169152; 
    170 ; 
    171153; @keyword BOXZOOM {type=vector} 
    172 ; Vector indicating the geographic zone on which we want to cut the map.  
     154; Vector indicating the geographic zone on which we want to cut the map. 
    173155;  If BOXZOOM has : 
    174156; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     
    181163; 
    182164; @keyword WDEPTH 
    183 ; to specify that the field is at W depth instead of T  
     165; to specify that the field is at W depth instead of T 
    184166; depth (automatically activated if vargrid eq 'W') 
    185 ;  
     167; 
    186168; @keyword VECTEUR{type=vetcor} 
    187169; It is a structure composed by 2 elements containing the 2 fields U 
     
    193175; 
    194176; @keyword _EXTRA 
    195 ; used to pass your keywords 
    196 ; 
    197 ; @keyword DIREC    
    198 ; 
    199 ; 
    200 ; @uses  
     177; Used to pass keywords 
     178; 
     179; @keyword DIREC 
     180; 
     181; @uses 
    201182; common.pro 
    202183; 
     
    208189; $Id$ 
    209190; 
    210 ; @todo seb: mettre les param  
     191; @todo seb: mettre les param 
    211192; 
    212193;- 
    213 ;------------------------------------------------------------ 
    214 ;------------------------------------------------------------ 
    215 ;-------------------------------------------------------------- 
    216194; 
    217195FUNCTION checkfield, field, procedure, TYPE = type, BOXZOOM = boxzoom, DIREC = direc, NOQUESTION = noquestion, VECTEUR = vecteur, WDEPTH = wdepth, _EXTRA = ex 
    218 ;-------------------------------------------------------------- 
    219196; 
    220197  compile_opt idl2, strictarrsubs 
    221198; 
    222 ; include commons 
    223199@cm_4mesh 
    224200@cm_4cal 
     
    237213    if arr EQ -1 then $ 
    238214      return, report('Error: input array = -1. Maybe the reading did ont perform well...', /simple) $ 
    239     ELSE return, report('Error: input array is a scalar', /simple)      
     215    ELSE return, report('Error: input array is a scalar', /simple) 
    240216  ENDIF 
    241217  nan = total(finite(arr, /nan)) < 1 
     
    264240  ENDIF 
    265241; 
    266 ; The procedure domdef determine elements which are inside the boxzoom.  
    267 ;  
     242; The procedure domdef determine elements which are inside the boxzoom. 
     243; 
    268244  if strpos(type, 'z') NE -1 THEN BEGIN 
    269     if NOT keyword_set(localbox) then BEGIN  
     245    if NOT keyword_set(localbox) then BEGIN 
    270246      localbox = [minprof, profdefault] 
    271247      if keyword_set(wdepth) then grillechoice = 'W' $ 
     
    275251    nelbox = n_elements(localbox) 
    276252;we keep yranges (z axis) before changing the boxzoom. 
    277     !y.range = [localbox[nelbox-1], localbox[nelbox-2]]  
     253    !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 
    278254    if vargrid EQ 'W' OR keyword_set(wdepth) then BEGIN 
    279255      firstzw = 0 > (firstzw-1) 
     
    329305                            , 'Impossible to make a "'+type+'" plot with a 1D array'], /simple) 
    330306      ENDCASE 
    331     END  
     307    END 
    332308;-------------------------------------------------------------- 
    333309    2:BEGIN 
     
    372348        'zt':IF sz[1] NE nz OR sz[2] NE jpt THEN return, err_2d(type, sz, nx, ny, nz) ; zt array 
    373349      ENDCASE 
    374     END  
     350    END 
    375351;-------------------------------------------------------------- 
    376352    3:BEGIN 
     
    426402            sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ  nz:direc = 'x' ; xyz array 
    427403            nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 't' ; (x)yzt 
    428             ELSE:return, err_3d(type, sz, nx, ny, nz)  
     404            ELSE:return, err_3d(type, sz, nx, ny, nz) 
    429405          endcase 
    430406        END 
     
    433409            sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpt:direc = 'y' ; xyt array 
    434410            sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'z' ; x(y)zt array 
    435             ELSE:return, err_3d(type, sz, nx, ny, nz)  
     411            ELSE:return, err_3d(type, sz, nx, ny, nz) 
    436412          endcase 
    437413        END 
     
    440416            sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpt:direc = 'x' ; xyt array 
    441417            nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'z' ; (x)yzt array 
    442             ELSE:return, err_3d(type, sz, nx, ny, nz)  
     418            ELSE:return, err_3d(type, sz, nx, ny, nz) 
    443419          endcase 
    444420        END 
     
    447423            sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'x' ; x(y)zt array 
    448424            nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'y' ; (x)yzt array 
    449             ELSE:return, err_3d(type, sz, nx, ny, nz)  
     425            ELSE:return, err_3d(type, sz, nx, ny, nz) 
    450426          ENDCASE 
    451         END  
    452       ENDCASE  
    453     END  
    454 ;-------------------------------------------------------------- 
    455     4:BEGIN  
     427        END 
     428      ENDCASE 
     429    END 
     430;-------------------------------------------------------------- 
     431    4:BEGIN 
    456432      CASE type OF 
    457433        'x':direc = 'yzt' 
     
    465441        'yt':direc = 'xz' 
    466442        'zt':direc = 'xy' 
    467       ENDCASE  
     443      ENDCASE 
    468444    END 
    469445  ENDCASE 
Note: See TracChangeset for help on using the changeset viewer.