Ignore:
Timestamp:
03/16/07 10:22:26 (17 years ago)
Author:
pinsard
Message:

corrections of some misspellings in some *.pro

Location:
trunk/SRC/ToBeReviewed/CALCULS
Files:
9 edited

Legend:

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

    r163 r226  
    44;+ 
    55; @file_comments 
    6 ; Rather comparable to depth2level but here, the calculated level is in float.  
    7 ; For example, the level 5.4 correspond to a depth equal  
     6; Rather comparable to depth2level but here, the calculated level is in float. 
     7; For example, the level 5.4 correspond to a depth equal 
    88; to gdep[5]+.4*(gdep[6]-gdep[5]) 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Without loop 
    1212; 
     
    3232;  ->champ nul a 1e-6 pres 
    3333; 
    34 ; @history  
     34; @history 
    3535; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3636;                      15/06/2000 
    37 ;  
     37; 
    3838; @version 
    3939; $Id$ 
     
    5757   levellow = depth2level(depthin, /lower, /nomask) 
    5858   depthlow = level2depth(levellow, /nomask) 
    59 ; calculate the distance depthlow-depthup and management of the case  
    60 ; of this distance is null or eqal to !values.f_nan 
     59; calculate the distance depthlow-depthup and management of the case 
     60; of this distance is null or equal to !values.f_nan 
    6161   divi = depthlow-depthup 
    6262   nan = where(finite(divi) EQ 0) 
     
    7474   endif 
    7575;------------------------------------------------------------ 
    76    if keyword_set(key_performance) THEN print, 'temps depth2floatlevel', systime(1)-tempsun  
     76   if keyword_set(key_performance) THEN print, 'temps depth2floatlevel', systime(1)-tempsun 
    7777; 
    7878   return, res 
  • trunk/SRC/ToBeReviewed/CALCULS/depth2level.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Allows to pass from a 2d depth array to a corresponding 2d level array. 
    88; 
     
    1111; 
    1212; @param TAB {type=2d array} 
    13 ; 2d depth array (or a structure respecting litchamp critrions) 
     13; 2d depth array (or a structure respecting litchamp criterions) 
    1414; 
    1515; @keyword UPPER 
     
    1717; 
    1818; @keyword LOWER 
    19 ; We select the level just below the depth  
     19; We select the level just below the depth 
    2020; 
    21 ; @keyword CLOSER  
    22 ; We select the depth's closer level  
     21; @keyword CLOSER 
     22; We select the depth's closer level 
    2323; 
    24 ; @keyword NOMASK  
     24; @keyword NOMASK 
    2525; To do not mask land points 
    2626; 
    27 ; @returns  
     27; @returns 
    2828; It is a 2d array containing level's values. 
    2929; 
     
    3131; common.pro 
    3232; 
    33 ; @restrictions  
     33; @restrictions 
    3434; For depths 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  
     35; if the depth is superior to this one of the bottom, we send back jpk-1 in 
    3636; the upper case, and !values.f_nan in the lower case. 
    3737; 
     
    8080   if notanumber[0] NE -1 then in[notanumber] = 0 
    8181;------------------------------------------------------------ 
    82 ; We transform the 2d deth value in a 2d array of levels corresponding to depthes 
     82; We transform the 2d depth value in a 2d array of levels corresponding to depths 
    8383;------------------------------------------------------------ 
    8484; We go on array who have the size of 3d arrays 
    85    prof=replicate(1,nx*ny)#gdep[firstz:lastz]  
     85   prof=replicate(1,nx*ny)#gdep[firstz:lastz] 
    8686   in = in[*]#replicate(1, nz) 
    8787; 
     
    116116;------------------------------------------------------------ 
    117117;------------------------------------------------------------ 
    118    if keyword_set(key_performance) THEN print, 'temps depth2level', systime(1)-tempsun  
     118   if keyword_set(key_performance) THEN print, 'temps depth2level', systime(1)-tempsun 
    119119   return, levels 
    120120end 
  • trunk/SRC/ToBeReviewed/CALCULS/depth2mask.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
    7 ; Allows to pass from a 2d depth sill array to a 3d array of mask  
     6; @file_comments 
     7; Allows to pass from a 2d depth sill array to a 3d array of mask 
    88; with one of levels above the sill depth and 0s below. 
    99; 
     
    1212; 
    1313; @param TAB {type=3d array} 
    14 ; 2d sill depth array (or a structure respecting litchamp critrions) 
     14; 2d sill depth array (or a structure respecting litchamp criterions) 
    1515; 
    1616; @keyword _EXTRA 
    1717; used to pass your keywords 
    18 ;  
     18; 
    1919; @returns 
    2020; It is a 3d array containing the mas associated to the 2d sill depth array 
     
    4242@common 
    4343;------------------------------------------------------------ 
    44 ; We transform the 2d deth value in a 2d array of levels corresponding to depthes 
     44; We transform the 2d depth value in a 2d array of levels corresponding to depths 
    4545;------------------------------------------------------------ 
    4646   niveaux = depth2level(tab, _extra = ex) 
     
    5151   mask = level2mask(niveaux) 
    5252;------------------------------------------------------------ 
    53    if keyword_set(key_performance) NE 0 THEN print, 'temps depth2mask', systime(1)-tempsun  
     53   if keyword_set(key_performance) NE 0 THEN print, 'temps depth2mask', systime(1)-tempsun 
    5454   return, mask 
    5555end 
  • trunk/SRC/ToBeReviewed/CALCULS/floatlevel2depth.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Rather comparable to level2depth. It is the invert function of depth2floatlevel 
    88; 
     
    1717; 
    1818; @returns 
    19 ; 2d array containing depthes 
     19; 2d array containing depths 
    2020; 
    2121; @uses 
     
    5252; We sill (delete land points at valmask for example) 
    5353   flevelin = 0 > flevelin < (jpk-1) 
    54 ; We caculate the depth  
     54; We calculate the depth 
    5555   depthup = level2depth(floor(flevelin), /nomask) 
    5656   depthlow= level2depth(ceil(flevelin), /nomask) 
     
    6767   endif 
    6868;------------------------------------------------------------ 
    69    if keyword_set(key_performance) THEN print, 'temps floatlevel2depth', systime(1)-tempsun  
     69   if keyword_set(key_performance) THEN print, 'temps floatlevel2depth', systime(1)-tempsun 
    7070; 
    7171   return, res 
  • trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro

    r224 r226  
    1919; array representing the temperature. Has the same size than SN. 
    2020; 
    21 ; @keyword GILL  
     21; @keyword GILL 
    2222; We activate this key if we want to calculate the dynamic height 
    2323; like in the GILL page 215, which means by rapport to a reference state which 
     
    3232; Give a value to this keyword to change the reference salinity used in the 
    3333; calculation when GILL is activated. 
    34 ;  
     34; 
    3535; @keyword TREF 
    3636; Give a value to this keyword to change the reference temperature used in the 
     
    5858; 
    5959; @restrictions 
    60 ; approximation: The pressure in decibars is equal to the depth in meters  
     60; approximation: The pressure in decibars is equal to the depth in meters 
    6161; (the pressure increase of 1 bar every 10 m) 
    6262; 
     
    9999   if total(tailles[0:tailles[0]] NE taillet[0:taillet[0]]) NE 0 then $ 
    100100    return,  report('arrays sn and tn must have the same size') 
    101    if tailles[3] NE jpk then return, report('vertical dimension of sn and tn arrarrays must be equal to jpk') 
     101   if tailles[3] NE jpk then return, report('vertical dimension of sn and tn arrays must be equal to jpk') 
    102102   nx = nxt 
    103103   ny = nyt 
  • trunk/SRC/ToBeReviewed/CALCULS/level2depth.pro

    r224 r226  
    4747   grille,mask, -1, -1,gdep,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
    4848;--------------------------------------------------------------- 
    49 ; verification of the coherence between array's size and the domain definied by domdef 
     49; verification of the coherence between array's size and the domain defined by domdef 
    5050;--------------------------------------------------------------- 
    5151   taille = size(niveaux) 
  • trunk/SRC/ToBeReviewed/CALCULS/norme.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; calculate the norm of a field of vectors, then make a possible average. 
    88;   Comment 1: The field of vector can be, 2d:xy, 3d: xyz or xyt, 
    99; 4d: xyzt 
    1010;   Comment 2: 
    11 ; The calculation of the norm is made before the possible spatial or  
    12 ; temporal average because the average of the norm is not equal to the  
     11; The calculation of the norm is made before the possible spatial or 
     12; temporal average because the average of the norm is not equal to the 
    1313; norm of averages 
    1414 
     
    2424; 
    2525; @keyword BOXZOOM 
    26 ; boxzoom on which do the average (by default the domain selected  
     26; boxzoom on which do the average (by default the domain selected 
    2727; by the last domdef done) 
    2828; 
    2929; @keyword DIREC 
    3030; 't' 'x' 'y' 'z' 'xys' 'xz' 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 
    31 ;       'xzt' 'yzt' 'xyzt' Direction on which do averages  
     31;       'xzt' 'yzt' 'xyzt' Direction on which do averages 
    3232; 
    3333; @returns 
     
    3737; common.pro 
    3838; 
    39 ; @restrictions  
    40 ; The norm is calculated on points TTo do this calculation, we average  
    41 ; field U and Von points T before calculate the norme. At the edge of  
    42 ; coast and of domain, we can not calculate fields U and V at points T,  
    43 ; that is why these points are at value !values.f_nan.  
    44 ;  
    45 ; When we calculate on a reduce geographic domain, field U and V have not  
    46 ; necessarily the same number of point. In this case, we recut U and V to  
    47 ; keep only common points. We profit of this to redo a domdef which redefine  
     39; @restrictions 
     40; The norm is calculated on points TTo do this calculation, we average 
     41; field U and Von points T before calculate the norme. At the edge of 
     42; coast and of domain, we can not calculate fields U and V at points T, 
     43; that is why these points are at value !values.f_nan. 
     44; 
     45; When we calculate on a reduce geographic domain, field U and V have not 
     46; necessarily the same number of point. In this case, we recut U and V to 
     47; keep only common points. We profit of this to redo a domdef which redefine 
    4848; a geographic domain on which fields U and V are extracted on same points 
    4949; 
    5050; @restrictions 
    51 ; To know what type of array we work with, we  test its size and dates  
    52 ; gave by time[0] and time[jpt-1] to know if thee is a temporal dimension.  
    53 ; Before to start norme, make sure that time and jpt are defined how  
    54 ; they have to!  
     51; To know what type of array we work with, we  test its size and dates 
     52; gave by time[0] and time[jpt-1] to know if thee is a temporal dimension. 
     53; Before to start norme, make sure that time and jpt are defined how 
     54; they have to! 
    5555; 
    5656; @examples 
    57 ; To calculate the average of the norme of streams on all the domain  
     57; To calculate the average of the norme of streams on all the domain 
    5858; between 0 et 50: 
    5959;      IDL> res=norme(un,vn,boxzoom=[0,50],dir='xyz') 
     
    9090; 
    9191;------------------------------------------------------------ 
    92   if keyword_set(boxzoom) then BEGIN  
     92  if keyword_set(boxzoom) then BEGIN 
    9393    Case 1 Of 
    9494      N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] 
     
    100100    ENDCASE 
    101101    domdef, boxzoom 
    102   ENDIF  
     102  ENDIF 
    103103;------------------------------------------------------------ 
    104104   if NOT keyword_set(direc) then direc = 0 
     
    120120   if grillev EQ '' then grillev = 'V' 
    121121   IF grilleu EQ 'V' AND grillev EQ 'U' THEN inverse = 1 
    122    IF grilleu EQ 'T' AND grillev EQ 'T' THEN BEGIN  
    123       interpolle  = 0  
     122   IF grilleu EQ 'T' AND grillev EQ 'T' THEN BEGIN 
     123      interpolle  = 0 
    124124      return, report('cas non code mais facile a faire!') 
    125125   ENDIF ELSE interpolle = 1 
     
    140140   indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    141141   indicey = inter(indiceyu, indiceyv) 
    142    nx = n_elements(indicex)  
     142   nx = n_elements(indicex) 
    143143   ny = n_elements(indicey) 
    144144;---------------------------------------------------------------------------- 
     
    149149;---------------------------------------------------------------------------- 
    150150;---------------------------------------------------------------------------- 
    151       (size(u))[0] EQ 3 AND date1 EQ date2 :BEGIN  
     151      (size(u))[0] EQ 3 AND date1 EQ date2 :BEGIN 
    152152;---------------------------------------------------------------------------- 
    153153         indice2d = lindgen(jpi, jpj) 
     
    160160         case 1 of 
    161161            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    162              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     162             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    163163               case (size(u))[3] OF 
    164                   nzt:BEGIN  
     164                  nzt:BEGIN 
    165165                     if nxu NE nx then $ 
    166                       if indicex[0] EQ firstxu then u = u[0:nx-1,*,*] ELSE u = u[1: nx, *,*]  
     166                      if indicex[0] EQ firstxu then u = u[0:nx-1,*,*] ELSE u = u[1: nx, *,*] 
    167167                     IF nxv NE nx THEN $ 
    168168                      if indicex[0] EQ firstxv then v = v[0:nx-1,*,*] ELSE v = v[1: nx, *,*] 
    169169                     IF nyu NE ny THEN $ 
    170                       if indicey[0] EQ firstyu then u = u[*,0:ny-1,*] ELSE u = u[*, 1: ny,*]  
     170                      if indicey[0] EQ firstyu then u = u[*,0:ny-1,*] ELSE u = u[*, 1: ny,*] 
    171171                     IF nyv NE ny THEN $ 
    172172                      if indicey[0] EQ firstyv then v = v[*,0:ny-1,*] ELSE v = v[*, 1: ny,*] 
    173173                  end 
    174                   jpk:BEGIN  
     174                  jpk:BEGIN 
    175175                     if nxu NE nx then $ 
    176                       if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt] ELSE u = u[1: nx, *,firstzt:lastzt]  
     176                      if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt] ELSE u = u[1: nx, *,firstzt:lastzt] 
    177177                     IF nxv NE nx THEN $ 
    178178                      if indicex[0] EQ firstxv then v = v[0:nx-1, *,firstzt:lastzt] ELSE v = v[1: nx, *,firstzt:lastzt] 
    179179                     IF nyu NE ny THEN $ 
    180                       if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt] ELSE u = u[*, 1: ny,firstzt:lastzt]  
     180                      if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt] ELSE u = u[*, 1: ny,firstzt:lastzt] 
    181181                     IF nyv NE ny THEN $ 
    182182                      if indicey[0] EQ firstyv then v = v[*, 0:ny-1,firstzt:lastzt] ELSE v = v[*, 1: ny,firstzt:lastzt] 
     
    186186            END 
    187187            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND (size(u))[3] EQ jpk AND $ 
    188              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN  
     188             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN 
    189189               u = u[indice3d] 
    190190               v = v[indice3d] 
     
    209209         if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 
    210210;---------------------------------------------------------------------------- 
    211 ; attribution of the mask and of logitude and latitude arrays 
     211; attribution of the mask and of longitude and latitude arrays 
    212212;---------------------------------------------------------------------------- 
    213213         mask = tmask[indice3d] 
     
    234234;---------------------------------------------------------------------------- 
    235235;---------------------------------------------------------------------------- 
    236       date1 NE date2 AND (size(u))[0] EQ 3 :BEGIN  
     236      date1 NE date2 AND (size(u))[0] EQ 3 :BEGIN 
    237237         indice2d = lindgen(jpi, jpj) 
    238238         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
     
    242242         case 1 of 
    243243            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    244              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     244             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    245245               if nxu NE nx then $ 
    246                 if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *]  
     246                if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
    247247               IF nxv NE nx THEN $ 
    248248                if indicex[0] EQ firstxv then v = v[0:nx-1, *, *] ELSE v = v[1: nx, *, *] 
    249249               IF nyu NE ny THEN $ 
    250                 if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *]  
     250                if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *] 
    251251               IF nyv NE ny THEN $ 
    252252                if indicey[0] EQ firstyv then v = v[*, 0:ny-1, *] ELSE v = v[*, 1: ny, *] 
    253253            END 
    254254            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
    255              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN  
     255             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 
    256256               u = u[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, *] 
    257257               v = v[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, *] 
     
    270270;---------------------------------------------------------------------------- 
    271271; attribution of the mask and of longitude and latitude arrays. 
    272 ; We recover the complete grid to establish a big mask extent in the four  
    273 ; direction to cover pointsfor which a land point has been  
     272; We recover the complete grid to establish a big mask extent in the four 
     273; direction to cover pointsfor which a land point has been 
    274274; considerated (make a small drawing) 
    275275;---------------------------------------------------------------------------- 
     
    288288         res[*,0, *]=!values.f_nan 
    289289         mask = where(mask eq 0) 
    290          IF mask[0] NE -1 THEN BEGIN  
     290         IF mask[0] NE -1 THEN BEGIN 
    291291            coeftps = lindgen(jpt)*nx*ny 
    292292            coeftps = replicate(1, n_elements(mask))#coeftps 
     
    304304;---------------------------------------------------------------------------- 
    305305;---------------------------------------------------------------------------- 
    306       date1 NE date2 AND (size(u))[0] EQ 4:BEGIN  
     306      date1 NE date2 AND (size(u))[0] EQ 4:BEGIN 
    307307         indice2d = lindgen(jpi, jpj) 
    308308         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
     
    314314         case 1 of 
    315315            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    316              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     316             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    317317               case (size(u))[3] OF 
    318                   nzt:BEGIN  
     318                  nzt:BEGIN 
    319319                     if nxu NE nx then $ 
    320                       if indicex[0] EQ firstxu then u = u[0:nx-1,*,*,*] ELSE u = u[1: nx, *,*,*]  
     320                      if indicex[0] EQ firstxu then u = u[0:nx-1,*,*,*] ELSE u = u[1: nx, *,*,*] 
    321321                     IF nxv NE nx THEN $ 
    322322                      if indicex[0] EQ firstxv then v = v[0:nx-1,*,*,*] ELSE v = v[1: nx, *,*,*] 
    323323                     IF nyu NE ny THEN $ 
    324                       if indicey[0] EQ firstyu then u = u[*,0:ny-1,*,*] ELSE u = u[*, 1: ny,*,*]  
     324                      if indicey[0] EQ firstyu then u = u[*,0:ny-1,*,*] ELSE u = u[*, 1: ny,*,*] 
    325325                     IF nyv NE ny THEN $ 
    326326                      if indicey[0] EQ firstyv then v = v[*,0:ny-1,*,*] ELSE v = v[*, 1: ny,*,*] 
    327327                  end 
    328                   jpk:BEGIN  
     328                  jpk:BEGIN 
    329329                     if nxu NE nx then $ 
    330                       if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt,*] ELSE u = u[1: nx, *,firstzt:lastzt,*]  
     330                      if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt,*] ELSE u = u[1: nx, *,firstzt:lastzt,*] 
    331331                     IF nxv NE nx THEN $ 
    332332                      if indicex[0] EQ firstxv then v = v[0:nx-1, *,firstzt:lastzt,*] ELSE v = v[1: nx, *,firstzt:lastzt,*] 
    333333                     IF nyu NE ny THEN $ 
    334                       if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt,*] ELSE u = u[*, 1: ny,firstzt:lastzt,*]  
     334                      if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt,*] ELSE u = u[*, 1: ny,firstzt:lastzt,*] 
    335335                     IF nyv NE ny THEN $ 
    336336                      if indicey[0] EQ firstyv then v = v[*, 0:ny-1,firstzt:lastzt,*] ELSE v = v[*, 1: ny,firstzt:lastzt,*] 
     
    340340            END 
    341341            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND (size(u))[3] EQ jpk AND $ 
    342              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN  
     342             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN 
    343343               u = u[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1,firstzt:lastzt, *] 
    344344               v = v[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1,firstzt:lastzt, *] 
     
    356356         if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*,*]=a 
    357357;---------------------------------------------------------------------------- 
    358 ; attribution of the mask and of logitude and latitude arrays 
     358; attribution of the mask and of longitude and latitude arrays 
    359359;---------------------------------------------------------------------------- 
    360360         mask = tmask[indice3d] 
     
    370370         res[*,0, *, *]=!values.f_nan 
    371371         mask = where(mask eq 0) 
    372          IF mask[0] NE -1 THEN BEGIN  
     372         IF mask[0] NE -1 THEN BEGIN 
    373373            coeftps = lindgen(jpt)*nx*ny*nzt 
    374374            coeftps = replicate(1, n_elements(mask))#coeftps 
     
    394394         case 1 of 
    395395            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    396              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     396             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    397397               if nxu NE nx then $ 
    398                 if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
     398                if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
    399399               IF nxv NE nx THEN $ 
    400400                if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
    401401               IF nyu NE ny THEN $ 
    402                 if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
     402                if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 
    403403               IF nyv NE ny THEN $ 
    404404                if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
    405405            END 
    406406            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
    407              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN  
     407             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 
    408408               u = u[indice2d] 
    409409               v = v[indice2d] 
     
    429429;---------------------------------------------------------------------------- 
    430430; attribution of the mask and of longitude and latitude arrays. 
    431 ; We recover the complete grid to establish a big mask extent in the four  
    432 ; direction to cover pointsfor which a land point has been  
     431; We recover the complete grid to establish a big mask extent in the four 
     432; direction to cover pointsfor which a land point has been 
    433433; considerated (make a small drawing) 
    434434;---------------------------------------------------------------------------- 
     
    455455   endcase 
    456456;------------------------------------------------------------ 
    457    if keyword_set(key_performance) THEN print, 'temps norme', systime(1)-tempsun  
     457   if keyword_set(key_performance) THEN print, 'temps norme', systime(1)-tempsun 
    458458   return, res 
    459459end 
  • trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro

    r224 r226  
    1212; @param ARRAYIN {type=3d array} 
    1313; It is a 3d array whose 3rd dimension must be equal to jpk 
    14 ;  
     14; 
    1515; @param DEPTHIN {type=2d array} 
    1616; It is a 2d array indicating for each point n, at which depth to project 
    17 ;        
     17; 
    1818; @returns 
    1919; A 2d array which is the projection of the 3d array following depths indicated by depthin 
     
    2222; common.pro 
    2323; 
    24 ; @restrictions  
     24; @restrictions 
    2525; points at !values.f_nan impossible calculation. Land points masked at valmask. 
    2626; 
     
    2929;   IDL> a=gdept[jpk-1]/(1.*jpi*jpj)*findgen(jpi,jpj) 
    3030; We build an array to project on these depths. For the test, 
    31 ; we build a 3d array whose each vector following z is the depth.  
     31; we build a 3d array whose each vector following z is the depth. 
    3232;   IDL> arraytest=replicate(1,jpi*jpj)#gdept 
    3333;   IDL> arraytest=reform(arraytest,jpi,jpj,jpk, /over) 
     
    3535;   IDL> plt, 1e6*(a-projectondepth(arraytest,a)),/nocontour 
    3636;   ->null field at 1e-6 pres 
    37 ;  
    38 ;  verifcation projecting the temperature of 20°C for example... 
     37; 
     38;  verification projecting the temperature of 20°C for example... 
    3939; 
    4040; @history 
     
    6363   if tailledepth[0] NE 2 THEN return, report('Depth array must have 2 dimensions') 
    6464   if taillearray[0] NE 3 THEN return, report('Array in must have 3 dimensions') 
    65 ; verification of the coherence between array's size and the domain  
     65; verification of the coherence between array's size and the domain 
    6666   grille, mask, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
    6767   case 1 of 
     
    103103   if terre[0] NE -1 then res[terre] = valmask 
    104104;------------------------------------------------------------ 
    105    if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun  
     105   if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun 
    106106   return, res 
    107107end 
  • trunk/SRC/ToBeReviewed/CALCULS/remplit.pro

    r209 r226  
    2222; 
    2323; @keyword FILLXDIR 
    24 ;  
     24; 
    2525; 
    2626; @keyword FILLYDIR 
     
    5151; $Id$ 
    5252; 
    53   ;; 
    54   ;; Extrapole zinout[jpi,jpj] sur les continents en utilisant les 4 
    55   ;; plus proches voisins masques oceaniquement et construit un nouveau 
    56 ;   masque 
    57   ;; contenant l'ancien masque oceanique PLUSles points extrapoles. 
    58   ;; Reitere le processus niter fois. 
    59   ;; C'est pas clair, essayez ! 
    60   ;; 
    61   ;; 
     53;; 
     54;; Extrapole zinout[jpi,jpj] sur les continents en utilisant les 4 
     55;; plus proches voisins masques oceaniquement et construit un nouveau masque 
     56;; contenant l'ancien masque oceanique PLUS les points extrapoles. 
     57;; Reitere le processus niter fois. 
     58;; C'est pas clair, essayez ! 
     59;; 
     60;; 
    6261; 
    6362;    /Nan: to fill the point which have the value 
    64 ;    !values.f_nan. Whitout this keyword, these point are not filling 
     63;    !values.f_nan. Without this keyword, these point are not filling 
    6564;    and stays at !values.f_nan. 
    6665; 
     
    139138;--------------------------------------------------------------- 
    140139;--------------------------------------------------------------- 
    141 ; iteration  
    142 ;--------------------------------------------------------------- 
    143 ;--------------------------------------------------------------- 
    144   FOR n = 1, niter DO BEGIN  
     140; iteration 
     141;--------------------------------------------------------------- 
     142;--------------------------------------------------------------- 
     143  FOR n = 1, niter DO BEGIN 
    145144; on trouve les points coast 
    146145    tempdeux = systime(1)       ; pour key_performance =2 
     
    244243      END 
    245244    endcase 
    246 ;     
     245; 
    247246    z[coast] =  temporary(zcoast)/ temporary(weight) 
    248247; we update the the boundary conditions of z 
     
    258257    IF testvar(var = key_performance) EQ 2 THEN $ 
    259258      print, 'temps remplit: une iteration ', systime(1)-tempdeux 
    260   ENDFOR  
     259  ENDFOR 
    261260fini: 
    262261; 
     
    280279  key_gridtype = oldkey_gridtype 
    281280;--------------------------------------------------------------- 
    282   if keyword_set(key_performance) THEN print, 'temps remplit', systime(1)-tempsun  
     281  if keyword_set(key_performance) THEN print, 'temps remplit', systime(1)-tempsun 
    283282  return, z 
    284 END  
     283END 
    285284 
Note: See TracChangeset for help on using the changeset viewer.