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

    r134 r142  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:curl 
    6 ; 
    7 ; PURPOSE:calcule la composante verticale du rotationnel d''un champ 
    8 ; de vecteur horizontaux 
    9 ; 
    10 ; CATEGORY:calcule sur les matrices 
    11 ; 
    12 ; CALLING SEQUENCE:res=curl(u,v) 
    13 ; 
    14 ; INPUTS: 
    15 ;       u et v deux matrices representant les coordonnes d''un 
    16 ;       champ de vecteur 
    17 ; 
    18 ; KEYWORD PARAMETERS: 
    19 ; 
    20 ; OUTPUTS:res: une matrice 2d 
    21 ; 
    22 ; COMMON BLOCKS: 
    23 ;       common.pro 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ; RESTRICTIONS: 
    28 ; les matrices u et v peuvent de 2 a 4 dimensions. 
    29 ; attention pour distinger les differents configurations de u et v 
    30 ; (xy, xyz, xyt, xyzt), on regarde la variable du common  
    31 ;        -time qui contient le calendrier en jour julien d''IDL auquel 
    32 ;        se rapportent u et v ansi que la variable  
    33 ;        -jpt qui est le nombre de pas de temps a considerer ds time. 
    34 ; les tableaux u et v sont decoupes sur le meme domaine 
    35 ; geographique. A cause du decalage des grilles T, U, V et F il est 
    36 ; possiible que ces 2 tableaux n''aient pas la meme taille et se 
    37 ; repportent a des indices differents. Si tel est le cas les tableaux 
    38 ; sont redecoupes sur les indices qu'ils ont en commun et le dommaine 
    39 ; est redefinit pour qu'il colle a ces indices communs. 
    40 ; pour eviter ces redecoupes utiliser le mot cles /memeindice ds 
    41 ; domdef.pro 
    42 ; 
    43 ; 
    44 ; les points sur le bord du dessin sont mis a !values.f_nan  
    45 ; 
    46 ; EXAMPLE: 
    47 ; 
    48 ; MODIFICATION HISTORY:Guillaume Roullet (grlod@ipsl.jussieu.fr) 
     5; 
     6; @file_comments 
     7; Calculate the vertical component of the curl of a field of horizontal vectors 
     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; @history  
     41; Guillaume Roullet (grlod@ipsl.jussieu.fr) 
    4942;  
    5043;                      Sebastien Masson (smasson@lodyc.jussieu.fr) 
     
    5346;                      21/5/1999: valeurs manquantes a !values.f_nan 
    5447;periodicite  
     48;  
     49; @version 
     50; $Id$ 
     51; 
    5552;- 
    5653;------------------------------------------------------------ 
     
    6259; 
    6360@common 
    64    tempsun = systime(1)         ; pour key_performance 
     61   tempsun = systime(1)         ; To key_performance 
    6562; 
    6663   IF finite(glamu[0])*finite(gphiu[0])*finite(glamv[0])*finite(gphiv[0]) EQ 0 THEN $ 
     
    7673 
    7774;------------------------------------------------------------ 
    78 ; on trouve les points que u et v ont en communs 
     75; We find common points between U and V 
    7976;------------------------------------------------------------ 
    8077   indicexu = (lindgen(jpi))[firstxu:firstxu+nxu-1] 
     
    9592         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
    9693;------------------------------------------------------------ 
    97 ; extraction de u et v sur le domaine qui convient 
     94; extraction of U and V on the appropriated domain 
    9895;------------------------------------------------------------ 
    9996         case 1 of 
     
    117114         endcase 
    118115;------------------------------------------------------------ 
    119 ; calcul du rotationnel 
     116; calculation of the curl 
    120117;------------------------------------------------------------ 
    121118         coefu = (e1u[indice2d])[*]#replicate(1, nzt) 
     
    142139         psi = tabf*psi 
    143140;------------------------------------------------------------ 
    144 ; mise a !values.f_nan de la bordure 
     141; Edging put at !values.f_nan 
    145142;------------------------------------------------------------ 
    146143         if NOT keyword_set(key_periodic)  OR nx NE jpi then begin 
     
    155152         if terref[0] NE -1 then psi[temporary(terref)] = valmask 
    156153;------------------------------------------------------------ 
    157 ; pour le trace graphique 
     154; For the graphic drawing 
    158155;------------------------------------------------------------ 
    159156         domdef, (glagmt[indice2d])[0, 0], (glamu[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphiv[indice2d])[0, ny-1], vert1, vert2, gridtype = ['t', 'f'] 
     
    171168         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
    172169;------------------------------------------------------------ 
    173 ; extraction de u et v sur le domaine qui convient 
     170; extraction of U and V on the appropriated domain 
    174171;------------------------------------------------------------ 
    175172         case 1 of 
     
    196193         endcase 
    197194;---------------------------------------------------------------------------- 
    198 ; calcul du rotationnel 
     195; Calculation of the curl 
    199196;---------------------------------------------------------------------------- 
    200197         coefu = e1u[indice2d]*(umask())[indice2d+jpi*jpj*firstzt] 
     
    214211         tabf = reform(tabf, nx, ny, jpt, /over) 
    215212;------------------------------------------------------------ 
    216 ; calcul du rotationnel 
     213; Calculation of the curl 
    217214;------------------------------------------------------------ 
    218215         zu = u*temporary(coefu) 
     
    222219         psi = tabf*psi 
    223220;------------------------------------------------------------ 
    224 ; mise a !values.f_nan de la bordure 
     221; extraction of U and V on the appropriated domain 
    225222;------------------------------------------------------------ 
    226223         if NOT keyword_set(key_periodic) OR nx NE jpi then begin 
     
    255252         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
    256253;------------------------------------------------------------ 
    257 ; extraction de u et v sur le domaine qui convient 
    258254;------------------------------------------------------------ 
    259255         case 1 of 
     
    278274         endcase 
    279275;------------------------------------------------------------ 
    280 ; calcul du rotationnel 
     276; Calculation of the curl 
    281277;------------------------------------------------------------ 
    282278         coefu = e1u[indice2d]*(umask())[indice2d+jpi*jpj*firstzt] 
     
    295291 
    296292;------------------------------------------------------------ 
    297 ; mise a !values.f_nan de la bordure 
     293; Edging put at !values.f_nan 
    298294;------------------------------------------------------------ 
    299295         if  NOT keyword_set(key_periodic) OR nx NE jpi then begin 
     
    308304         if terref[0] NE -1 then psi[temporary(terref)] = valmask 
    309305;------------------------------------------------------------ 
    310 ; pour le trace graphique 
     306; for the graphic drawing 
    311307;------------------------------------------------------------ 
    312308         domdef, (glamt[indice2d])[0, 0], (glamf[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphif[indice2d])[0, ny-1], vert1, vert2, gridtype = ['t', 'f'] 
Note: See TracChangeset for help on using the changeset viewer.