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/VECTEUR/ajoutvect.pro

    r163 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
     
    118; 
    129; @param VECTEUR {in}{required}{type=vector} 
    13 ; It is a structure with 2 elements containing we 2 matrices U and V of  
    14 ; values of the zonal and meridian component of the field of vectors to  
     10; It is a structure with 2 elements containing we 2 matrices U and V of 
     11; values of the zonal and meridian component of the field of vectors to 
    1512; be traced. 
    1613;      For ex: 
     
    2219; It is a scalar n or an array with 2 elements [n1,n2]. 
    2320; In the first case, we will trace a vector on n following x and y. 
    24 ; In the second case, we will trace a vector on n1 following x and a  
     21; In the second case, we will trace a vector on n1 following x and a 
    2522; vector n2 following n2 
    26 ;   Comments: To trace all vectors following y and one vector on two  
     23;   Comments: To trace all vectors following y and one vector on two 
    2724; following x, put unvectsur=[2,1] 
    2825; 
    2926; @keyword VECTMIN {in}{required} 
    30 ; Minimum norme of vectors to be traced  
     27; Minimum norme of vectors to be traced 
    3128; 
    3229; @keyword VECTMAX {in}{required} 
    33 ; Maximum norme of vectors to be traced  
     30; Maximum norme of vectors to be traced 
    3431; 
    3532; @keyword _EXTRA 
    36 ; Used to pass your keywords 
    37 ;  
     33; Used to pass keywords 
     34; 
    3835; @uses 
    3936; common.pro             
     
    4643; 
    4744; @version 
    48 ; $Id$  
    49 ;  
     45; $Id$ 
     46; 
    5047;- 
    51 ;------------------------------------------------------------ 
    52 ;------------------------------------------------------------ 
    53 ;------------------------------------------------------------ 
    54 pro ajoutvect,vecteur, vectlegende, UNVECTSUR=unvectsur,VECTMIN=vectmin, VECTMAX=vectmax, _EXTRA = ex 
     48; 
     49PRO ajoutvect,vecteur, vectlegende, UNVECTSUR=unvectsur,VECTMIN=vectmin, VECTMAX=vectmax, _EXTRA = ex 
    5550; 
    5651  compile_opt idl2, strictarrsubs 
     
    9085      indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    9186      indicey = inter(indiceyu, indiceyv) 
    92       nx = n_elements(indicex)  
     87      nx = n_elements(indicex) 
    9388      ny = n_elements(indicey) 
    9489      indice2d = lindgen(jpi, jpj) 
     
    10095         (size(u))[0] NE 2 OR (size(v))[0] NE 2: return 
    10196         (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    102           (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     97          (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    10398            if nxu NE nx then $ 
    104              if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
     99             if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
    105100            IF nxv NE nx THEN $ 
    106101             if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
    107102            IF nyu NE ny THEN $ 
    108              if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
     103             if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 
    109104            IF nyv NE ny THEN $ 
    110105             if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
    111106         END 
    112107         (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
    113           (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN  
     108          (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 
    114109            u = u[indice2d] 
    115110            v = v[indice2d] 
    116111         END 
    117          ELSE:BEGIN  
     112         ELSE:BEGIN 
    118113            ras = report('problemes d''adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs') 
    119114            return 
     
    138133;---------------------------------------------------------------------------- 
    139134; attribution of the mask and of longitude and latitude arrays. 
    140 ; We recuperate the complete grid to establish a big mask extensive  
    141 ; in the four directions to cover points for which a land point has  
     135; We recuperate the complete grid to establish a big mask extensive 
     136; in the four directions to cover points for which a land point has 
    142137; been considerated (do a small drawing) 
    143138;---------------------------------------------------------------------------- 
     
    154149      endif 
    155150;----------------------------------------------------------- 
    156 ; We mask u and v et v the long of coasts (the place where we  
     151; We mask u and v et v the long of coasts (the place where we 
    157152; can not calculate the average) 
    158 ;-----------------------------------------------------------  
     153;----------------------------------------------------------- 
    159154; extention of the mask 
    160155      u = u*msku*shift(msku,1,0) 
    161156      v = v*mskv*shift(mskv,0,1) 
    162    ENDIF ELSE BEGIN  
     157   ENDIF ELSE BEGIN 
    163158      u = u*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 
    164159      v = v*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 
     
    173168   nan = where(finite(v, /nan) EQ 1) 
    174169   if nan[0] NE -1 then v[nan] = 1e5 
    175    if keyword_set(vectmin) then BEGIN  
     170   if keyword_set(vectmin) then BEGIN 
    176171      toosmall=where(tabnorme lt vectmin) 
    177172      if toosmall[0] NE -1 then begin 
     
    208203         indx = where((lindgen(nx) MOD unvectsur[0]) eq 0) 
    209204         indy = where((lindgen(ny) MOD unvectsur[0]) eq 0) 
    210       ENDIF ELSE BEGIN  
     205      ENDIF ELSE BEGIN 
    211206         indx = where((lindgen(nx) MOD unvectsur[0]) eq 0) 
    212207         indy = where((lindgen(ny) MOD unvectsur[1]) eq 0) 
     
    222217   endif 
    223218;----------------------------------------------------------- 
    224 ;  
     219; 
    225220;----------------------------------------------------------- 
    226221   if keyword_set(inverse) then begin 
     
    238233   if terre[0] ne -1 then mini = min(tabnorme[where(t2 eq 1)], max = maxi, /nan) $ 
    239234   ELSE mini = min(tabnorme, max = maxi, /nan) 
    240     
     235 
    241236   if litchamp(vecteur.(0), /u) NE '' then $ 
    242237    vectlegende = {minmax:[mini, maxi], unite:litchamp(vecteur.(0), /u)} $ 
     
    245240 
    246241sortie: 
    247    if keyword_set(key_performance) NE 0 THEN print, 'temps ajoutvect', systime(1)-tempsun  
     242   if keyword_set(key_performance) NE 0 THEN print, 'temps ajoutvect', systime(1)-tempsun 
    248243   return 
    249244end 
    250  
    251  
Note: See TracChangeset for help on using the changeset viewer.