Since ROMS usually produces a whole directory of NetCDF files, rslice can treat more than one file in a directory as if it were a single file, somewhat like the way the OPeNDAP aggregation server can make several data files appear as if they were one. There are a few limits, though. In addition to a directory pathname, one must also give a regular expression to narrow down the set of files to be examined. For example, suppose a directory listing of a ROMS run looks as follows.

[jevans@evans-blake tmp]$ pwd
[jevans@evans-blake tmp]$ ls
.  MooringFheatterms.tif  nszeta.tif  cblast_017.out    

Rslice can only look at one kind of ROMS file at any given time, so we have to pare down the two available types from avg, and his. to just one. The way to do that is with a regular expression.

Example 4.5. Using Directories for a Startup Argument: Simple Regular Expression

To operate on just the avg files, one could invoke rslice as

>> rslice ( 'directory', '/p/wilkin/roms/cblast/out/2002-017/', 'regexp', 'avg' );

Example 4.6. Using Directories for a Startup Argument: Complex Regular Expression

To get just the avg files numbered 0040 to 0049, one could use

>> rslice ( 'directory', '/p/wilkin/roms/cblast/out/2002-017/', 'regex', 'avg.*004[0-9]\.nc' );

To get additional information on how MATLAB handles regular expressions, please type

>> help regexp

from your MATLAB prompt. Please, please do this, as there are a few differences in the way that MATLAB does regular expressions from the way that the bash shell does them.