Changeset 118 for trunk/SRC/Grid/micromeshmask.pro
- Timestamp:
- 06/27/06 17:47:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Grid/micromeshmask.pro
- Property svn:keywords set to Id
r114 r118 2 2 ; 3 3 ; @file_comments reduce the size of the NetCDF meshmask created by OPA by 4 ; using bit (and not byte) format for the masks and the f oat format5 ; for the other fields. 4 ; using bit (and not byte) format for the masks and the float format 5 ; for the other fields. 6 6 ; 7 7 ; @categories for OPA meshmask files 8 8 ; 9 ; @examples 10 ; IDL> reducencmeshmask, ncfilein[, ncfileout] 11 ; 12 ; @examples 13 ; IDL> meshdir='/d1fes2-raid2/smasson/DATA/ORCA05/' 14 ; IDL> micromeshmask, 'meshmask_ORCA_R05.nc',iodir=meshdir 9 ; @param inid {in}{required} 10 ; @param outid {in}{required} 11 ; @param inname {in}{required} 12 ; @param outname {in}{optional} 15 13 ; 16 14 ; @history 17 15 ; July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 16 ; 17 ; @version $Id$ 18 ; 18 19 ;- 19 20 ;------------------------------------------------------ … … 30 31 ; 31 32 ;+ 32 ; @keyword IODIR to define the files path.33 ; 33 34 ; @param ncfilein {in}{required} 34 35 ; 1) the name of the meshmask file to be reduced. In that case, … … 40 41 ; xxx.mask.nc. In that case, the meshmask is split into 3 files. 41 42 ; 42 ; @param ncfileout {in}{required} the name of the uniq reduced meshmask file. default 43 ; definition is micromeshmask.nc 43 ; @param ncfileout {in}{optional} the name of the uniq reduced meshmask file. 44 ; default definition is micromeshmask.nc 45 ; 46 ; @keyword IODIR to define the files path. 47 ; 48 ; @examples 49 ; IDL> meshdir='/d1fes2-raid2/smasson/DATA/ORCA05/' 50 ; IDL> micromeshmask, 'meshmask_ORCA_R05.nc',iodir=meshdir 44 51 ; 45 52 ;- 46 53 PRO micromeshmask, ncfilein, ncfileout, IODIR = iodir 47 ;48 54 ; 49 55 compile_opt idl2, strictarrsubs … … 68 74 ; get the horizontal dimensions 69 75 IF n_elements(filein_hgr) NE 0 THEN cdfid = ncdf_open(filein_hgr) $ 70 ELSE cdfid = ncdf_open(filein) 76 ELSE cdfid = ncdf_open(filein) 71 77 ncdf_diminq, cdfid, 'x', name, jpi 72 78 ncdf_diminq, cdfid, 'y', name, jpj … … 81 87 ENDIF 82 88 listdims = strlowcase(ncdf_listdims(cdfid)) 83 IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN 89 IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN 84 90 dimid = (where(strmid(listdims, 0, 5) EQ 'depth'))[0] 85 IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN 91 IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN 86 92 dummy = report('We could not find the vertical dimension..., its name must be z or start with depth') 87 93 return 88 ENDELSE 89 ENDELSE 94 ENDELSE 95 ENDELSE 90 96 ;; get the variables list related to the partial steps 91 97 varlist_ps = ncdf_listvars(cdfid) … … 174 180 FOR z = 0, n_elements(zgrlist)-1 DO $ 175 181 ncdf_transfer, cdfid, cdfidout, zgrlist[z] 176 ; partial step variables 182 ; partial step variables 177 183 IF (where(varlist_ps EQ 'hdept'))[0] NE -1 THEN $ 178 184 ncdf_transfer, cdfid, cdfidout, 'hdept'
Note: See TracChangeset
for help on using the changeset viewer.