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/PLOTS/DIVERS/checkfield.pro

    r134 r142  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME:checkfield 
    6 ; 
    7 ; PURPOSE:en entree de plt, pltz, pltt et plt1d, verifie que le 
    8 ; champ donne a bien une taille compatible avec le domaine et fait au 
    9 ; besoin les moyennes pour ressortir en fin de fonction un tableau 2d 
    10 ; si on fait un plot du type: 'xy', 'xz', 'xt', 'yz', 'yt', 'zt' ou un 
    11 ; tableau 1d si on fait un plot du type 'x', 'y', 'z', 't'. 
    12 ; 
    13 ; CATEGORY:en entree de plt, pltz, pltt et plt1d 
    14 ; 
    15 ; CALLING SEQUENCE:res=checkfield(field, procedure) 
    16 ;  
    17 ; INPUTS: 
    18 ;        filed: un champ recomdant aux criteres de litchamp.pro, cf. 
    19 ;        IDL>xhelp,'litchamp' 
    20 ; 
    21 ; KEYWORD PARAMETERS: 
    22 ;  
    23 ;         /WDEPTH: to specify that the field is at W depth instad of T  
    24 ;         depth (automatically activated if vargrid eq 'W') 
    25 ; 
    26 ; OUTPUTS: 
    27 ; 
    28 ; COMMON BLOCKS:common.pro 
    29 ; 
    30 ; SIDE EFFECTS: 
    31 ; 
    32 ; RESTRICTIONS: 
    33 ; 
    34 ; EXAMPLE: 
    35 ; 
    36 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    37 ;                      08/02/2000 
    38 ;- 
    39 ;------------------------------------------------------------ 
    40 ;------------------------------------------------------------ 
    411FUNCTION err_1d, type, n1, name, n2 
    422; 
     
    7939                  + ', ' + strtrim(jpt, 1) + ']'], /simple) 
    8040END 
     41;------------------------------------------------------------ 
     42;------------------------------------------------------------ 
     43;------------------------------------------------------------ 
     44;+ 
     45; 
     46; @file_comments 
     47; In input of plt, pltz, pltt and plt1d, it check that the field give  
     48; a size compatible with the domain and, if needed, average to give us  
     49; a 2d array if we make a plot of the type: 'xy', 'xz', 'xt', 'yz', 'yt' 
     50; , 'zt' or a 1d array if we make a plot of the type: 'x', 'y', 'z', 't'. 
     51; 
     52; @categories 
     53; graphic 
     54;  
     55; @param FIELD {in}{required} 
     56; A field respecting litchamp.pro's criterions. See IDL>xhelp,'litchamp' 
     57; 
     58; @keyword BOXZOOM  
     59; Vector indicating the geographic zone on which we want to cut the map.  
     60;  If BOXZOOM has : 
     61; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     62; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     63; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     64; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     65; 6 elements: The extraction is made on Boxzoom 
     66; 
     67; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     68; 
     69; @keyword WDEPTH 
     70; to specify that the field is at W depth instad of T  
     71; depth (automatically activated if vargrid eq 'W') 
     72;  
     73; @keyword VECTEUR 
     74; It is a structure composed by 2 elements containing the 2 fields U 
     75; and V of values of the zonal and meridian component of the vector of the fields 
     76; to draw. These fields can be an array or a structure. 
     77;       For example: vecteur={matriceu:lec('unsurface'),matricev:lec('vnsurface')} 
     78;       Comment: name of elements of vectors are inconsenquential. 
     79;       vecteur={u:lec('unsurface'),v:lec('vnsurface')} is also appropriated. 
     80; 
     81; @keyword _EXTRA 
     82; used to pass your keywords 
     83; 
     84; @keyword DIREC    
     85; 
     86; @uses  
     87; common.pro 
     88; 
     89; @history 
     90; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     91;                      08/02/2000 
     92; 
     93; @version 
     94; $Id$ 
     95; 
     96; @todo seb: mettre les param  
     97; 
     98;- 
     99;------------------------------------------------------------ 
     100;------------------------------------------------------------ 
    81101;-------------------------------------------------------------- 
    82102; 
     
    95115  ENDIF 
    96116;-------------------------------------------------------------- 
    97 ; I1) lecture du champ 
     117; I1) Reading of the field 
    98118;-------------------------------------------------------------- 
    99119  if n_elements(field) EQ 0 then return, report('field undefined') 
     
    107127  nan = total(finite(arr, /nan)) < 1 
    108128;--------------------------------------------------------------- 
    109 ; redefinition du domaine  
     129; redefinition of the domain 
    110130;--------------------------------------------------------------- 
    111131  minprof = 0. 
     
    130150  ENDIF 
    131151; 
    132 ; la procedure domdef determine les elements qui sont a l''interieur 
    133 ; de la boxzoom.  
    134 ; si on fait un plot contenant l''axe z: 
    135 ; Suivant l''axe z si on veut par ex faire un dessin 
    136 ; entre 0 et 1000 il se peut que l''on selectionne les niveaux 
    137 ; correspondants aux profondeurs comprises entre 0 et 900m (vu la 
    138 ; discretisation assez lache de cet axe qd on atteint des profondeurs 
    139 ; elevees). Pour ne pas que le dessin s''arrete a 900 mais bien a 
    140 ; 1000, on va aller chercher le niveau au dessous de 1000, d''ou la 
    141 ; manip suivante sur la boxzoom: l''approfondir de 1 niveau sur la 
    142 ; verticale (si possible) sans changer les y range.  
     152; The procedure domdef determine elements which are inside the boxzoom.  
     153;  
    143154  if strpos(type, 'z') NE -1 THEN BEGIN 
    144155    if NOT keyword_set(localbox) then BEGIN  
     
    149160    END 
    150161    nelbox = n_elements(localbox) 
    151 ;on garde les yranges (axe z) avant de changer la boxzoom. 
     162;we keep yranges (z axis) before changing the boxzoom. 
    152163    !y.range = [localbox[nelbox-1], localbox[nelbox-2]]  
    153164    if vargrid EQ 'W' OR keyword_set(wdepth) then BEGIN 
     
    169180    if (lon2-lon1) gt (lat2-lat1) then type = 'xt' else type = 'yt' 
    170181;-------------------------------------------------------------- 
    171 ; verification de la taille du tableau d''entree et de la valeur de type 
     182; verification of the input array size and the value of the type 
    172183;-------------------------------------------------------------- 
    173184  grille, -1, -1, -1, -1, nx, ny, nz, firstx, firsty $ 
Note: See TracChangeset for help on using the changeset viewer.