Personal tools

Difference between revisions of "Boxes"

From MohidWiki

Jump to: navigation, search
(Troubleshooting)
Line 67: Line 67:
 
==Troubleshooting==
 
==Troubleshooting==
 
'''Q: The 2D boxes fluxes return an output fine; but 3D boxes fluxes don't return any output. What's wrong?'''
 
'''Q: The 2D boxes fluxes return an output fine; but 3D boxes fluxes don't return any output. What's wrong?'''
 +
 
A: Check that in the <<begin/end|verticallayer>> tags the first column is the LOWER layer and the second column is the HIGHEST layer.
 
A: Check that in the <<begin/end|verticallayer>> tags the first column is the LOWER layer and the second column is the HIGHEST layer.
  

Revision as of 16:58, 7 April 2011

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

by default this file is written on the exe folder.

This sets the time-step to compute only every 300 seconds (default is 300s).

DT_BOXES                       : 300

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
DT_BOXES                      : 300

<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. ALWAYS IN THIS ORDER: FROM LOWER LAYER TO HIGHER LAYER.

DT_OUTPUT_TIME                : 3600
WRITE_BOXES                   : 0
DT_BOXES                      : 300

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

Troubleshooting

Q: The 2D boxes fluxes return an output fine; but 3D boxes fluxes don't return any output. What's wrong?

A: Check that in the <<begin/end|verticallayer>> tags the first column is the LOWER layer and the second column is the HIGHEST layer.

See also