Ignore:
Timestamp:
06/29/06 16:59:33 (18 years ago)
Author:
pinsard
Message:

correction of some *.pro using aspell list; introduction of default idldoc syntax

File:
1 edited

Legend:

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

    r118 r121  
    1010; @examples 
    1111; IDL> ncdf_meshread [,' filename'] 
    12 ;  
    13 ; @param filename {in}{optional} the name of the meshmask file to read. Default is 
    14 ;    meshmask.nc. if this name does not contain any / and if 
     12; 
     13; @param filename {in}{optional}{default=meshmask.nc}  
     14;    the name of the meshmask file to read.  
     15;    if this name does not contain any "/" and if 
    1516;    iodirectory keyword is not specify, then the common variable 
    1617;    iodir will be use to define the mesh file path. 
    1718; 
    18 ; @keyword GLAMBOUNDARY a 2 elements vector, {lon1,lon2], the longitute 
     19; @keyword GLAMBOUNDARY a 2 elements vector, [lon1,lon2], the longitude 
    1920;    boundaries that should be used to visualize the data. 
    2021;      lon2 > lon1 
     
    3738;    computed by using the first line of glamt. 
    3839; 
    39 ; @keyword SHIFT  to force the manual definition of key_shift. By 
    40 ;    debault, key_shift is automaticaly computed according to the 
     40; @keyword SHIFT to force the manual definition of key_shift. By 
     41;    default, key_shift is automaticaly computed according to the 
    4142;    glamboundary (when defined) by using the first line of glamt. if 
    42 ;    key_periodic=0 then in any case key_shift = 0.  
     43;    key_periodic=0 then in any case key_shift = 0. 
    4344; 
    4445; @keyword STRCALLING a string containing the calling command used to call 
    4546;    computegrid (this is used by xxx.pro) 
    4647; 
    47 ; @keyword STRIDE a 3 elements vector to specify the stride in x, y, z 
    48 ;    direction. Default definition is key_stride. The resulting value 
    49 ;    will be stored in the common (cm_4mesh) variable key_stride 
    50 ; 
     48; @keyword STRIDE {default=key_stride}  
     49;    a 3 elements vector to specify the stride in x, y, z direction.  
     50;    The resulting value will be stored in the common (cm_4mesh) variable  
     51;    key_stride 
    5152; 
    5253; @keyword _EXTRA used to pass your keywords to the created function. 
    5354; 
    54 ; 
    5555; @uses cm_4mesh cm_4data cm_4cal 
    5656; 
    57 ; @restrictions define and/or use common variables from  
     57; @restrictions define and/or use common variables from 
    5858;               cm_4mesh, cm_4data, cm_4cal 
    5959; 
     
    6262;  ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 
    6363;  be defined febore calling ncdf_meshread. if some of those value 
    64 ;  are equal to -1 they will be automatically defined  
     64;  are equal to -1 they will be automatically defined 
    6565; 
    6666; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     
    7070; of key_shift, ...) 
    7171; Oct. 2004, Sebastien Masson: add PERIODIC and SHIFT 
    72 ; Aug. 2005, Sebastien Masson: some cleaning + english  
     72; Aug. 2005, Sebastien Masson: some cleaning + english 
    7373; 
    7474; @version $Id$ 
     
    100100    print, ' The keyword CHECKDAT has been suppressed (it could create bugs).' 
    101101    print, ' Remove it from the call of ncdf_meshread' 
    102     print, ' Please use smallmeshmask.pro or micromeshmask.pro to create a'  
     102    print, ' Please use smallmeshmask.pro or micromeshmask.pro to create a' 
    103103    print, ' meshmask that has manageable size' 
    104104    return 
     
    107107; find meshfile name and open it! 
    108108;------------------------------------------------------- 
    109 ; def de filename par defaut 
     109; def of filename by default 
    110110  IF n_params() EQ 0 then filename = 'meshmask.nc' 
    111111  meshname = isafile(file = filename, iodirectory = iodir, _EXTRA = ex) 
     
    123123  ncdf_diminq, cdfid, 'y', name, jpjglo 
    124124  listdims = strlowcase(ncdf_listdims(cdfid)) 
    125   IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpkglo ELSE BEGIN  
     125  IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpkglo ELSE BEGIN 
    126126    dimid = (where(strmid(listdims, 0, 5) EQ 'depth'))[0] 
    127     IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpkglo ELSE BEGIN  
     127    IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpkglo ELSE BEGIN 
    128128      dummy = report('We could not find the vertical dimension..., its name must be z or start with depth') 
    129129      stop 
    130     ENDELSE  
    131   ENDELSE  
     130    ENDELSE 
     131  ENDELSE 
    132132; 
    133133  if keyword_set(getdimensions) then begin 
     
    159159;------------------------------------------------------- 
    160160  IF n_elements(onearth) EQ 0 THEN key_onearth = 1 $ 
    161   ELSE key_onearth = keyword_set(onearth)  
     161  ELSE key_onearth = keyword_set(onearth) 
    162162  IF NOT key_onearth THEN BEGIN 
    163163    periodic = 0 
     
    207207      bigger = where(xaxis GE glamboundary[1]) 
    208208      if bigger[0] NE -1 then xaxis[bigger] = xaxis[bigger]-360 
    209 ;  
     209; 
    210210      key_shift = (where(xaxis EQ min(xaxis)))[0] 
    211       IF key_shift NE 0 THEN BEGIN  
     211      IF key_shift NE 0 THEN BEGIN 
    212212        key_shift = jpi-key_shift 
    213213        xaxis = shift(xaxis, key_shift) 
     
    219219        widget_control, noticebase, bad_id = nothing, /destroy 
    220220        return 
    221       ENDIF  
     221      ENDIF 
    222222; 
    223223    ENDIF ELSE key_shift = 0 
     
    286286; for compatibility with old versions of meshmask/partial steps 
    287287  IF (where(allvarname EQ 'e3tp'))[0] NE -1 THEN $ 
    288     namevar = [namevar, 'e3tp', 'e3wp'] ELSE BEGIN  
     288    namevar = [namevar, 'e3tp', 'e3wp'] ELSE BEGIN 
    289289    e3t_ps = -1 
    290290    e3w_ps = -1 
    291291  ENDELSE 
    292292  IF (where(allvarname EQ 'e3t_ps'))[0] NE -1 $ 
    293   THEN namevar = [namevar, 'e3t_ps', 'e3w_ps' ]ELSE BEGIN  
     293  THEN namevar = [namevar, 'e3t_ps', 'e3w_ps' ]ELSE BEGIN 
    294294    e3t_ps = -1 
    295295    e3w_ps = -1 
    296296  ENDELSE 
    297297  IF (where(allvarname EQ 'e3u_ps'))[0] NE -1 $ 
    298   THEN namevar = [namevar, 'e3u_ps', 'e3v_ps'] ELSE BEGIN  
     298  THEN namevar = [namevar, 'e3u_ps', 'e3v_ps'] ELSE BEGIN 
    299299    e3u_ps = -1 
    300300    e3v_ps = -1 
     
    307307    name = varcontient.name 
    308308@read_ncdf_varget 
    309     commande = namevar[i]+'=float(res)' 
    310     rien = execute(commande) 
     309    command = namevar[i]+'=float(res)' 
     310    nothing = execute(command) 
    311311  ENDFOR 
    312312; for compatibility with old versions of meshmask/partial steps 
     
    314314  IF n_elements(e3tp) NE 0 THEN e3t_ps = temporary(e3tp) 
    315315  IF n_elements(e3wp) NE 0 THEN e3w_ps = temporary(e3wp) 
    316 ; in the kase of key_stride ne [1, 1, 1] redefine f points 
     316; in the case of key_stride ne [1, 1, 1] redefine f points 
    317317; coordinates: they must be in the middle of 3 T points 
    318318  if key_stride[0] NE 1 OR key_stride[1] NE 1 then BEGIN 
    319319; we must recompute glamf and gphif... 
    320     IF jpi GT 1 THEN BEGIN  
     320    IF jpi GT 1 THEN BEGIN 
    321321      if (keyword_set(key_onearth) AND keyword_set(xnotsorted)) $ 
    322322        OR (keyword_set(key_periodic) AND key_irregular) then BEGIN 
     
    333333        ELSE stepxf[jpi-1, *] = stepxf[jpi-2, *] 
    334334      ENDELSE 
    335       IF jpj GT 1 THEN BEGIN  
     335      IF jpj GT 1 THEN BEGIN 
    336336        stepxf[*, jpj-1] = stepxf[*, jpj-2] 
    337337        stepxf[jpi-1, jpj-1] = stepxf[jpi-2, jpj-2] 
     
    339339      glamf = glamt + 0.5 * stepxf 
    340340    ENDIF ELSE glamf = glamt + 0.5 
    341     IF jpj GT 1 THEN BEGIN  
     341    IF jpj GT 1 THEN BEGIN 
    342342; we must compute stepyf: y distance between T(i,j) T(i+1,j+1) 
    343343      stepyf = shift(gphit, -1, -1) - gphit 
     
    347347          stepyf[jpi-1, *] = stepyf[jpi-2, *] 
    348348        stepyf[jpi-1, jpj-1] = stepyf[jpi-2, jpj-2] 
    349       ENDIF  
     349      ENDIF 
    350350      gphif = gphit + 0.5 * stepyf 
    351351    ENDIF ELSE gphif = gphit + 0.5 
     
    370370; the mask is stored as the bit values of the byte array (along the y 
    371371; dimension, see micromeshmask.pro)... 
    372 ; we must modify several parameters...  
     372; we must modify several parameters... 
    373373    iyminmesh = 0L 
    374374    firsty = yyy1/8 
     
    386386      zzz = transpose(temporary(zzz)) 
    387387      zzz = zzz[*, yyy1 MOD 8: 8*ny - 8 + yyy2 MOD 8] 
    388       IF key_stridetrue[1] NE 1 THEN BEGIN  
     388      IF key_stridetrue[1] NE 1 THEN BEGIN 
    389389;        IF float(strmid(!version.release,0,3)) LT 5.6 THEN BEGIN 
    390390        nnny = (size(zzz))[2] 
     
    478478    CASE n_elements(varcontient.dim) OF 
    479479      4:BEGIN 
    480         commande = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
     480        command = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
    481481                   +',offset = [0,0,izminmesh,0], count = [1,1,jpk,1]' 
    482         if key_stride[2] NE 1 then commande = commande+', stride=[1,1,key_stride[2],1]' 
    483       END  
     482        if key_stride[2] NE 1 then command = command+', stride=[1,1,key_stride[2],1]' 
     483      END 
    484484      2:BEGIN 
    485         commande = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
     485        command = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
    486486                   +',offset = [izminmesh,0], count = [jpk,1]' 
    487         if key_stride[2] NE 1 then commande = commande+', stride=key_stride[2]' 
    488       END  
     487        if key_stride[2] NE 1 then command = command+', stride=key_stride[2]' 
     488      END 
    489489      1:BEGIN 
    490         commande = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
     490        command = 'ncdf_varget,cdfid,namevar[i],'+namevar[i] $ 
    491491                   +',offset = [izminmesh], count = [jpk]' 
    492         if key_stride[2] NE 1 then commande = commande+', stride=key_stride[2]' 
     492        if key_stride[2] NE 1 then command = command+', stride=key_stride[2]' 
    493493      END 
    494494    ENDCASE 
    495     rien = execute(commande) 
    496     commande = namevar[i]+'=float('+namevar[i]+')' 
    497     rien = execute(commande) 
    498     commande = 'if size('+namevar[i]+', /n_dimension) gt 0 then '+namevar[i]+' = reform('+namevar[i]+', /over)' 
    499     rien = execute(commande) 
     495    nothing = execute(command) 
     496    command = namevar[i]+'=float('+namevar[i]+')' 
     497    nothing = execute(command) 
     498    command = 'if size('+namevar[i]+', /n_dimension) gt 0 then '+namevar[i]+' = reform('+namevar[i]+', /over)' 
     499    nothing = execute(command) 
    500500  ENDFOR 
    501501;------------------------------------------------------- 
     
    535535; make sure we do have 2d arrays when jpj eq 1 
    536536;------------------------------------------------------- 
    537   IF jpj EQ 1 THEN BEGIN  
     537  IF jpj EQ 1 THEN BEGIN 
    538538    glamt = reform(glamt, jpi, jpj, /over) 
    539539    gphit = reform(gphit, jpi, jpj, /over) 
     
    557557      e3t_ps = reform(e3t_ps, jpi, jpj, /over) 
    558558      e3w_ps = reform(e3w_ps, jpi, jpj, /over) 
    559     ENDIF  
     559    ENDIF 
    560560  ENDIF 
    561561;------------------------------------------------------- 
     
    574574;==================================================== 
    575575; 
    576   IF NOT keyword_set(strcalling) THEN BEGIN  
     576  IF NOT keyword_set(strcalling) THEN BEGIN 
    577577    IF n_elements(ccmeshparameters) EQ 0 THEN strcalling = 'ncdf_meshread' $ 
    578578    ELSE strcalling = ccmeshparameters.filename 
    579   ENDIF  
     579  ENDIF 
    580580  IF n_elements(glamt) GE 2 THEN BEGIN 
    581581    glaminfo = moment(glamt) 
     
    583583    gphiinfo = moment(gphit) 
    584584    IF finite(gphiinfo[2]) EQ 0 THEN gphiinfo = gphiinfo[0:1] 
    585   ENDIF ELSE BEGIN  
     585  ENDIF ELSE BEGIN 
    586586    glaminfo = glamt 
    587587    gphiinfo = gphit 
    588   ENDELSE  
     588  ENDELSE 
    589589  ccmeshparameters = {filename:strcalling  $ 
    590590          , glaminfo:float(string(glaminfo, format = '(E11.4)')) $ 
     
    601601; 
    602602  if keyword_set(key_performance) THEN $ 
    603     print, 'time ncdf_meshread', systime(1)-tempsun  
     603    print, 'time ncdf_meshread', systime(1)-tempsun 
    604604 
    605605;------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.