Changeset 495 for trunk/SRC/Grid


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/Grid
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Grid/computegrid.pro

    r493 r495  
    379379  ENDIF 
    380380  IF keyword_set(xalreadycut) THEN BEGIN 
    381     xmin = 0  
    382     xmax = jpi - 1  
     381    xmin = 0 
     382    xmax = jpi - 1 
    383383    nxx = jpi 
    384384  ENDIF ELSE BEGIN 
     
    390390    ixminmesh = 0 > ixminmesh < ixmaxmesh 
    391391    jpi = ixmaxmesh-ixminmesh+1 
    392     xmin = ixminmesh  
     392    xmin = ixminmesh 
    393393    xmax = ixmaxmesh 
    394394    nxx = jpiglo 
     
    401401  ENDIF 
    402402  IF keyword_set(yalreadycut) THEN BEGIN 
    403     ymin = 0  
    404     ymax = jpj - 1  
     403    ymin = 0 
     404    ymax = jpj - 1 
    405405    nyy = jpj 
    406   ENDIF ELSE BEGIN  
     406  ENDIF ELSE BEGIN 
    407407    jpjglo = long(ny) 
    408408    IF n_elements(yminmesh) NE 0 THEN iyminmesh = long(yminmesh[0]) ELSE iyminmesh  = 0l 
     
    413413    iyminmesh = 0 > iyminmesh < iymaxmesh 
    414414    jpj = iymaxmesh-iyminmesh+1 
    415     ymin = iyminmesh  
     415    ymin = iyminmesh 
    416416    ymax = iymaxmesh 
    417417    nyy = jpjglo 
     
    422422  ENDIF 
    423423  IF keyword_set(zalreadycut) THEN BEGIN 
    424     zmin = 0  
    425     zmax = jpk - 1  
     424    zmin = 0 
     425    zmax = jpk - 1 
    426426    nzz = jpk 
    427   ENDIF ELSE BEGIN  
     427  ENDIF ELSE BEGIN 
    428428   jpkglo = long(nz) 
    429429    IF n_elements(zminmesh) NE 0 THEN izminmesh = long(zminmesh[0]) ELSE izminmesh  = 0l 
     
    433433    izminmesh = 0 > izminmesh < izmaxmesh 
    434434    jpk = izmaxmesh-izminmesh+1 
    435     zmin = izminmesh  
     435    zmin = izminmesh 
    436436    zmax = izmaxmesh 
    437437    nzz = jpkglo 
     
    516516  ELSE glamt = reform(glamt, nxx, /over) 
    517517  CASE size(glamt, /n_dimensions) OF 
    518     1:BEGIN  
     518    1:BEGIN 
    519519      IF n_elements(glamt) EQ 1 THEN glamt = replicate(glamt[0], jpi, jpj) $ 
    520520      ELSE glamt = glamt[xmin:xmax]#replicate(1, jpj) 
     
    550550  ELSE gphit = reform(gphit, nyy, /over) 
    551551  CASE size(gphit, /n_dimensions) OF 
    552     1:BEGIN  
     552    1:BEGIN 
    553553      IF n_elements(gphit) EQ 1 THEN gphit = replicate(gphit[0], jpi, jpj) $ 
    554554      ELSE gphit = replicate(1, jpi)#gphit[ymin:ymax] 
     
    644644;==================================================== 
    645645; 
    646   IF n_elements(yreverse) EQ 0 THEN BEGIN  
     646  IF n_elements(yreverse) EQ 0 THEN BEGIN 
    647647    IF jpj GT 1 THEN BEGIN 
    648648      IF total(gphit[0, 1:jpj-1] LT gphit[0, 0:jpj-2]) GT jpj/2 THEN key_yreverse = 1 ELSE key_yreverse = 0 
     
    993993;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    994994; 
    995 ; 
    996995;==================================================== 
    997996; e1[tuvf] from degree to meters 
     
    11251124     AND total(tmask[*, 0, *]) EQ 0 AND total(tmask[*, jpj-1, *]) EQ 0 $ 
    11261125     AND total(tmask[0, *, *]) EQ 0 AND total(tmask[jpi-1, *, *]) EQ 0 THEN BEGIN 
    1127     IF NOT keyword_set(key_periodic) THEN BEGIN  
     1126    IF NOT keyword_set(key_periodic) THEN BEGIN 
    11281127      xminmesh = ixminmesh + 1 
    11291128      xmaxmesh = ixmaxmesh - 1 
     
    11361135      gphit = reverse(gphit, 2) 
    11371136      glamt = reverse(glamt, 2) 
    1138       tmask = reverse(tmask, 2)     
     1137      tmask = reverse(tmask, 2) 
    11391138      IF jpk EQ 1 THEN tmask = reform(tmask, jpi, jpj, jpk, /over) 
    11401139    ENDIF 
  • trunk/SRC/Grid/micromeshmask.pro

    r451 r495  
    104104  zgr_varlist = strtrim(strlowcase(zgr_varlist), 2) 
    105105; is e3t a real 3D array? 
    106   IF (where(zgr_varlist EQ 'e3t'))[0] NE -1 THEN BEGIN  
     106  IF (where(zgr_varlist EQ 'e3t'))[0] NE -1 THEN BEGIN 
    107107    varinq = ncdf_varinq(cdfid, 'e3t') 
    108108    if varinq.ndims GE 3 THEN BEGIN 
     
    111111      ncdf_diminq, cdfid, varinq.dim[2], name, kkk 
    112112      IF iii EQ jpi AND jjj EQ jpj AND kkk EQ jpk THEN key_e3_3d = 1 
    113     ENDIF    
     113    ENDIF 
    114114  ENDIF 
    115115; is gdept a real 3D array? 
    116   IF (where(zgr_varlist EQ 'gdept'))[0] NE -1 THEN BEGIN  
     116  IF (where(zgr_varlist EQ 'gdept'))[0] NE -1 THEN BEGIN 
    117117    varinq = ncdf_varinq(cdfid, 'gdept') 
    118118    if varinq.ndims GE 3 THEN BEGIN 
     
    121121      ncdf_diminq, cdfid, varinq.dim[2], name, kkk 
    122122      IF iii EQ jpi AND jjj EQ jpj AND kkk EQ jpk THEN key_gdep_3d = 1 
    123     ENDIF    
     123    ENDIF 
    124124  ENDIF 
    125125;------------------------------------------------------ 
     
    137137  dimidy_m = ncdf_dimdef(cdfidout, 'y_m', jpj_m) 
    138138  dimidz = ncdf_dimdef(cdfidout, 'z', jpk) 
    139 ; global attributs 
     139; global attributes 
    140140  ncdf_attput, cdfidout, 'IDL_Program_Name', 'micromeshmask.pro', /GLOBAL 
    141141  ncdf_attput, cdfidout, 'Creation_Date', systime(), /GLOBAL 
  • trunk/SRC/Grid/ncdf_meshread.pro

    r493 r495  
    297297      ncdf_diminq, cdfid, varinq.dim[2], name, kkk 
    298298      IF iii EQ jpiglo AND jjj EQ jpjglo AND kkk EQ jpkglo THEN key_gdep_3d = 1 
    299     ENDIF    
    300   ENDIF    
     299    ENDIF 
     300  ENDIF 
    301301; for compatibility with old versions of meshmask/partial steps 
    302302  e3t_ps = -1 
     
    315315        key_partialstep = 1 
    316316      ENDIF 
    317     ENDIF    
     317    ENDIF 
    318318  ENDIF 
    319319; 
     
    465465  ENDIF 
    466466; boundary conditions used to compute umask. 
    467   IF ncdf_varid(cdfid, 'umask') NE -1 THEN BEGIN  
     467  IF ncdf_varid(cdfid, 'umask') NE -1 THEN BEGIN 
    468468     varinq = ncdf_varinq(cdfid, 'umask') 
    469469     name = varinq.name 
     
    482482  ENDIF ELSE umaskred = bytarr(jpj, jpk) 
    483483; boundary conditions used to compute fmask (1). 
    484   IF ncdf_varid(cdfid, 'fmask') NE -1 THEN BEGIN  
     484  IF ncdf_varid(cdfid, 'fmask') NE -1 THEN BEGIN 
    485485     varinq = ncdf_varinq(cdfid, 'fmask') 
    486486     name = varinq.name 
     
    497497  ENDIF ELSE fmaskredy = bytarr(jpj, jpk) 
    498498; boundary conditions used to compute vmask 
    499   IF ncdf_varid(cdfid, 'vmask') NE -1 THEN BEGIN  
     499  IF ncdf_varid(cdfid, 'vmask') NE -1 THEN BEGIN 
    500500     varinq = ncdf_varinq(cdfid, 'vmask') 
    501501     name = varinq.name 
     
    525525  ENDIF ELSE vmaskred = bytarr(jpi, jpk) 
    526526; boundary conditions used to compute fmask (2). 
    527   IF ncdf_varid(cdfid, 'fmask') NE -1 THEN BEGIN  
     527  IF ncdf_varid(cdfid, 'fmask') NE -1 THEN BEGIN 
    528528     varinq = ncdf_varinq(cdfid, 'fmask') 
    529529     name = varinq.name 
     
    548548;------------------------------------------------------- 
    549549  IF (where(allvarname EQ 'e3t_0'))[0] NE -1 THEN fnamevar = ['e3t_0', 'e3w_0', 'gdept_0', 'gdepw_0'] $ 
    550   ELSE                                            fnamevar = ['e3t', 'e3w', 'gdept', 'gdepw']  
     550  ELSE                                            fnamevar = ['e3t', 'e3w', 'gdept', 'gdepw'] 
    551551  for i = 0, n_elements(fnamevar)-1 do begin 
    552552    varinq = ncdf_varinq(cdfid, fnamevar[i]) 
  • trunk/SRC/Grid/smallmeshmask.pro

    r475 r495  
    109109  zgr_varlist = strtrim(strlowcase(zgr_varlist), 2) 
    110110; is e3t a real 3D array? 
    111   IF (where(zgr_varlist EQ 'e3t'))[0] NE -1 THEN BEGIN  
     111  IF (where(zgr_varlist EQ 'e3t'))[0] NE -1 THEN BEGIN 
    112112    varinq = ncdf_varinq(cdfid, 'e3t') 
    113113    if varinq.ndims GE 3 THEN BEGIN 
     
    116116      ncdf_diminq, cdfid, varinq.dim[2], name, kkk 
    117117      IF iii EQ jpi AND jjj EQ jpj AND kkk EQ jpk THEN key_e3_3d = 1 
    118     ENDIF    
     118    ENDIF 
    119119  ENDIF 
    120120; is gdept a real 3D array? 
    121   IF (where(zgr_varlist EQ 'gdept'))[0] NE -1 THEN BEGIN  
     121  IF (where(zgr_varlist EQ 'gdept'))[0] NE -1 THEN BEGIN 
    122122    varinq = ncdf_varinq(cdfid, 'gdept') 
    123123    if varinq.ndims GE 3 THEN BEGIN 
     
    126126      ncdf_diminq, cdfid, varinq.dim[2], name, kkk 
    127127      IF iii EQ jpi AND jjj EQ jpj AND kkk EQ jpk THEN key_gdep_3d = 1 
    128     ENDIF    
     128    ENDIF 
    129129  ENDIF 
    130130;------------------------------------------------------ 
     
    141141  dimidy = ncdf_dimdef(cdfidout, 'y', jpj) 
    142142  dimidz = ncdf_dimdef(cdfidout, 'z', jpk) 
    143 ; global attributs 
     143; global attributes 
    144144  ncdf_attput, cdfidout, 'IDL_Program_Name', 'smallmeshmask.pro', /GLOBAL 
    145145  ncdf_attput, cdfidout, 'Creation_Date', systime(), /GLOBAL 
Note: See TracChangeset for help on using the changeset viewer.