User Guide 022
11 Appendix A: Description of Input Files
CMS-Flow
Telescoping Grid File (*.tel)
The telescoping Grid File is saved in SMS 11.0 when saving a telescoping grid. The first line contains a header which says “CMS-Telescoping”. The second line contains four elements corresponding to the (1) grid orientation theta, (2) grid origin in the x-direction x0, (3) grid origin in the y-direction y0, and (4) total number of cells N (including inactive cells). Lines 3 through N+3 contain the following column data:
Table A1. Description of column data in the CMS-Flow Telescoping Grid File.
Column | Symbol | Variable |
---|---|---|
1 | i | Sequential index |
2 | x | Cell-centered x-coordinate of cell i in m |
3 | y | Cell-centered y-coordinate of cell i in m |
4 | ∆x | Grid size in x-direction of cell i in m |
5 | ∆y | Grid size in y-direction of cell i in m |
6 | iN1 | Index of first neighboring cell to the North direction |
7 | iN2 | Index of second neighboring cell to the North direction |
8 | iE1 | Index of first neighboring cell to the East direction |
9 | iE2 | Index of second neighboring cell to the East direction |
10 | iS1 | Index of first neighboring cell to the South direction |
11 | iS2 | Index of second neighboring cell to the South direction |
12 | iW1 | Index of first neighboring cell to the West direction |
13 | iW2 | Index of second neighboring cell to the West direction |
14 | Depth | Still water depth in m. Positive values indicate wet cells and dry cells indicate dry cells. |
Notes:
- • Directions of neighboring cells are relative to the local grid axis (i.e. positive in x = East, negative in x = West, positive in y = North, and negative in y = South).
- • Indexes equal to 0 indicate the absence of a neighboring cell.
- • If a cell is assigned as an inactive cell, -999
- • Because the file is ASCII, the file size can be relatively large and difficult to view in WordPad or Notepad. To view the telescoping grid file, it is recommended to use a more advanced text editor such as UltraEdit or Textpad.
An example of the first 6 lines of a CMS-Flow telescoping grid file is pro-vided below. _
example
A simple Matlab script is provided below to read the *.tel file.
function out = read_cmstel(telfile) % out = read_cmstel(telfile) % Reads a CMS telescoping grid file % and output all variables to a structure array % written by Alex Sanchez, USACE fid = fopen(telfile,'r'); fgets(fid); %Skip header line data=fscanf(fid,'%f %f %f %d',4); out.ncells = data(4); out.x0 = data(2); out.y0 = data(3); out.angle = data(1); data=fscanf(fid,'%d %f %f %f %f %d %d %d %d %d %d %d %d %f',...
[14,out.ncells])';
fclose(fid); out.id = data(:,1); out.x = data(:,2); out.y = data(:,3); out.dx = data(:,4); out.dy = data(:,5); out.iloc = data(:,6:13); out.depth = data(:,14); return
Card (Control) File
Control files are used for specifying input parameters, options, and boundary conditions, initial conditions and forcing. In CMS-Flow the Control File is the *.cmcards (card) file. The ASCII file uses a simple card format to specify model input in free format. Data Input Files depend on the specific model setup, and may include but are not limited to spatially variable.
Grid File (*_grid.h5)
The SMS interface can save a scatter set in a binary format called the eXtensible Model Data Format (XMDF). The XMDF format (Butler et al. 2007) stores data in a much smaller file and decreases the time to load large data files, such as SHOALS or LIDAR surveys. Operation in XMDF format rather than ASCII for-mat greatly reduces time of input and output operations.
Model Parameters File (*_mp.h5)
TBC
SMS XY Series File (*.xys)
TBC
SMS Time Series Data File (*.tsd)
TBC
Note:
- • It is recommended to use ANSI file encoding for all ASCII files. CMS has problems reading Unicode or other encodings.
CMS-Wave
CMS-Wave Spectral File (*.eng)
TBC
CMS-Wave Model Parameters File (*.std)
Users can use SMS11 or higher versions, or simply edit the existing model control file *.std, to specify/select these advanced features.
The *.std has a maximum of 24 parameters - the first 15 parameters are more the basic ones as described in the CMS-Wave Technical Report (CHL-TR-08-13) while the remaining 9 parameters are relatively new for advanced CMS-Wave features.