User Guide 022: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
Line 68: Line 68:
|Depth
|Depth
|Still water depth in m. Positive values indicate wet cells and dry cells indicate dry cells.
|Still water depth in m. Positive values indicate wet cells and dry cells indicate dry cells.
|-
|15
|Level of resolution
|Largest grid spacing is 0 with smaller levels incrementing by 1.
|}
|}


=Notes:=
=Notes:=

Revision as of 14:44, 19 April 2021

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.
15 Level of resolution Largest grid spacing is 0 with smaller levels incrementing by 1.

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 provided below (spacing adjusted for clarity in this wiki).

CMS-Telescoping
354.900000  209610.000000  57870.000000  272706
1    80.000    80.000    160.000    160.000    202    0      2      0      0      0      0      0    -999.000    0
2   240.000    80.000    160.000    160.000    203    0      3      0      0      0      1      0    -999.000    0
3   400.000    80.000    160.000    160.000    204    0      4      0      0      0      2      0    -999.000    0
4   560.000    80.000    160.000    160.000    205    0      5      0      0      0      3      0    -999.000    0

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.

1 iprp integer 0 - waves and wind input in *.eng

1 - waves only, neglect wind input in *.eng -1 - fast mode 2 - forced grid internal rotation 3 - without lateral energy flux

Wave propagation mode.
2 icur integer 0 - no current input

1 - with current input *.cur 2 -with *.cur, use only the 1st set current data

Current interaction.
3 ibk integer 0 - no wave breaking output

1 - output breaking indices 2 - output energy dissipation rate

Wave breaking output option.
4 irs integer 0 - no wave radiation stress calculation or output

1 - calculate and output radiation stresses 2 - calculate and output radiation stresses plus setup/max-water-level

Radiation stress and runup options.
5 kout integer >= 0 Number of special wave output location, output spectrum in *.obs and parameters in selhts.out.
6 ibnd integer 0 - no input a parent spectrum *.nst

1 - read *.nst, averaging input spectrum 2 - read *.nst, spatially variable spectrum input

Nesting option.
7 iwet integer 0 - allow wet/dry, default

1 - without wet/dry -1 allow wet/dry, output swell and local sea files -2 - output combined steering wav files -3 - output swell, local sea, and combined wav files

Wetting and drying options.
8 ibf integer 0 - no bottom friction calc

1 - constant Darcy-Weisbach coef, c_f 2 -read variable c_f file, *.fric 3 - constant Mannings n 4 - read variable Mannings n file, *.fric

Bottom friction option.
9 iark integer 0 - without forward reflection

1 - with forward reflection

Forward reflection option.
10 iarkr integer 0 - without backward reflection, 1 - with backward reflection Backward reflection option.
11 akap real 0.0<=akap<=4.0 Diffraction intensity coefficient.
12 bf real >=0 constant bottom friction coef cf or n (typical value is 0.005 for cf and 0.025 for Mannings n).
13 ark real 0.0<=ark<=1.0 Constant forward reflection coef, global specification (0 for zero reflection, 1 for full reflection).
14 arkr real 0.0<=arkr<=1.0 Constant backward reflection coef, global specification (0 for zero reflection, 1 for full reflection).
15 iwvbk integer 0 - Goda-extended

1 - Miche-extended 2 - Battjes and Janssen 3 - Chawla and Kirby)

Option for the primary wave breaking formula.
16 nonln integer 0 - none, default

1 - nonlinear wave-wave interaction

Nonlinear wave-wave interaction.
17 igrav integer 0 - none, default

1 - infra-gravity wave enter inlets

Infragravity waves option.
18 irunup integer 0 - none, default

1 - automatic, runup relative to absolute datum 2 - automatic, runup relative to updated MWL

Runup option.
19 imud integer 0 - none default

1 - Mud dissipation on

Mud dissipation option. The kinematic viscosity is specified in mud.dat in units of m2/sec.
20 iwnd integer 0 - none, default

1 - Spatially variable wind on

Spatially variable wind field option. The winds are specified in wind.dat in units of m/s and in the reference frame of the CMS-Wave grid.
21 isolv integer 0 - GSR solver, default

1 - ADI

Matrix solver for CMS-Wave.
22 ixmdf integer 0 - output ascii, default

1 - output xmdf 2 - input & output xmdf

XMDF input and output options.
23 iproc integer >=0 Number of threads for parallel computing. Optimum number is approximately equal to the total row number divided by 300. Only for isolv = 0.
24 iview integer 0 - half-plane, default

1 - full-plane

Half-plane/full-plane option. Users can provide additional input wave spectrum file wave.spc (same format as the *.eng) along the opposite side boundary an imaginary origin for wave.spc at the opposite corner; users can rotate the CMS-Wave grid by 180 deg in SMS to generate this wave.spc.