Ignore:
Timestamp:
07/21/06 14:47:49 (18 years ago)
Author:
navarro
Message:

english and nicer header (2a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/CALCULS/depth2level.pro

    r134 r142  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: depth2level 
    65; 
    7 ; PURPOSE: permet de passer d''un tableau 2d de profondeur au tableau 
    8 ; 2d correspondant de niveaux. 
     6; @file_comments  
     7; Allows to pass from a 2d depth array to a corresponding 2d level array. 
    98; 
    10 ; CATEGORY: SANS BOUCLE 
     9; @categories 
     10; Without loop 
    1111; 
    12 ; CALLING SEQUENCE: res=depth2level(depth2d) 
     12; @param TAB  
     13; 2d depth array (or a structure respecting litchamp critrions) 
    1314; 
    14 ; INPUTS: depth2d tableau 2d de profondeur (ou une structure repondant 
    15 ; aux criteres de litchamp) 
     15; @keyword UPPER 
     16; (activated by default) We select the level just above the depth 
    1617; 
    17 ; KEYWORD PARAMETERS: 
     18; @keyword LOWER 
     19; We select the level just below the depth  
    1820; 
    19 ;      /UPPER: (active par defaut) on selectionne le niveau 
    20 ;      directement au dessus de la profondeur 
     21; @keyword CLOSER  
     22; We select the depth's closer level  
    2123; 
    22 ;      /LOWER: on selectionne le niveau directement au dessous de la 
    23 ;      profondeur  
     24; @keyword NOMASK  
     25; To do not mask land points 
    2426; 
    25 ;      /CLOSER: on selectionne le niveau le plus proche de la 
    26 ;      profondeur  
     27; @returns  
     28; It is a 2d array containing level's values. 
    2729; 
    28 ;      /NOMASK: pour ne pas masquer les points terres 
     30; @uses 
     31; common.pro 
    2932; 
    30 ; OUTPUTS: un tableau 2d contenant les valeurs des niveaux. 
     33; @restrictions  
     34; For depthes out of gdep's values, the value !values.f_nan is sent back. 
     35; if the depth is superior to this one of the bottom, we send back jpk-1 in  
     36; the upper case, and !values.f_nan in the lower case. 
    3137; 
    32 ; COMMON BLOCKS:common.pro 
    33 ; 
    34 ; SIDE EFFECTS:pour les profondeurs hors des valeurs de gdep, la 
    35 ; valeur !values.f_nan est retournee. 
    36 ; Si la profondeur est superieur a celle du fond, on retourne 
    37 ; jpk-1dans le cas upper, et !values.f_nan ds le cas lower. 
    38 ; 
    39 ; RESTRICTIONS: 
    40 ; 
    41 ; EXAMPLE: 
    42 ; 
    43 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 
     38; @history 
     39; Sebastien Masson (smasson@lodyc.jussieu.fr) 
    4440;                       17/6/1999 
    4541;                       15/6/2000 accepte !values.f_nan 
     42; 
     43; @version 
     44; $Id$ 
    4645;- 
    4746;------------------------------------------------------------ 
     
    5352  compile_opt idl2, strictarrsubs 
    5453; 
    55    tempsun = systime(1)         ; pour key_performance 
     54   tempsun = systime(1)         ; for key_performance 
    5655@common 
    5756;------------------------------------------------------------ 
     
    5958   if keyword_set(lower) THEN upper = 0 
    6059;------------------------------------------------------------ 
    61 ; lecture du champ d''entree et recuperation de la taille du sous 
    62 ; domaine utilise 
     60; Reading of the input field and recuperation of the used subdomain's size 
    6361;------------------------------------------------------------ 
    6462   in = litchamp(tab) 
    6563   grille,mask,-1,-1,gdep,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
    6664;--------------------------------------------------------------- 
    67 ; verification de la coherence entre la taille du tableau et le domaine definit par domdef 
     65; Verification of the coherence between array's size and the defined by domdef domain 
    6866;--------------------------------------------------------------- 
    6967   IF ny EQ 1 THEN in = reform(in, nx, ny, /over) 
     
    7876;------------------------------------------------------------ 
    7977;------------------------------------------------------------ 
    80 ; vire les points a !values.f_nan 
     78; delete points at !values.f_nan 
    8179   notanumber = where(finite(in, /nan) EQ 1) 
    8280   if notanumber[0] NE -1 then in[notanumber] = 0 
    8381;------------------------------------------------------------ 
    84 ; on transforme le tableau 2d de profondeur en tableau 2d de niveaux 
    85 ; correspondant aux profondeurs 
     82; We transform the 2d deth value in a 2d array of levels corresponding to depthes 
    8683;------------------------------------------------------------ 
    87 ; on passe en tableaux qui ont la taille des tableaux 3d 
     84; We go on array who have the size of 3d arrays 
    8885   prof=replicate(1,nx*ny)#gdep[firstz:lastz]  
    8986   in = in[*]#replicate(1, nz) 
     
    9996   IF notvalid[0] NE -1 THEN levels[notvalid] = !values.f_nan 
    10097 
    101 ; si closer est active 
     98; If closer is activated 
    10299   if keyword_set(closer) then begin 
    103100      test = [ [[litchamp(tab)-level2depth(levels)]] $ 
     
    108105   endif 
    109106;------------------------------------------------------------ 
    110 ; on replace les points a !values.f_nan 
     107; We put back points at !values.f_nan 
    111108   if notanumber[0] NE -1 then levels[notanumber] = !values.f_nan 
    112 ; on masque les points terres a valmask 
     109; We mask land points at valmask 
    113110   if NOT keyword_set(nomask) then begin 
    114111      if n_elements(valmask) EQ 0 then valmask = 1e20 
Note: See TracChangeset for help on using the changeset viewer.