Changeset 231 for trunk/SRC/Grid


Ignore:
Timestamp:
03/19/07 18:15:51 (17 years ago)
Author:
pinsard
Message:

improvements/corrections of some *.pro headers

Location:
trunk/SRC/Grid
Files:
16 edited

Legend:

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

    r230 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ; 
     1;+ 
    52; @file_comments 
    63; add land points on a 2D land-sea mask 
    74; 
    8 ; @categories  
     5; @categories 
    96; Grid 
    107; 
    11 ; @param TAB {in}{required}  
     8; @param TAB {in}{required} 
    129; a 2D land-sea mask, with 1 on sea and 0 on land 
    1310; 
    14 ; @keyword CELLSIZE  
     11; @keyword CELLSIZE 
    1512; size (in pixel) of the square 
    1613; representing one point of the mask 
    1714; 
    18 ; @returns  
     15; @returns 
    1916; newmsk the new 2D land-sea mask 
    2017; 
     
    2825;      June 2006 
    2926; 
    30 ; @version  
     27; @version 
    3128; $Id$ 
    3229; 
    33 ;------------------------------------------------------------ 
    34 ;------------------------------------------------------------ 
    35 ;------------------------------------------------------------ 
     30;- 
     31; 
    3632function changemsk,tab, CELLSIZE = cellsize 
    3733; 
  • trunk/SRC/Grid/checkperio.pro

    r226 r231  
    4242; $Id$ 
    4343;- 
     44; 
    4445PRO checkperio, file, WRITE = write 
    4546 
  • trunk/SRC/Grid/computegrid.pro

    r226 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
    63; @file_comments 
    7 ; 
    84; compute the grid parameters (cm_4mesh) common 
    95; 
     
    117113; @keyword STRCALLING {type=string} 
    118114;       a string containing the calling command used to 
    119 ;       call computegrid (this is used by xxx.pro) 
     115;       call computegrid (this is used by <pro>xxx</pro>) 
    120116; 
    121117; @keyword STRIDE {default=[1, 1, 1]}{type=3 elements vector} 
     
    240236; 
    241237;- 
    242 ;------------------------------------------------------------ 
    243 ;------------------------------------------------------------ 
    244 ;------------------------------------------------------------ 
     238; 
    245239PRO computegrid, startx, starty, stepxin, stepyin, nxin, nyin $ 
    246240                 , XAXIS = xaxis, YAXIS = yaxis, ZAXIS = zaxis $ 
     
    254248                 , UBASE2TBASE = ubase2tbase, VBASE2TBASE = vbase2tbase, FBASE2TBASE = fbase2tbase $ 
    255249                 , STRCALLING = strcalling, ROMSH = romsh, _extra = ex 
    256 ;--------------------------------------------------------- 
    257250; 
    258251  compile_opt idl2, strictarrsubs 
  • trunk/SRC/Grid/micromeshmask.pro

    r157 r231  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; Reduce the size of the NetCDF meshmask created by OPA by 
    55; using bit (and not byte) format for the masks and the float format 
    66; for the other fields. 
    77; 
    8 ; @categories  
     8; @categories 
    99; For OPA 
    1010; 
     
    1717;      July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1818; 
    19 ; @version  
     19; @version 
    2020; $Id$ 
    2121; 
    2222;- 
    23 ;------------------------------------------------------ 
    24 ;------------------------------------------------------ 
     23; 
    2524PRO ncdf_transfer, inid, outid, inname, outname 
    2625; 
  • trunk/SRC/Grid/n128gaussian.pro

    r157 r231  
    11;+ 
    2 ; @file_comments compute the latitudes of the n128 gaussian grid. See: 
    3 ; http://www.ecmwf.int/products/data/technical/gaussian/n128FIS.html 
     2; 
     3; @file_comments 
     4; compute the latitudes of the n128 gaussian grid. See: 
     5; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n128FIS.html">Gaussian 128</a> 
    46; 
    57; @categories 
    68; Grid 
    79; 
    8 ; @examples  
     10; @examples 
    911; IDL> lat=n128gaussian() 
    1012; 
     
    1517;      June 2004 
    1618; 
    17 ; @version $Id$ 
     19; @version 
     20; $Id$ 
    1821; 
    1922;- 
  • trunk/SRC/Grid/n160gaussian.pro

    r157 r231  
    11;+ 
    22; 
    3 ; @file_comments compute the latitudes of the n160 gaussian grid. See: 
    4 ; http://www.ecmwf.int/products/data/technical/gaussian/n160FIS.html 
     3; @file_comments 
     4; compute the latitudes of the n160 gaussian grid. See: 
     5; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n160FIS.html">Gaussian 160</a> 
    56; 
    6 ; @categories  
     7; @categories 
    78; Grid 
    89; 
    9 ; @examples  
     10; @examples 
    1011; IDL>lat=n160gaussian() 
    1112; 
     
    1617;      June 2004 
    1718; 
    18 ; @version $Id$ 
     19; @version 
     20; $Id$ 
    1921; 
    2022;- 
  • trunk/SRC/Grid/n256gaussian.pro

    r157 r231  
    11;+ 
    22; 
    3 ; @file_comments compute the latitudes of the n256 gaussian grid. See: 
    4 ; http://www.ecmwf.int/products/data/technical/gaussian/n256FIS.html 
    5 ; 
    6 ; @categories  
     3; @file_comments 
     4; compute the latitudes of the n256 gaussian grid. See: 
     5; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n256FIS.html">Gaussian 256</a> 
     6; 
     7; @categories 
    78; Grid 
    89; 
     
    1617;      June 2004 
    1718; 
    18 ; @version $Id$ 
     19; @version 
     20; $Id$ 
    1921; 
    2022;- 
  • trunk/SRC/Grid/n48gaussian.pro

    r157 r231  
    11;+ 
    22; 
    3 ; @file_comments compute the latitudes of the n48 gaussian grid. See: 
    4 ; http://www.ecmwf.int/products/data/technical/gaussian/n48FIS.html 
     3; @file_comments 
     4; compute the latitudes of the n48 gaussian grid. See: 
     5; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n48FIS.html">Gaussian 48</a> 
    56; 
    6 ; @categories  
     7; @categories 
    78; Grid 
    89; 
     
    1617;      June 2004 
    1718; 
    18 ; @version $Id$ 
     19; @version 
     20; $Id$ 
    1921; 
    2022;- 
  • trunk/SRC/Grid/n80gaussian.pro

    r157 r231  
    22; 
    33; @file_comments compute the latitudes of the n80 gaussian grid. See: 
    4 ; http://www.ecmwf.int/products/data/technical/gaussian/n80FIS.html 
     4; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n80FIS.html">Gaussian 80</a> 
    55; 
    6 ; @categories  
     6; @categories 
    77; Grid 
    88; 
     
    1616;      June 2004 
    1717; 
    18 ; @version $Id$ 
     18; @version 
     19; $Id$ 
    1920; 
    2021;- 
  • trunk/SRC/Grid/ncdf_meshread.pro

    r226 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
    6 ; @file_comments read NetCDF meshmask file created by OPA 
     3; @file_comments 
     4; read NetCDF meshmask file created by OPA 
    75; 
    86; @categories 
     
    2422;    defined according to GLAMBOUNDARY. 
    2523; 
    26 ; @keyword CHECKDAT Suppressed. Use micromeshmask.pro to create an 
     24; @keyword CHECKDAT 
     25; Suppressed. Use <pro>micromeshmask</pro> to create an 
    2726;    appropriate meshmask. 
    2827; 
     
    5150; 
    5251; @keyword STRCALLING {type=scalar string} 
    53 ;    the calling command used to call computegrid (this is used by xxx.pro) 
     52;    the calling command used to call computegrid (this is used by <pro>xxx<pro>) 
    5453; 
    5554; @keyword STRIDE {default=[1, 1, 1]}{type=3 elements vector} 
     
    5756;    value will be stored in the common (cm_4mesh) variable key_stride 
    5857; 
    59 ; @keyword _EXTRA used to pass isafile keywords 
    60 ; 
    61 ; @uses cm_4mesh cm_4data cm_4cal 
     58; @keyword _EXTRA 
     59; Used to pass keywords to <pro>isafile</pro> 
     60; 
     61; @uses 
     62; cm_4mesh 
     63; cm_4data 
     64; cm_4cal 
    6265; 
    6366; @restrictions 
    64 ; 
    65 ;  ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 
    66 ;  be defined before calling ncdf_meshread. if some of those value 
    67 ;  are equal to -1 they will be automatically defined 
     67; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 
     68; be defined before calling ncdf_meshread. if some of those value 
     69; are equal to -1 they will be automatically defined 
    6870; 
    6971; @history 
     
    8082; 
    8183;- 
    82 ;------------------------------------------------------------ 
    83 ;------------------------------------------------------------ 
    84 ;------------------------------------------------------------ 
     84; 
    8585PRO ncdf_meshread, filename, GLAMBOUNDARY = glamboundary, CHECKDAT = checkdat $ 
    8686                  , ONEARTH = onearth, GETDIMENSIONS = getdimensions $ 
    8787                  , PERIODIC = periodic, SHIFT = shift, STRIDE = stride $ 
    8888                  , STRCALLING = strcalling, _EXTRA = ex 
    89 ; 
    90 ;--------------------------------------------------------- 
    9189; 
    9290  compile_opt idl2, strictarrsubs 
  • trunk/SRC/Grid/ncdf_meshroms.pro

    r226 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
    6 ; @file_comments read NetCDF grid file created by ROMS 
     3; @file_comments 
     4; read NetCDF grid file created by ROMS 
    75; 
    86; @categories 
     
    5856;    value will be stored in the common (cm_4mesh) variable key_stride 
    5957; 
    60 ; @keyword _EXTRA used to pass isafile keywords 
    61 ; 
    62 ; @uses cm_4mesh cm_4data cm_4cal 
     58; @keyword _EXTRA 
     59; Used to pass keywords to <pro>isafile</pro> 
     60; 
     61; @uses 
     62; cm_4mesh 
     63; cm_4data 
     64; cm_4cal 
    6365; 
    6466; @restrictions 
    65 ; 
    66 ;  ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 
    67 ;  be defined before calling ncdf_meshread. if some of those value 
    68 ;  are equal to -1 they will be automatically defined 
    69 ; 
    70 ;  In the original ROMS grid, if F grid has (jpi,jpj) points then T 
    71 ;  grid will have (jpi+1,jpj+1) points, U grid will have (jpi,jpj+1) 
    72 ;  points and V grid will have (jpi+1,jpj) points. 
    73 ;  By default C-grid used in this package needs the same number of 
    74 ;  points for T,U,V and F grid, with a T point at the bottom left 
    75 ;  corner of the grid. We therefore ignore the last column of T and 
    76 ;  V points and the last line of T and U points. 
    77 ; 
    78 ;  Scale factors are compuited using the distance between the points 
    79 ;  (which is not the exact definition for irregular grid). 
     67; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 
     68; be defined before calling ncdf_meshread. if some of those value 
     69; are equal to -1 they will be automatically defined 
     70; 
     71; In the original ROMS grid, if F grid has (jpi,jpj) points then T 
     72; grid will have (jpi+1,jpj+1) points, U grid will have (jpi,jpj+1) 
     73; points and V grid will have (jpi+1,jpj) points. 
     74; By default C-grid used in this package needs the same number of 
     75; points for T,U,V and F grid, with a T point at the bottom left 
     76; corner of the grid. We therefore ignore the last column of T and 
     77; V points and the last line of T and U points. 
     78; 
     79; Scale factors are compuited using the distance between the points 
     80; (which is not the exact definition for irregular grid). 
    8081; 
    8182; @history 
     
    8687; 
    8788;- 
    88 ;------------------------------------------------------------ 
    89 ;------------------------------------------------------------ 
    90 ;------------------------------------------------------------ 
     89; 
    9190PRO ncdf_meshroms, filename, NRHO = nrho, GLAMBOUNDARY = glamboundary $ 
    9291                  , ONEARTH = onearth, GETDIMENSIONS = getdimensions $ 
    9392                  , PERIODIC = periodic, SHIFT = shift, STRIDE = stride $ 
    9493                  , STRCALLING = strcalling, _EXTRA = ex 
    95 ; 
    96 ;--------------------------------------------------------- 
    9794; 
    9895  compile_opt idl2, strictarrsubs 
  • trunk/SRC/Grid/numbisland.pro

    r197 r231  
    2222; 
    2323;- 
     24; 
    2425PRO mskneig, msk, nx, ny, indin, numb 
    2526; flag the point 
    2627  msk[indin] = numb 
    2728; find its neighbourgs 
    28   indx = (indin MOD nx) + [-1L, 0L, 1L]  
     29  indx = (indin MOD nx) + [-1L, 0L, 1L] 
    2930  indx = (temporary(indx) + nx) MOD nx ; x periodicity 
    30   indy = (indin/nx) + [-1L, 0L, 1L]  
     31  indy = (indin/nx) + [-1L, 0L, 1L] 
    3132  indy = 0 > temporary(indy) < (ny-1L) ; y periodicity 
    3233; build 1d index 
    3334  ind = temporary(indx)#replicate(1L, 3) + replicate(nx, 3)#temporary(indy) 
    3435; for each neighbourgs on the same island, call again mskneig 
    35   FOR i = 0, n_elements(ind)-1 DO BEGIN   
     36  FOR i = 0, n_elements(ind)-1 DO BEGIN 
    3637    IF msk[ind[i]] EQ 0 THEN mskneig, msk, nx, ny, ind[i], numb 
    37   ENDFOR  
     38  ENDFOR 
    3839 
    3940  return 
     
    8283    IF (islnumb-9) MOD 10 EQ 0 THEN print,  'island number :'+strtrim(islnumb-9, 1) 
    8384 
    84     mskneig, msk, nx, ny, land, islnumb  
    85      
     85    mskneig, msk, nx, ny, land, islnumb 
     86 
    8687    land = (where(msk EQ 0, count))[0] 
    8788    islnumb = islnumb + 1 
     
    9192  msk[where(msk EQ -8)] = 0 
    9293 
    93   print, 'time:', systime(1)-time1  
     94  print, 'time:', systime(1)-time1 
    9495 
    9596  RETURN, msk 
  • trunk/SRC/Grid/restoreboxparam.pro

    r226 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
    6 ; @file_comments restore all the zoom parameters (defined by calling domdef) 
    7 ; previously defined by saveboxparam 
     3; @file_comments 
     4; restore all the zoom parameters (defined by calling <pro>domdef</pro>) 
     5; previously defined by <pro>saveboxparam</pro> 
    86; 
    97; @param filename {in}{required} 
    108; a scalar string defining the file name 
    119; 
    12 ; @uses cm_4mesh (and cm_demomode_used if we are in demo mode) 
     10; @uses 
     11; cm_4mesh (and cm_demomode_used if we are in demo mode) 
    1312; 
    14 ; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined: 
     13; @restrictions 
     14; call def_myuniquetmpdir, if myuniquetmpdir is undefined: 
    1515;               => define, create and add it to !path 
    1616; 
     
    1818; IDL> restoreboxparam, filename 
    1919; 
    20 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     20; @history 
     21; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2122;                      July 2005 
    2223; 
    23 ; @version $Id$ 
     24; @version 
     25; $Id$ 
    2426; 
    2527;- 
    26 ;------------------------------------------------------------ 
    27 ;------------------------------------------------------------ 
    28 ;------------------------------------------------------------ 
     28; 
    2929PRO restoreboxparam, filename 
    3030; 
     
    8888  return 
    8989end 
    90  
  • trunk/SRC/Grid/romsdepth.pro

    r226 r231  
    11;+ 
     2; 
    23; @file_comments 
    34; compute depth of ROMS outputs according to ROMS parameters 
     
    2223; $Id$ 
    2324;- 
     25; 
    2426FUNCTION romsdepth 
    2527; 
  • trunk/SRC/Grid/saveboxparam.pro

    r155 r231  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    52; 
    6 ; @file_comments save all the zoom parameters (defined by calling domdef) 
     3; @file_comments 
     4; save all the zoom parameters (defined by calling <pro>domdef</pro>) 
    75; in a file (using save command) located in myuniquetmpdir 
    86; (common variable defined by def_myuniquetmpdir) 
    9 ;  
    10 ; @param filename {in}{required} a scalar string defining the file name  
    117; 
    12 ; @uses cm_4mesh (and cm_demomode_used if we are in demo mode) 
     8; @param filename {in}{required} 
     9; a scalar string defining the file name 
    1310; 
    14 ; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined:  
     11; @uses 
     12; cm_4mesh (and cm_demomode_used if we are in demo mode) 
     13; 
     14; @restrictions 
     15; call def_myuniquetmpdir, if myuniquetmpdir is undefined: 
    1516;               => define, create and add it to !path 
    1617; 
     
    1819; IDL> saveboxparam, filename 
    1920; 
    20 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     21; @history 
     22; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2123;                      June 2005 
    2224; 
    23 ; @version $Id$ 
     25; @version 
     26; $Id$ 
    2427; 
    2528;- 
    26 ;------------------------------------------------------------ 
    27 ;------------------------------------------------------------ 
    28 ;------------------------------------------------------------ 
     29; 
    2930PRO saveboxparam, filename 
    3031; 
  • trunk/SRC/Grid/smallmeshmask.pro

    r157 r231  
    11;+ 
    22; 
    3 ; 
    4 ; @categories  
     3; @categories 
    54; For OPA 
    65; 
     
    1312;      July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    1413; 
    15 ; @version  
     14; @version 
    1615; $Id$ 
    1716; 
    1817;- 
    19 ;------------------------------------------------------ 
    20 ;------------------------------------------------------ 
     18; 
    2119PRO ncdf_transfer, inid, outid, inname, outname 
    2220; 
     
    3028; 
    3129;+ 
    32 ; @file_comments  
     30; @file_comments 
    3331; Reduce the size of the NetCDF meshmask created by OPA by 
    3432; using byte format for the masks and the float format for the other 
     
    4543; xxx.mask.nc. In that case, the meshmask is split into 3 files. 
    4644; 
    47 ; @param ncfileout {in}{optional}{default=smallmeshmask.nc}  
    48 ; the name of the reduced meshmask file.  
     45; @param ncfileout {in}{optional}{default=smallmeshmask.nc} 
     46; the name of the reduced meshmask file. 
    4947; 
    5048; @examples 
     
    5250; IDL> smallmeshmask, 'meshmask_ORCA_R05.nc',iodir=meshdir 
    5351; 
    54 ; @categories  
     52; @categories 
    5553; For OPA 
    5654; 
     
    5856;      July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    5957; 
    60 ; @version  
     58; @version 
    6159; $Id$ 
    6260; 
     
    8684; get the horizontal dimensions 
    8785  IF n_elements(filein_hgr) NE 0  THEN cdfid = ncdf_open(filein_hgr) $ 
    88   ELSE cdfid = ncdf_open(filein)  
     86  ELSE cdfid = ncdf_open(filein) 
    8987  ncdf_diminq, cdfid, 'x', name, jpi 
    9088  ncdf_diminq, cdfid, 'y', name, jpj 
     
    9593  ENDIF 
    9694  listdims = strlowcase(ncdf_listdims(cdfid)) 
    97   IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN  
     95  IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN 
    9896    dimid = (where(strmid(listdims, 0, 5) EQ 'depth'))[0] 
    99     IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN  
     97    IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN 
    10098      dummy = report('We could not find the vertical dimension..., its name must be z or start with depth') 
    10199      return 
    102     ENDELSE  
    103   ENDELSE  
     100    ENDELSE 
     101  ENDELSE 
    104102; get the variables list related to the partial steps 
    105103  varlist_ps = ncdf_listvars(cdfid) 
     
    112110;------------------------------------------------------ 
    113111  IF n_elements(ncfileout) EQ 0  THEN ncfileout = 'smallmeshmask.nc' 
    114    
     112 
    115113  cdfidout = ncdf_create(isafile(FILE = ncfileout, IODIR = iodir, /NEW), /clobber) 
    116114  ncdf_control, cdfidout, /nofill 
     
    184182  FOR z = 0, n_elements(zgrlist)-1 DO $ 
    185183    ncdf_transfer, cdfid, cdfidout, zgrlist[z] 
    186 ; partial step variables  
     184; partial step variables 
    187185  IF (where(varlist_ps EQ 'hdept'))[0] NE -1 THEN $ 
    188186    ncdf_transfer, cdfid, cdfidout, 'hdept' 
Note: See TracChangeset for help on using the changeset viewer.