Appendix D
BOUSS-2D File Formats
BOUSS-2D currently supports two file formats. The grid format (.grd) is used
to define the spatial variation of scalar or vector quantities over a rectangular grid.
The time series format (.ts1) is used for one-dimensional time-histories of scalar
quantities. The files consist of a header section and a data section. The header
section includes both mandatory parameters required to define the data structure
and optional parameters that provide additional information on the data. Comment
lines in the header section begin with the pound (#) sign, and lines with parameter
names and values begin with the colon (:) sign.
Grid File Format (.grd)
The grid file format is used to store multiple 2-D arrays h1(x,y), h2(x,y), etc.
The variables are defined over a rectangular grid with the origin located at (xorigin,
yorigin) and uniform grid spacings ∆x and ∆y in the x and y directions respectively.
The number of grid points are Nx and Ny in the x and y directions respectively.
The 2-D array h(i,j) represents the value of h(x,y) at x = xorigin + (i-1)∆x and y =
yorigin + (j-1)∆y. The mandatory header parameters are:
NGrid_X = number of grid points in the x direction (Nx)
NGrid_Y = number of grid points in the y direction (Ny)
Delta_X = grid spacing in the x direction (∆x)
Delta_Y = grid spacing in the y direction (∆y)
X_Origin = x-coordinate of grid origin
Y_Origin = y-coordinate of grid origin
N_Arrays = number of data arrays (1 for scalar quantities, 2 for vector
quantities)
The header section must terminate with the EndHeader keyword. Two-
dimensional data are then written out after the header section as continuous data
streams in row first order, i.e., ((h(i,j), i = 1, Nx), j = 1, Ny) for scalar quantities or
((u(i,j), i = 1, Nx), j = 1, Ny) and ((v(i,j), i = 1, Nx), j = 1, Ny) for vector quantities.
A sample grid file is provided as follows:
D1
Appendix D BOUSS-2D File Formats