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

corrections of some misspellings in some *.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Computation/grad.pro

    r168 r226  
    1313; 3D (xyz or yt) or 4D (xyzt) array or a structure readable by litchamp 
    1414; and containing a 2D (xy), 3D (xyz or yt) or 4D (xyzt) array. 
    15 ; note that the dimension of the arry must suit the domain dimension. 
     15; note that the dimension of the array must suit the domain dimension. 
    1616; 
    1717; @param DIREC {type=scalar string} 
     
    2222; 
    2323; @uses 
    24 ; cm_4cal, cm_4data, cm_4mmesh  
     24; cm_4cal, cm_4data, cm_4mmesh 
    2525; 
    2626; @restrictions 
    27 ; - Works only for Arakawa C-grid.  
     27; - Works only for Arakawa C-grid. 
    2828; - When computing the gradient, the result is not on the same grid point 
    2929;   than the input data. In consequence, we update, vargrid and the grid position 
    3030;   parameters (firstx[tuvf], lastx[tuvf], nx[tuvf], firsty[tuvf], lasty[tuvf], 
    3131;   ny[tuvf], firstz[tw], lastz[tw], nz[tw]). 
    32 ; - points that cannot be computed (domain bondaries, coastline) are set to NaN 
     32; - points that cannot be computed (domain boundaries, coastline) are set to NaN 
    3333; - the common variable jpt is used to differ xyz (jpt=1) and xyt (jpt\=1) cases. 
    3434; 
     
    5454@cm_4cal   ; for jpt 
    5555@cm_4data  ; for varname, vargrid, vardate, varunit, valmask 
    56 @cm_4mesh  
     56@cm_4mesh 
    5757;------------------------------------------------------------ 
    5858; 
     
    6464  szres = size(res) 
    6565  grille, mask, glam, gphi, gdep, nx, ny, nz $ 
    66           , firstx, firsty, firstz, lastx, lasty, lastz      
     66          , firstx, firsty, firstz, lastx, lasty, lastz 
    6767; 
    6868  if n_elements(valmask) EQ 0 then valmask = 1.e20 
     
    7272    'T':BEGIN 
    7373      case direc of 
    74         'x':BEGIN  
     74        'x':BEGIN 
    7575          divi = e1u[firstx:lastx, firsty:lasty] 
    7676          newmask = (umask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    7777          vargrid = 'U' 
    78           firstxu = firstxt & lastxu = lastxt & nxu = nxt  
     78          firstxu = firstxt & lastxu = lastxt & nxu = nxt 
    7979          firstyu = firstyt & lastyu = lastyt & nyu = nyt 
    8080        END 
     
    8383          newmask = (vmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    8484          vargrid = 'V' 
    85           firstxv = firstxt & lastxv = lastxt & nxv = nxt  
     85          firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    8686          firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    8787        END 
     
    9090          newmask = mask 
    9191          vargrid = 'W' 
    92           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     92          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    9393        END 
    9494        ELSE:return, report('Bad definition of direction argument') 
     
    9797    'W':BEGIN 
    9898      case direc of 
    99         'x':BEGIN  
     99        'x':BEGIN 
    100100          divi = e1u[firstx:lastx, firsty:lasty] 
    101101          newmask = (umask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    102102          vargrid = 'U' 
    103           firstxu = firstxt & lastxu = lastxt & nxu = nxt  
     103          firstxu = firstxt & lastxu = lastxt & nxu = nxt 
    104104          firstyu = firstyt & lastyu = lastyt & nyu = nyt 
    105105        END 
     
    108108          newmask = (vmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    109109          vargrid = 'V' 
    110           firstxv = firstxt & lastxv = lastxt & nxv = nxt  
     110          firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    111111          firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    112112        END 
     
    115115          newmask = mask 
    116116          vargrid = 'T' 
    117           firstzt = firstzw & lastzt = lastzw & nzt = nzw  
     117          firstzt = firstzw & lastzt = lastzw & nzt = nzw 
    118118        END 
    119119        ELSE:return, report('Bad definition of direction argument') 
     
    126126          newmask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] 
    127127          vargrid = 'T' 
    128           firstxt = firstxu & lastxt = lastxu & nxt = nxu  
     128          firstxt = firstxu & lastxt = lastxu & nxt = nxu 
    129129          firstyt = firstyu & lastyt = lastyu & nyt = nyu 
    130130        END 
     
    133133          newmask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    134134          vargrid = 'F' 
    135           firstxf = firstxu & lastxf = lastxu & nxf = nxu  
     135          firstxf = firstxu & lastxf = lastxu & nxf = nxu 
    136136          firstyf = firstyu & lastyf = lastyu & nyf = nyu 
    137137        END 
     
    140140          newmask = mask 
    141141          vargrid = 'W' 
    142           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     142          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    143143        END 
    144144        ELSE:return, report('Bad definition of direction argument') 
     
    165165          newmask = mask 
    166166          vargrid = 'W' 
    167           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     167          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    168168        END 
    169169        ELSE:return, report('Bad definition of direction argument') 
     
    191191      if land[0] NE -1 then res[temporary(land)] = !values.f_nan 
    192192      case direc of 
    193         'x':BEGIN  
     193        'x':BEGIN 
    194194          res = (shift(res, -1, 0)-res)/temporary(divi) 
    195195          if key_periodic EQ 0 OR nx NE jpi THEN res[nx-1, *] = !values.f_nan 
    196196          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0) 
    197197        END 
    198         'y':BEGIN  
     198        'y':BEGIN 
    199199          res = (shift(res, 0, -1)-res)/temporary(divi) 
    200200          res[*, ny-1] = !values.f_nan 
    201           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1)            
     201          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1) 
    202202        END 
    203203        ELSE:return,  report('Bad definition of direction argument for the type of array') 
     
    217217      divi = (temporary(divi))[*]#replicate(1., jpt) 
    218218      case direc of 
    219         'x':BEGIN  
     219        'x':BEGIN 
    220220          res = (shift(res, -1, 0, 0)-res)/temporary(divi) 
    221221          if key_periodic EQ 0 OR nx NE jpi THEN res[nx-1, *, *] = !values.f_nan 
    222222          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0) 
    223223        END 
    224         'y':BEGIN  
     224        'y':BEGIN 
    225225          res = (shift(res, 0, -1, 0)-res)/temporary(divi) 
    226226          res[*, ny-1, *] = !values.f_nan 
    227           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0)         
     227          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0) 
    228228        END 
    229229        ELSE:return,  report('Bad definition of direction argument for the type of array') 
     
    242242      if land[0] NE -1 then res[temporary(land)] = !values.f_nan 
    243243      case direc OF 
    244         'x':BEGIN  
     244        'x':BEGIN 
    245245          divi = (temporary(divi))[*]#replicate(1., nz) 
    246246          res = (shift(res, -1, 0, 0)-res)/temporary(divi) 
     
    248248          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0) 
    249249        END 
    250         'y':BEGIN  
     250        'y':BEGIN 
    251251          divi = (temporary(divi))[*]#replicate(1., nz) 
    252252          res = (shift(res, 0, -1, 0)-res)/temporary(divi) 
    253253          res[*, ny-1, *] = !values.f_nan 
    254           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0)         
     254          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0) 
    255255        END 
    256256        'z':BEGIN 
    257257          divi = replicate(1., nx*ny)#(temporary(divi))[*] 
    258258          if nx EQ 1 OR ny EQ 1 then res = reform(res, nx, ny, nz, /overwrite) 
    259           if vargrid EQ 'W' THEN BEGIN  
     259          if vargrid EQ 'W' THEN BEGIN 
    260260            res = (shift(res, 0, 0, 1)-res)/temporary(divi) 
    261261            res[*, *, 0] = !values.f_nan 
     
    279279      ENDIF 
    280280      case direc OF 
    281         'x':BEGIN  
     281        'x':BEGIN 
    282282          divi = (temporary(divi))[*]#replicate(1., nz*jpt) 
    283283          res = (shift(res, -1, 0, 0, 0)-res)/temporary(divi) 
     
    285285          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0, 0) 
    286286        END 
    287         'y':BEGIN  
     287        'y':BEGIN 
    288288          divi = (temporary(divi))[*]#replicate(1., nz*jpt) 
    289289          res = (shift(res, 0, -1, 0, 0)-res)/temporary(divi) 
    290290          res[*, ny-1, *, *] = !values.f_nan 
    291           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0, 0)         
     291          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0, 0) 
    292292        END 
    293293        'z':BEGIN 
     
    295295          divi = (temporary(divi))[*]#replicate(1L, jpt) 
    296296          if nx EQ 1 OR ny EQ 1 then res = reform(res, nx, ny, nz, jpt, /overwrite) 
    297           if vargrid EQ 'W' THEN BEGIN  
     297          if vargrid EQ 'W' THEN BEGIN 
    298298            res = (shift(res, 0, 0, 1, 0)-res)/temporary(divi) 
    299299            res[*, *, 0, *] = !values.f_nan 
Note: See TracChangeset for help on using the changeset viewer.