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/div.pro

    r134 r142  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:div 
    6 ; 
    7 ; PURPOSE:calcule la divergence d'un champ 2D 
    8 ; 
    9 ; CATEGORY:calcule sur les matrices 
    10 ; 
    11 ; CALLING SEQUENCE:res=div(u,v) 
    12 ; 
    13 ; INPUTS: 
    14 ;       u et v deux matrices representant les coordonnes d''un 
    15 ;       champ de vecteur 
    16 ; 
    17 ; KEYWORD PARAMETERS: 
    18 ; 
    19 ; OUTPUTS:res: une matrice 2d 
    20 ; 
    21 ; COMMON BLOCKS: 
    22 ;       common.pro 
    23 ; 
    24 ; SIDE EFFECTS: 
    25 ; 
    26 ; RESTRICTIONS: 
    27 ; les matrices u et v peuvent de 2 a 4 dimensions. 
    28 ; attention pour distinger les differents configurations de u et v 
    29 ; (xy, xyz, xyt, xyzt), on regarde la variable du common  
    30 ;        -time qui contient le calendrier en jour julien d''IDL auquel 
    31 ;        se rapportent u et v ansi que la variable  
    32 ;        -jpt qui est le nombre de pas de temps a considerer ds time. 
    33 ; les tableaux u et v sont decoupes sur le meme domaine 
    34 ; geographique. A cause du decalage des grilles T, U, V et F il est 
    35 ; possiible que ces 2 tableaux n''aient pas la meme taille et se 
    36 ; repportent a des indices differents. Si tel est le cas les tableaux 
    37 ; sont redecoupes sur les indices qu'ils ont en commun et le dommaine 
    38 ; est redefinit pour qu'il colle a ces indices communs. 
    39 ; pour eviter ces redecoupes utiliser le mot cles /memeindice ds 
    40 ; domdef.pro 
    41 ; 
    42 ; les points sur le bord du dessin sont mis a !values.f_nan 
    43 ; 
    44 ; EXAMPLE: 
    45 ; 
    46 ; MODIFICATION HISTORY:Guillaume Roullet (grlod@ipsl.jussieu.fr) 
     5; 
     6; @file_comments 
     7; calculation of the divergence of a 2d field 
     8; 
     9; @categories 
     10; Calculation on matrixes 
     11; 
     12; @param UU  
     13; Matrix representing coordinates of a field of vectors 
     14; 
     15; @param VV  
     16; Matrix representing coordinates of a field of vectors 
     17; 
     18; @returns RES 
     19; A 2d matrix 
     20; 
     21; @uses 
     22; common.pro 
     23; 
     24; @restrictions 
     25; U and V matrixes can be 2 or 4d. 
     26; Beware, to discern differents configuration of U and V (xy, xyz, xyt, xyzt),  
     27; we look at the variable of the common  
     28;        -time which contain the calendar in IDL julian days to which U and  
     29; V refered to, in the same way as the variable  
     30;        -jpt which is the number of time's step to consider in time. 
     31; U and V arrays ae cut in the same geographic domain. Because of the gap of  
     32; T, U, V and F grids, it is possible that these two arrays hase not the same  
     33; size and refered to different indexes. In this case, arrays are recut on  
     34; common indexesand the domain is redifined to match with these common  
     35; indexes. To avoid these recuts, use the keyword /memeindice in domdef.pro 
     36; 
     37; 
     38; Points on the drawing edge are at !values.f_nan  
     39; 
     40; 
     41; @history 
     42; Guillaume Roullet (grlod@ipsl.jussieu.fr) 
    4743;                      Creation : printemps 1998 
    4844;                      Sebastien Masson (smasson@lodyc.jussieu.fr) 
    4945;                      adaptation pour marcher avec un domaine reduit 
    50 ;                      12/1/2000 
     46;                      12/1/2000; 
     47; 
     48; @version 
     49; $Id$ 
     50; 
    5151;- 
    5252;------------------------------------------------------------ 
     
    5757  compile_opt idl2, strictarrsubs 
    5858; 
    59    tempsun = systime(1)         ; pour key_performance 
     59   tempsun = systime(1)         ; For key_performance 
    6060@common 
    6161; 
     
    7272 
    7373;------------------------------------------------------------ 
    74 ; on trouve les points que u et v ont en communs 
     74; We find common points between U and V 
    7575;------------------------------------------------------------ 
    7676   indicexu = (lindgen(jpi))[firstxu:firstxu+nxu-1] 
     
    9191      (size(u))[0] EQ 3 AND date1 EQ date2 :BEGIN  
    9292;------------------------------------------------------------ 
    93 ; extraction de u et v sur le domaine qui convient 
     93; extraction of U and V on the appropriated domain 
    9494;------------------------------------------------------------ 
    9595         case 1 of 
     
    139139          *tmask[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, firstzt:lastzt] 
    140140;------------------------------------------------------------ 
    141 ; mise a !values.f_nan de la bordure 
     141; Edging put at !values.f_nan 
    142142;------------------------------------------------------------ 
    143143         if  NOT keyword_set(key_periodic) OR nx NE jpi then begin 
     
    154154         if terre[0] NE -1 then zdiv[temporary(terre)] = valmask 
    155155;------------------------------------------------------------ 
    156 ; pour le trace graphique 
     156; For the graphic drawing 
    157157;------------------------------------------------------------ 
    158158         vargrid = 'T' 
     
    169169      date1 NE date2 AND (size(u))[0] EQ 3 :BEGIN  
    170170;------------------------------------------------------------ 
    171 ; extraction de u et v sur le domaine qui convient 
     171; extraction of U and V on the appropriated domain 
    172172;------------------------------------------------------------ 
    173173         case 1 of 
     
    191191         endcase 
    192192;------------------------------------------------------------ 
    193 ; calcul de la divergence 
     193; Calculation of the divergence 
    194194;------------------------------------------------------------ 
    195195         zu = e2u[indice2d]*(umask())[indice2d+jpi*jpj*firstzt] 
     
    213213         zdiv = temporary(zdiv)*(zu-shift(zu, 1, 0, 0)+zv-shift(zv, 0, 1, 0)) 
    214214;------------------------------------------------------------ 
    215 ; mise a !values.f_nan de la bordure 
     215; Edging put at !values.f_nan 
    216216;------------------------------------------------------------ 
    217217         if  NOT keyword_set(key_periodic) OR nx NE jpi then begin 
     
    225225         if terre[0] NE -1 then zdiv[temporary(terre)] = valmask 
    226226;------------------------------------------------------------ 
    227 ; pour le trace graphique 
     227; for the graphic drawing 
    228228;------------------------------------------------------------ 
    229229         vargrid = 'T' 
     
    250250         indice3d = indice3d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, firstzt] 
    251251;------------------------------------------------------------ 
    252 ; extraction de u et v sur le domaine qui convient 
     252; extraction of U and V on the appropriated domain 
    253253;------------------------------------------------------------ 
    254254         case 1 of 
     
    275275         endcase 
    276276;------------------------------------------------------------ 
    277 ; calcul de la divergence 
     277; Calculation of the divergence 
    278278;------------------------------------------------------------ 
    279279         zu = temporary(u)*e2u[indice2d]*(umask())[indice3d] 
     
    286286         zdiv = temporary(zdiv)*tmask[indice3d]/(e1t[indice2d]*e2t[indice2d]) 
    287287;------------------------------------------------------------ 
    288 ; mise a !values.f_nan de la bordure 
     288; Edging put at !values.f_nan 
    289289;------------------------------------------------------------ 
    290290         if  NOT keyword_set(key_periodic) OR nx NE jpi then begin 
     
    301301         if terre[0] NE -1 then zdiv[temporary(terre)] = valmask 
    302302;------------------------------------------------------------ 
    303 ; pour le trace graphique 
     303; for the graphic drawing 
    304304;------------------------------------------------------------ 
    305305         vargrid = 'T' 
Note: See TracChangeset for help on using the changeset viewer.