Personal tools

Boxes

From MohidWiki

Revision as of 14:55, 24 July 2008 by 192.168.20.177 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

A box file is used to define an area, which can be 2D or 3D. These areas can be used to initialize properties fields or integrate values in time and space inside and between boxes, allowing computing global and zonal budgets for almost every modeled variables. Module BoxDif is the module responsible for handling and interpreting the boxes files.


Boxes file

Boxes files can be automatically generated by MOHID GIS based on a bathymetry file and on a polygon file.

A box file requires the definition polygons. These polygons are defined by vertices indicated by the grid cell [i,j] indexes. Thus, a box file is always specific of a certain grid file. Please note that in polygon files, used in MOHID GIS, the polygon vertices are defined by real coordinates [x,y].

In a box file, several boxes can be defined. An ID number is given to each box, based on the order in which the box file is read. Box 1 is the first block in the file, Box 2 the second and so on. By default a Box 0 (zero) is always created, corresponding to the box containing all the grid points that were not included inside the boxes. This way if box integration is requested and no boxes are defined, the output will be the integration of the entire domain.

When used to integrate values, the correspondent outputs are written in Time Series format. Thus, in the box file needs information on the time step to write results, which is given by keyword:

DT_OUTPUT_TIME                :  3600

As a safety feature, a Grid Data file can be written in the beginning of a simulation, where in to each grid cell, the index of the corresponding box is written. This can be done by defining keyword:

WRITE_BOXES                   : 1

and then the name of the output file to be written:

OUTPUT_FILE                   : ..\GeneralData\Boxes\BoxesFileInGridDataFormat.dat

Sample

This example shows the definition of a box with 4 vertices. By default Module BoxDif automatically introduces an extra vertice at the end of the list which is equal to the first vertex, thus insuring the polygon is closed.

2D box file

DT_OUTPUT_TIME                :  3600
WRITE_BOXES                   : 0

<beginpolygon> 
 <<beginvertix>>
 44 39
 33 77
 71 88
 82 49
 <<endvertix>>
<endpolygon>

3D box file

This example shows the definition of two boxes, defined by the same polygon, but which integrate in the vertical direction, from layer 1 to 5, and from layer 6 to 10.

DT_OUTPUT_TIME                :  3600
WRITE_BOXES                   : 0

<beginpolygon>
 <<beginvertix>>
  44 39
  33 77
  71 88
  82 49
 <<endvertix>>
 <<beginverticallayer>>
  1  5
  6  10
 <<endverticallayer>>
<endpolygon>

See also