Changeset 495 for trunk/SRC/Computation


Ignore:
Timestamp:
04/17/14 10:49:43 (10 years ago)
Author:
pinsard
Message:

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

Location:
trunk/SRC/Computation
Files:
9 edited

Legend:

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

    r493 r495  
    3030; @returns {type=2D xy array} 
    3131; barotropic stream function in Sv 
    32 ;  
     32; 
    3333; @uses 
    3434; <pro>cm_4mesh</pro> 
     
    4242; - to be valid, mask must be equal to 0 at the bottom and on each 
    4343;   side of the domain along x direction 
    44 ; - define the common variables (of cm_4data)  
     44; - define the common variables (of cm_4data) 
    4545;       varname = 'BSF' 
    4646;       varunit = 'Sv' 
    47 ;       vargrid = 'F'  
     47;       vargrid = 'F' 
    4848; 
    4949; @examples 
     
    9393  IF keyword_set(refpoint) THEN BEGIN 
    9494    refind = neighbor(refpoint[0], refpoint[1], glamf[firstx:lastx, firsty:lasty], gphif[firstx:lastx, firsty:lasty], SPHERE = key_onearth) 
    95     IF n_elements(refvalue) EQ 0 THEN refval = - bsf[refind[0]] ELSE refval = refvalue - bsf[refind[0]]  
     95    IF n_elements(refvalue) EQ 0 THEN refval = - bsf[refind[0]] ELSE refval = refvalue - bsf[refind[0]] 
    9696    bsf = temporary(bsf) + refval 
    9797  ENDIF 
  • trunk/SRC/Computation/curl.pro

    r371 r495  
    2727; @keyword MILLION {default=0}{type=scalar: 0 or 1} 
    2828; Activate to multiply returned array by 1.e6 
    29 ;  
     29; 
    3030; @keyword _EXTRA 
    3131; Used to declare that this routine accepts inherited keywords 
     
    8888; 
    8989  gr = litchamp(uu, /grid) 
    90   IF gr NE '' THEN BEGIN  
     90  IF gr NE '' THEN BEGIN 
    9191    IF gr NE 'U' THEN return, report('the first parameter is not located on U grid, but on '+ strtrim(gr, 2) +'grid') 
    92   ENDIF  
     92  ENDIF 
    9393  gr = litchamp(vv, /grid) 
    94   IF gr NE '' THEN BEGIN  
     94  IF gr NE '' THEN BEGIN 
    9595    IF gr NE 'V' THEN return, report('the second parameter is not located on V grid, but on '+ strtrim(gr, 2) +'grid') 
    96   ENDIF  
     96  ENDIF 
    9797  u = litchamp(uu) 
    9898  v = litchamp(vv) 
  • trunk/SRC/Computation/div.pro

    r378 r495  
    2626; @keyword MILLION {default=0}{type=scalar: 0 or 1} 
    2727; Activate to multiply returned array by 1.e6 
    28 ;  
     28; 
    2929; @keyword _EXTRA 
    3030; Used to declare that this routine accepts inherited keywords 
     
    8686; 
    8787  gr = litchamp(uu, /grid) 
    88   IF gr NE '' THEN BEGIN  
     88  IF gr NE '' THEN BEGIN 
    8989    IF gr NE 'U' THEN return, report('the first parameter is not located on U grid, but on '+ strtrim(gr, 2) +'grid') 
    90   ENDIF  
     90  ENDIF 
    9191  gr = litchamp(vv, /grid) 
    92   IF gr NE '' THEN BEGIN  
     92  IF gr NE '' THEN BEGIN 
    9393    IF gr NE 'V' THEN return, report('the second parameter is not located on V grid, but on '+ strtrim(gr, 2) +'grid') 
    94   ENDIF  
     94  ENDIF 
    9595  u = litchamp(uu) 
    9696  v = litchamp(vv) 
  • trunk/SRC/Computation/e3t_3d.pro

    r493 r495  
    2828; 
    2929;- 
    30 function e3t_3d, e1 = e1, e2 = e2, fstx = fstx, lstx = lstx, fsty = fsty, lsty = lsty  
     30function e3t_3d, e1 = e1, e2 = e2, fstx = fstx, lstx = lstx, fsty = fsty, lsty = lsty 
    3131; 
    3232  compile_opt idl2, strictarrsubs 
     
    4848  ENDCASE 
    4949  e3t3d = arr2d[*] # e3t[firstzt:lastzt] 
    50   e3t3d = reform(e3t3d, nx, ny, nzt, /overwrite)     
     50  e3t3d = reform(e3t3d, nx, ny, nzt, /overwrite) 
    5151; 
    5252  IF keyword_set(key_partialstep) THEN BEGIN 
     
    6060    ok2 = inter(sea, where(bottom2 GE 0 AND bottom2 LT nzt)) 
    6161; apply e3t_ps to e3t_3D at the bottom of the ocean 
    62     IF ok[0]  NE -1 THEN BEGIN  
     62    IF ok[0]  NE -1 THEN BEGIN 
    6363; the bottom of the ocean in 3D index is: 
    6464      bottom  = (lindgen(nx*ny))[ok ] + nx*ny*(temporary(bottom ))[ok ] 
    6565      e3t3d[temporary(bottom )] = arr2d[ok ] * (e3t_ps[fstx:lstx, fsty:lsty])[ok ] 
    6666    ENDIF 
    67     IF ok2[0] NE -1 THEN BEGIN  
     67    IF ok2[0] NE -1 THEN BEGIN 
    6868      bottom2 = (lindgen(nx*ny))[ok2] + nx*ny*(temporary(bottom2))[ok2] 
    6969      e3t3d[temporary(bottom2)] = arr2d[ok2] * (e3t_ps[fstx:lstx, fsty:lsty])[ok2] 
    7070    ENDIF 
    71 ;  
     71; 
    7272  ENDIF 
    7373; 
  • trunk/SRC/Computation/e3u_3d.pro

    r493 r495  
    3434@cm_4mesh 
    3535; 
    36   IF keyword_set(key_partialstep) THEN lastx = ( lastxu + 1 ) < ( jpi - 1 ) ELSE lastx = lastxu  
     36  IF keyword_set(key_partialstep) THEN lastx = ( lastxu + 1 ) < ( jpi - 1 ) ELSE lastx = lastxu 
    3737  nx = lastx - firstxu + 1 
    3838; get e3t 3D 
     
    4141  IF keyword_set(key_partialstep) THEN BEGIN 
    4242; 
    43 ; Rebuild the U-point 3D partial steps array from T-point 3D e3t_3D array  
     43; Rebuild the U-point 3D partial steps array from T-point 3D e3t_3D array 
    4444; 
    4545    tmp = shift(e3t3d, -1, 0, 0) 
     
    5959; 
    6060    IF nx EQ nxu + 1 THEN e3u3d = (temporary(e3u3d))[0:nx-2, *, *] 
    61 ;     
     61; 
    6262  ENDIF ELSE e3u3d = temporary(e3t3d) 
    6363; 
  • trunk/SRC/Computation/e3v_3d.pro

    r493 r495  
    4040; 
    4141  IF keyword_set(key_partialstep) THEN BEGIN 
    42 ; Rebuild the V-point 3D partial steps array from T-point 3D e3t_3D array  
     42; Rebuild the V-point 3D partial steps array from T-point 3D e3t_3D array 
    4343    tmp = shift(e3t3d, 0, -1, 0) 
    4444    IF ny EQ nyv THEN tmp[*, ny-1, *] = e3t3d[*, ny-1, *] 
     
    4848; 
    4949    IF ny EQ nyv + 1 THEN e3v3d = (temporary(e3v3d))[*, 0:ny-2, *] 
    50 ;     
     50; 
    5151  ENDIF ELSE e3v3d = temporary(e3t3d) 
    5252; 
     
    6363  return, e3v3d 
    6464END 
    65  
  • trunk/SRC/Computation/e3w_3d.pro

    r493 r495  
    4242  ENDCASE 
    4343  e3w_3d = arr2d[*] # e3w[firstzw:lastzw] 
    44   e3w_3d = reform(e3w_3d, nxt, nyt, nzw, /overwrite)     
     44  e3w_3d = reform(e3w_3d, nxt, nyt, nzw, /overwrite) 
    4545; 
    4646  IF keyword_set(key_partialstep) THEN BEGIN 
     
    6464    ENDIF 
    6565  ENDIF 
    66 ;  
     66; 
    6767  return, e3w_3d 
    6868END 
    69  
  • trunk/SRC/Computation/grad.pro

    r371 r495  
    99; @param FIELD 
    1010; The field for which we want to compute the gradient. A 2D (xy), 
    11 ; 3D (xyz or yt) or 4D (xyzt) array or a structure readable by  
     11; 3D (xyz or yt) or 4D (xyzt) array or a structure readable by 
    1212; <pro>litchamp</pro> and containing a 2D (xy), 3D (xyz or yt) or 4D (xyzt) array. 
    1313; Note that the dimension of the array must suit the domain dimension. 
     
    1818; @keyword MILLION {default=0}{type=scalar: 0 or 1} 
    1919; Activate to multiply returned array by 1.e6 
    20 ;  
     20; 
    2121; @keyword _EXTRA 
    2222; Used to declare that this routine accepts inherited keywords 
  • trunk/SRC/Computation/msf.pro

    r493 r495  
    3535; @returns {type=2D yz array} 
    3636; meridional stream function in Sv 
    37 ;  
     37; 
    3838; @uses 
    3939; <pro>cm_4mesh</pro> 
     
    4747; - to be valid, mask must be equal to 0 at the bottom and on each 
    4848;   side of the domain along x direction 
    49 ; - define the common variables (of cm_4data)  
     49; - define the common variables (of cm_4data) 
    5050;       varname = 'MSF' 
    5151;       varunit = 'Sv' 
     
    100100; 
    101101; current -> transport 
    102   IF NOT keyword_set(transport) THEN vn = temporary(vn) * e3v_3d(/e1)  
     102  IF NOT keyword_set(transport) THEN vn = temporary(vn) * e3v_3d(/e1) 
    103103  vtr = temporary(vn) * msk 
    104104; 
     
    110110    maskout = reverse(temporary(maskout), 2) 
    111111  ENDIF 
    112 ;   
    113 ; defaut computation: 
     112; 
     113; default computation: 
    114114;  msf = 1.e-6 * total(total(temporary(vtr), 1), 2, /cumulative) 
    115115; but we force the computation from bottom to up. 
     
    132132 
    133133  IF (jpiglo EQ 182 AND jpjglo EQ 149) OR (jpiglo EQ 722 AND jpjglo EQ 511) $ 
    134      OR (jpiglo EQ 1442 AND jpjglo EQ 1021) OR (jpiglo EQ 4322 AND jpjglo EQ 3059) THEN BEGIN  
     134     OR (jpiglo EQ 1442 AND jpjglo EQ 1021) OR (jpiglo EQ 4322 AND jpjglo EQ 3059) THEN BEGIN 
    135135; find the i index with the northest latitude 
    136136    ind = (where(gphit[firstx:lastx, firsty:lasty] EQ max(gphit[firstx:lastx, firsty:lasty])))[0] mod nx 
Note: See TracChangeset for help on using the changeset viewer.