Escolar Documentos
Profissional Documentos
Cultura Documentos
ECO Lab
User Guide
Limited Liability
The liability of DHI is limited as specified in Section III of your 'DHI
Software Licence Agreement':
'IN NO EVENT SHALL DHI OR ITS REPRESENTATIVES (AGENTS
AND SUPPLIERS) BE LIABLE FOR ANY DAMAGES WHATSO-
EVER INCLUDING, WITHOUT LIMITATION, SPECIAL, INDIRECT,
INCIDENTAL OR CONSEQUENTIAL DAMAGES OR DAMAGES
FOR LOSS OF BUSINESS PROFITS OR SAVINGS, BUSINESS
INTERRUPTION, LOSS OF BUSINESS INFORMATION OR OTHER
PECUNIARY LOSS ARISING OUT OF THE USE OF OR THE INA-
BILITY TO USE THIS DHI SOFTWARE PRODUCT, EVEN IF DHI
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
THIS LIMITATION SHALL APPLY TO CLAIMS OF PERSONAL
INJURY TO THE EXTENT PERMITTED BY LAW. SOME COUN-
TRIES OR STATES DO NOT ALLOW THE EXCLUSION OR LIMITA-
TION OF LIABILITY FOR CONSEQUENTIAL, SPECIAL, INDIRECT,
INCIDENTAL DAMAGES AND, ACCORDINGLY, SOME PORTIONS
OF THESE LIMITATIONS MAY NOT APPLY TO YOU. BY YOUR
OPENING OF THIS SEALED PACKAGE OR INSTALLING OR
USING THE SOFTWARE, YOU HAVE ACCEPTED THAT THE
ABOVE LIMITATIONS OR THE MAXIMUM LEGALLY APPLICA-
BLE SUBSET OF THESE LIMITATIONS APPLY TO YOUR PUR-
CHASE OF THIS SOFTWARE.'
Printing History
June 2003
April 2004
August 2005
April 2006
October 2007
January 2009
3
4 MIKE Zero
CONTENTS
5
1 ABOUT THIS GUIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Assumed User Background . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3 GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1 Defining an ECO Lab Template . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1.1 Specifying state variables . . . . . . . . . . . . . . . . . . . . . . 14
3.1.2 Specifying constants . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1.3 Specifying forcings . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1.4 Specifying auxiliary variables . . . . . . . . . . . . . . . . . . . . 24
3.1.5 Specifying processes . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.6 Specifying derived outputs . . . . . . . . . . . . . . . . . . . . . . 31
3.1.7 Very simple example: degradation of coliform bacteria . . . . . 33
4 REFERENCE MANUAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1 Auxiliary Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2 Built-in Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3 Built-in Forcings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4 Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.5 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.5.1 EU Eutrophication template . . . . . . . . . . . . . . . . . . . . . 45
4.5.2 WQ Water Quality templates . . . . . . . . . . . . . . . . . . . . 45
4.6 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.7 Derived Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.8 Euler Integration Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.9 Eutrophication ECO Lab Template . . . . . . . . . . . . . . . . . . . . . . 47
4.10 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.11 Forcings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.12 Heavy Metal ECO Lab Template . . . . . . . . . . . . . . . . . . . . . . . 47
4.13 Logical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.14 Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.15 Predefined ECO Lab Templates . . . . . . . . . . . . . . . . . . . . . . . 49
4.16 Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.17 Process Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.18 Process Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.19 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.20 Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.21 Runge Kutta 4th Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.22 Runge Kutta 5th Order with Quality Check . . . . . . . . . . . . . . . . . 52
4.23 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6 MIKE Zero
4.24 Semantic Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.24.1 State variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.24.2 Auxiliary variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.24.3 Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.24.4 Derived outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.25 Spatial Variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.26 State Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.27 Syntax Rules of Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.28 Temperature Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.28.1 General description . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.28.2 Arrhenius temperature dependency factor . . . . . . . . . . . . . 57
4.28.3 Lassiter Temperature dependency factor . . . . . . . . . . . . . . 58
4.29 Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.30 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.31 Water Quality ECO Lab Templates . . . . . . . . . . . . . . . . . . . . . . 59
7
8 MIKE Zero
Purpose
1.1 Purpose
The main purpose of this User Guide is to get you started in the use of
ECO Lab, for defining new ECO Lab templates or editing existing tem-
plates describing ecosystems. This User Guide is complemented by the
Online Help.
9
About This Guide
10 MIKE Zero
2 INTRODUCTION
ECO Lab is a numerical lab for Ecological Modelling. It is an open and
generic tool for customising Aquatic Ecosystem models to describe water
quality, eutrophication, heavy metals and ecology. The module is mostly
used for modelling water quality as part of an Environmental Impact
Assessment (EIA) of different human activities, but the tool is also applied
in aquaculture, e.g. for optimization the production of fish, seagrasses and
mussels. Another application area is in online forecasts of water quality.
The demand for tailor made ecosystem descriptions is great, because eco-
systems vary. The strength of this tool is the easy modification and imple-
mentation of mathematical descriptions of ecosystems into the
hydrodynamic engines of DHI.
The user can use Predefined ECO Lab Templates containing the mathe-
matical descriptions of ecosystems or can choose to develop own model
templates. A template is independent of grid systems and the same tem-
plate can be loaded in MIKE 11, MIKE 21, MIKE 3, MIKE 21 FM and
MIKE 3 FM. The template can describe dissolved substances, particulate
matter of dead or living material, living biological organisms and other
components (all referred to as state variables in this context).
11
Introduction
12 MIKE Zero
Defining an ECO Lab Template
3 GETTING STARTED
The user has the option of
If the user chooses to use the predefined DHI supported templates directly,
it is not necessary to read this User Guide, but instead the User Guide for
MIKE 11/21/3 ECO Lab can be relevant for information about running
simulations with ECO Lab.
This manual is about creating new templates and editing existing tem-
plates.
If the user wishes to create a new template: Open MIKE Zero and choose:
File | New | ECO Lab.
If the user wishes to modify an existing ECO Lab template, simply click
on the file in the File Manager and the ECO Lab user interface will open
the chosen file. The MIKE Zero installation program has copied examples
of ECO Lab templates to your hard disk (the templates has the file exten-
sion *.ecolab): see under the path where MIKE Zero was installed
(default: C:\Program files\): DHI\MIKEZero\Templates\ECOLab\*.eco-
lab.
These files can be used as they are or be modified. They can also just be
used for inspiration.
1 State variables
2 Constants
3 Forcings
13
Getting started
4 Auxiliary Variables
5 Processes
6 Derived Output
Thus, for example, if the model developer wants to make a model of Bio-
logical Oxygen Demand (BOD) and Dissolved Oxygen (DO) in the water
column it would be necessary to specify BOD and DO as state variables in
the ECO Lab user interface. This is done by choosing:
Figure 3.1 Creating a new state variable in the ECO Lab dialog
The user should specify different characteristics about the state variable.
14 MIKE Zero
Defining an ECO Lab Template
The name should not be too long, as the name specified in this box will be
used later when referring to this state variable in user specified expres-
sions. If the names are short, the expressions become shorter and easier to
read.
The user can specify a longer description than the above name in the
'Description' attribute. The text written in this box will also be printed in
the result files of the MIKE 11/21/3 ECO Lab simulations. The text will
also appear as 'fly by' text in the menus for the MIKE 11/21/3 ECO Lab.
An optional short text (256 characters) can also be supplied in the box
called 'Online help'.
Under the attribute 'Scope' it has to be specified where in the water envi-
ronment the state variable can be found. There are 4 options:
1 WC Water Column
2 WS Water Surface
3 WB Water Bed
4 SED Sediment
15
Getting started
a state variable that has a fixed location. That would typically be different
seagrasses, or mussels that both have a stationary nature.
There are 3 unit types available for state variables in ECO Lab:
1 Concentrations, with default unit mg/l, the unit is compatible with the
EUM system
2 Mass per area, with default unit g/m2, the unit is compatible with the
EUM system
3 Undefined, with a user specified text string as unit
The user must specify a default value for the state variable. The value
should be the expected value for the state variable. The specified default
value is suggested as initial conditions in the MIKE 11/21/3 ECO Lab.
The user must also specify a realistic range in which the state variable can
be found. If the user specifies initial conditions in the MIKE 11/21/3 ECO
Lab that are outside this interval the user will be warned.
State variables defined in the ECO Lab model are always available for
output in the M11/21/3 ECO Lab menus.
The Expression box contains the ordinary differential equation for the
state variable. This differential equation summarises the processes that
influence the state variable.
1 Process names
2 Stochiometric numbers that can be multiplied in the processes
An overview of all state variables and processes and their interaction can
be seen under 'Tools: Processmatrix'. If a state variable and a process has
interaction, the Process matrix will have a stochiometric coefficient speci-
fied at the relevant spot in the matrix. See Figure 3.2.
16 MIKE Zero
Defining an ECO Lab Template
Figure 3.2 Tool for viewing the Process matrix of an ECO Lab template. This
example of an ECO Lab template has 6 state variables and 16 proc-
esses and gives an overview over their interaction. The tool is acti-
vated in the ECO Lab user interface by choosing:
Tool | Processmatrix
Another tool is available under 'Tools: References'. For the marked varia-
ble this tool gives an overview of dependencies to other variables. For
example, what other expressions that use this variable as argument and
which arguments that are used in the expression itself. See Figure 3.3.
17
Getting started
Figure 3.3 A tool for viewing references to other variables of a marked variable
is available. For the marked variable, this tool shows an overview of
dependencies to other variables. This example shows that the proc-
ess called phtsyn uses 6 other arguments defined elsewhere in
ECO Lab and phtsyn is used as argument itself when calculating the
expression for DO. The tool is activated in the ECO Lab user inter-
face by choosing: Tool | References
Thus, for example, if the model developer wants to make a model of BOD
and DO in the water column it could be relevant to specify a process for
BOD degradation. This process could be described by an 1st order degra-
dation expression that uses a specific rate for degradation. This specific
rate could be described as a Constant in ECO Lab. The user does that by
choosing:
18 MIKE Zero
Defining an ECO Lab Template
Figure 3.4 Creating a new Constant in the ECO Lab dialog. In this case a 1st
order decay rate for BOD
The user should specify different characteristics about the included con-
stants.
The name should not be too long because the name specified in this box is
used later when referring to this constant in user specified expressions. If
the names are short, the expressions become shorter and easier to read.
The user can specify a longer description than the above name in the
'Description' attribute. The text will appear as 'fly by' text in the menus for
the MIKE 11/21/3 ECO Lab.
An optional short text (256 characters) can also be supplied in the box
called 'Online help'.
19
Getting started
The user has the option of using built-in constants that are specified else-
where in the MIKE system. The built-in constants are available, when
choosing the constant as not being user specified. See built-in constants in
Table 3.1.
Built-in Constants
Latitude
Longitude
Bed Level
Grid Spacing
1 1st order rate, with default unit: per day, the unit is compatible with the
EUM system
2 Undefined, with a user specified text string as unit
The user must specify a default value for the constant. The value should be
the expected value for the constant. The specified default value is also
suggested as the default value for the constant in the MIKE 11/21/3 ECO
Lab menus.
20 MIKE Zero
Defining an ECO Lab Template
The user can also specify a realistic range if available where the constants
are usually found. If the user specifies constants in the MIKE 11/21/3
ECO Lab menus that are outside this interval, the user will be warned.
A tool is available under 'Tools: References'. For the marked variable, this
tool shows an overview of dependencies to other variables. For example,
what other expressions that use this variable as argument. See Figure 3.3.
Thus, for example, if the model developer wants to make a model of BOD
and DO in the water column it could be relevant to specify a process for
BOD degradation. This process could be described by an expression
dependent on temperature. This temperature could be described as a Forc-
ing in ECO Lab. The user does that by choosing:
21
Getting started
Figure 3.5 Creating a new Forcing in the ECO Lab dialog. In this case a built-in
forcing for temperature
The user should specify different characteristics about the included forc-
ing.
The 'Forcing name' attribute should be filled with a short describing name.
The name should not be too long because the name specified in this box is
used later when referring to this forcing in user specified expressions. If
the names are short, the expressions become shorter and easier to read.
The user can specify a longer description than the above name in the
'Description' attribute. The text will appear as 'fly by' text in the menus for
the MIKE 11/21/3 ECO Lab.
An optional short text (256 characters) can also be supplied in the box
called 'Online help'.
22 MIKE Zero
Defining an ECO Lab Template
The user has the option of using built-in forcings that are specified or cal-
culated elsewhere in the MIKE system (see example in Table 3.2). The
built-in forcings are available when choosing the forcing as not being user
specified.
1 1st order rate, with default unit: per day, the unit is compatible with the
EUM system
2 Undefined, with a user specified text string as unit
The user must specify a default value for the forcing. The value should be
the expected value for the forcing. The specified default value is also sug-
gested as the default value for the forcing in the MIKE 11/21/3 ECO Lab
menus.
The user can also specify a realistic range if available where the forcings
are usually found. If the user specifies forcings in the MIKE 11/21/3 ECO
Lab menus that are outside this interval, the user will be warned.
A tool is available under 'Tools: References'. For the marked variable, this
tool shows an overview of dependencies to other variables. For example,
what other expressions that use this variable as argument. See Figure 3.3.
23
Getting started
Built-in forcings
Salinity
Temperature
Wind Velocity
Wind Direction
Water Depth
Water Density
Chezy No.
Thus, for example, if the model developer wants to make a model of BOD
and DO in the water column it could be relevant to specify a process for
BOD degradation. This process could be described by an expression
dependent on temperature. This temperature could be described as a Forc-
ing in ECO Lab. The user does that by choosing:
24 MIKE Zero
Defining an ECO Lab Template
Figure 3.6 Creating a new Auxiliary Variable in the ECO Lab dialog. Note that a
built-in function is about to be inserted in the expression box. A list
of possible arguments including the built-in functions can be viewed
by pressing 'Ctrl' + 'Space'. In this case the list has been limited to
only include arguments that start with a capitol O.
The user should specify different characteristics about the auxiliary varia-
ble.
The name should not be too long, because the name specified in this box is
used later when referring to this auxiliary variable in user specified
expressions. If the names are short, the expressions become shorter and
easier to read.
The user can specify a longer description than the above name in the
description attribute. The text written in this box will also be printed in the
result files of the MIKE 11/21/3 ECO Lab simulations. The text will also
appear as 'fly by' text in the menus for the MIKE 11/21/3 ECO Lab.
25
Getting started
An optional short text (256 characters) can also be supplied in the box
called 'Online help'. This text is at the moment only used as reference and
record of the ECO Lab model.
It can be specified in the 'Output' box that the auxiliary variable should be
available for output in the M11/21/3 ECO Lab model menus. If 'YES' is
chosen the user will be prompted in the M11/21/3 ECO Lab menus and
asked if the auxiliary variable should be included in the result file.
26 MIKE Zero
Defining an ECO Lab Template
1 Numbers
2 Already defined names of state variables, constants, forcings, and aux-
iliary variables. The names will turn from red to blue when recognised
as an already defined variable
3 Mathematical functions. The text will turn from red to green when rec-
ognised as a supported mathematical function
4 Built-in functions. The text will turn from red to green when recog-
nised as a predefined built-in function
5 Logical functions. If recognised as a logical function the text will turn
from red to black
6 Reserved words. If recognised as a reserved word the text will turn
from red to black
1 Addition: +
2 Subtraction: -
3 Multiplication: *
4 Division: /
A tool is available under 'Tools: References'. For the marked variable, this
tool shows an overview of dependencies to other variables. For example,
what other expressions that use this variable as argument and which argu-
ments that are used in the expression itself. See Figure 3.3.
27
Getting started
ECO Lab solves to determine the state of the state variables. These differ-
ential equations, which describe the interaction between state variables
and processes are specified under 'State Variables'. To add a new process
in ECO Lab choose:
Figure 3.7 Creating a new Process in the ECO Lab dialog. In this case it is a
process for BOD degradation. Note that a built-in function
(ARRHENIUS20) is used in the expression box along with other
arguments.
The 'Process name' attribute should be filled with a short describing name.
The name should not be too long, because the name specified in this box is
used later when referring to this process in user specified expressions. If
the names are short the expressions become shorter and easier to read.
The user can specify a longer description than the above name in the
description attribute. The text written in this box will also be printed in the
28 MIKE Zero
Defining an ECO Lab Template
result files of the MIKE 11/21/3 ECO Lab simulations. The text will also
appear as 'fly by' text in the menus for the MIKE 11/21/3 ECO Lab menus.
An optional short text (256 characters) can also be supplied in the box
called 'Online help'.
It can be specified in the 'Output' box that the process should be available
for output in the M11/21/3 ECO Lab model menus. If 'YES' is chosen the
user will be prompted in the M11/21/3 ECO Lab menus and asked if the
process should be included in the result file.
29
Getting started
1 Numbers
2 Already defined names of state variables, constants, forcings, auxiliary
variables and Processes. The names will turn from red to blue when
recognised as an already defined variable
3 Mathematical functions. The text will turn from red to green when rec-
ognised as a supported mathematical function. The text will turn from
red to green when recognised as a supported mathematical function
4 Built-in functions. The text will turn from red to green when recog-
nised as a predefined built-in function. The text will turn from red to
green when recognised as a predefined built-in function
5 Logical functions. If recognised as a logical function the text will turn
from red to black
6 Reserved words. If recognised as a reserved word the text will turn
from red to black
1 Addition: +
2 Subtraction: -
3 Multiplication: *
4 Division: /
A tool is available under 'Tools: References'. For the marked variable, this
tool shows an overview of dependencies to other variables. For example,
what other expressions that use this variable as argument and which argu-
ments that are used in the expression itself. See Figure 3.3.
The order in which the expressions in processes are defined is also the
order in which they will be calculated. Arguments in an expression
defined after the expression itself is therefore not legal. Therefore it can
often be necessary to change the order in which the variables are defined
when creating a template. This is done by simply dragging and dropping
the relevant variable with the mouse to a new position.
30 MIKE Zero
Defining an ECO Lab Template
Figure 3.8 Creating a new Derived Output in the ECO Lab dialog. In this case it
is a derived output for Total N that summarises the nitrogen contain-
ing state variables in the water column.
The user should specify different characteristics about the derived output.
31
Getting started
The user can specify a longer description in the description attribute. The
text written in this box will be printed in the result files of the MIKE
11/21/3 ECO Lab simulations. The text will also appear as 'fly by' text in
the menus for the MIKE 11/21/3 ECO Lab.
An optional short text (256 characters) can also be supplied in the box
called 'Online help'. This text is at the moment only used as reference and
record of the ECO Lab model.
32 MIKE Zero
Defining an ECO Lab Template
1 Numbers
2 Already defined names of state variables, constants, forcings, auxiliary
variables and processes. Note that the values for the state variables will
be based on values after integration has taken place. The names will
turn from red to blue when recognised as an already defined variable
3 Mathematical functions. The text will turn from red to green when rec-
ognised as a supported mathematical function
4 Built-in Functions. The text will turn from red to green when recog-
nised as a predefined built-in function
5 Logical functions. If recognized as a logical function the text will turn
from red to black
6 Reserved words. If recognised as a reserved word the text will turn
from red to black
1 Addition: +
2 Subtraction: -
3 Multiplication: *
4 Division: /
A tool is available under 'Tools: References'. For the marked variable, this
tool shows an overview of dependencies to other variables. For example,
what other expressions that use this variable as argument and which argu-
ments that are used in the expression itself. See Figure 3.3.
The bacteria are assumed to be degraded with a first order decay expres-
sion in the water and the degradation is dependent on temperature. For
33
Getting started
simplicity in this example the description does not include salinity and
solar radiation in the model even though it is known that these factors also
play a role in degradation of coliform bacteria in the water environment.
To define the above mentioned system the user should open the ECO Lab
user interface and create a template with the variables and characteristics
that can be seen in Table 3.3. Note that '---' in the table means that the
attribute is not necessary to specify for that variable type.
After typing the information into ECO Lab the file should be saved as a
ECO Lab template (*.ecolab file). When pressing 'Save' ECO Lab will
compile the contents of the template. At this stage the user might get an
error message if ECO Lab cannot compile the file. The ECO Lab template
is not complete from a technical point of view before it is possible to save
without error messages.
34 MIKE Zero
Defining an ECO Lab Template
Description Faecal Colif- Degradation of 1st order decay Temperature Temperature Factor for
orm Bacteria Faecal 20 C, coefficient for temperature
Coliform (faecal) decay rate influence
35
Getting started
36 MIKE Zero
4 REFERENCE MANUAL
It is intended that you use this manual when you are making model appli-
cations with ECO Lab and need to know how various inputs, outputs, etc.
can be specified. Also often used terms in ECO Lab are explained.
All the entries listed below are included in the Reference Manual in alpha-
betical order.
37
Reference Manual
The idea is to split long process expressions (see Processes) into sub-
expressions under auxiliary variables, so that the process expressions
become more simple and easier to read. However, only the model devel-
opers imagination limits the possible use of auxiliary variables, because
here you can calculate intermediate results. Typical examples of auxiliary
variables are dimensionless factors that can be multiplied by a process.
The factors could e.g. be a factor for primary productions' dependency of
light, or a factor for coliform bacteria's decay dependency of temperature.
The defined factor is then used as argument under processes. Other uses of
auxiliary variables are to use them in other auxiliary variables. For exam-
ple, an auxiliary variable for estimating light in the water column can be
used as argument in the auxiliary variable mentioned above for calculating
a factor for primary productions' dependency of light.
38 MIKE Zero
Built-in Forcings
1 Latitude
If available this built-in constant returns the latitude of the model area
2 Longitude
If available this built-in constant returns the longitude of the model
area
3 Bed level
If available this built-in constant returns the altitude of the model area
4 AD time step (AD_DT)
This built-in constant returns the time step in seconds between every
advection-dispersion calculation
5 ECO Lab time step (WQ_DT)
This built-in constant returns the time step in seconds between every
update by the ECO Lab module
39
Reference Manual
40 MIKE Zero
Built-in Functions
f ( a, b ) = a ( b 20 )
f ( a, b ) = a ( b 5 )
4 OXYGENSATURATION(Salinity, Temperature)
This function returns an estimate of the saturated dissolved oxygen
concentration in the water as function of salinity and temperature:
f (a,b) = 14, 65 0, 0841 a + b ( 0 , 00256 a 0, 41022 + b
( 0, 007991 0, 0000374 a 0, 000077774 b ) )
5 OXYGENSATURATION_WEISS(Salinity, Temperature)
This function returns an estimate of the saturated dissolved oxygen
concentration in water as function of salinity and temperature. Sug-
gested by Weiss:
ea
f ( sali, temp ) = -------------------
0.69997
where
100
a = 173.4292 + 249.6339 ------------------------------------ +
temp + 273.15
temp + 273.15 temp + 273.15
143.3483 log ------------------------------------ 21.8493 ------------------------------------ +
100 100
temp + 273.15 temp + 273.15 2
sali 0.033096 + 0.014259 ------------------------------------ 0.0017 ------------------------------------
100 100
41
Reference Manual
a (d c)
d temp
---------------------
a ( temp c )
Lassiter ( a, b, c, d, temp ) = b e
dc
8 MICHAELIS_MENTEN2(Concentration, Constant):
2
a
f (a,b) = -------------
2
-
a +b
9 REVERSE_MICHAELIS_MENTEN(Concentration):
1
f ( a ) = ------------
a+1
42 MIKE Zero
Built-in Functions
43
Reference Manual
4.5 Calibration
By calibration of a ECO Lab model setup it is attempted to find the best
accordance between computed and observed state variables (model com-
ponents) by variation of a number of parameters.
The ECO Lab modeller should when calibrating an ECO Lab setup have
the above mentioned possible reasons for inaccuracy in the results in
mind, before changing parameters dramatically.
44 MIKE Zero
Calibration
For the DHI ECO Lab templates the following calibration order is sug-
gested:
z Phytoplankton
Potential growth, shift diatoms-green algae
Sedimentation
Light extinction
Temperature dependency
z Nutrients
z Detritus sedimentation/decay
z Sediment (denitrification/immobilisation)
z Oxygen
z Macrophytes
z BOD-DO relations
degradation rates
re-aeration
production/respiration
(nitrification)
z Nutrients
content BOD
nitrification/denitrification
sorption processes
z Coliforms
45
Reference Manual
4.6 Constants
Constants are used as arguments in the mathematical expressions of proc-
esses in an ECO Lab template. They are constants in time, but can vary in
space. Typical examples of constants are different specific rate coeffi-
cients, exponents, half saturation concentrations and also universal con-
stants such as gas constants and atomic weights.
46 MIKE Zero
Eutrophication ECO Lab Template
y n + 1 = y n + hf ( x n, y n )
4.10 Expressions
Expressions must be specified for state variables, auxiliary variables,
processes, and derived outputs in the ECO Lab templates. An expression
is a sequence of arguments and operators.
The expressions must follow the Syntax Rules of Expressions and the
Semantic Rules.
4.11 Forcings
Forcings are used as arguments in the mathematical expressions of proc-
esses in an ECO Lab template. They can vary in time and space. They rep-
resent variables of an external nature that affect the ecosystem. Typical
examples of forcings are temperature, solar radiation and wind.
47
Reference Manual
The syntax below must be followed carefully with respect to capital letters
and number of arguments.
1 ABS(X)
2 ARCCOS(X)
3 ARCSIN(X)
4 ARCTAN(X)
5 ARCTAN2(X,Y)
6 COS(X)
7 COSH(X)
8 EXP(X)
9 LN(X)
10 LOG(X)
11 MAX(X,Y)
12 MIN(X,Y)
13 POW(X,Y)
14 SIN(X)
48 MIKE Zero
Predefined ECO Lab Templates
15 SINH(X)
16 SQR(X)
17 SQRT(X)
18 TAN(X)
19 TANH(X)
20 PI()
4.16 Processes
Processes are arguments in differential equations governing the state of
the state variables included in the ECO Lab templates.
49
Reference Manual
50 MIKE Zero
References
4.19 References
References is a tool for viewing dependencies of a symbol to other sym-
bols. The references of a symbol can be seen in the ECO Lab template edi-
tor by choosing 'Tools: references' when a symbol is marked.
k 1 = hf ( x n, y n )
h k
k 2 = hf x n + ---, y n + ----1
2 2
h k
k 3 = hf x n + ---, y n + ----2
2 2
k 4 = hf ( x n + h, y n + k 3 )
51
Reference Manual
k k k k 5
y n + 1 = y n + ----1 + ----2 + ----3 + ----4 O ( h )
6 3 3 6
4.23 Scope
Scope is the ECO Lab way of specifying where a state variable or process
can be found in the water environment. By having this description of the
physical distribution of state variables and their processes it is possible to
control that the state variables are only affected by a process in locations,
where the state variables and the processes have overlapping occurrence.
A process or state variable with scope WS (water surface) has the physical
meaning that it is located in the upper part of the water column and it is
always in direct contact with the water surface. Note that a WS State vari-
able does not touch the water bed. An example of a WS state variable can
for instance be water hyacinths. An example of a WS process could be
reaeration (exchange of oxygen between water phase and atmosphere). A
WS process or state variable is only represented by one number per hori-
zontal grid point.
A process or state variable with scope WC (water column) has the physi-
cal meaning that it can be located in the whole water column. This means
that a WC state variable can both touch the water surface, the water bed,
or neither. An example of a WC state variable can for instance be phyto-
plankton Carbon concentration. An example of a WC process that takes
place in the whole water column could be BOD degradation. If a state var-
iable is specified as WC and it is affected by a WS process, the process
will only influence the state variable in the water surface layer. In all other
layers the process will be set to zero. A WC process or state variable is
represented by one number per vertical layer per horizontal grid point.
52 MIKE Zero
Semantic Rules
A process or state variable with scope WB (water bed) has the physical
meaning that it is located in the bottom part of the water column and it is
always in contact with the bed. Note that a WB state variable cannot touch
the water surface, but dependent on the discretization of the water column
in a specific model setup a situation where both state variables that are
confined to the bed and to the water surface can exist in the same model
point. This is always the case for depth integrated model systems. Exam-
ples of a WB state variable can for instance be eelgrass, macroalgae, or fil-
trators. An example of a WB process could be release of inorganic
nitrogen from the sediment. A WB process or state variable is only repre-
sented by one number per horizontal grid point.
A process or state variable with scope SED (sediment) has the physical
meaning that it is located in the sediment. Only transformation processes
are possible in the sediment and processes defined as WS processes (for
instance oxygen exchange with atmosphere) cannot influence a SED state
variable. SED state variables have a fixed nature and cannot be trans-
ported by the advection dispersion module of the hydrodynamic engines.
An example of a SED state variable can for instance be BOD in the sedi-
ment.
53
Reference Manual
4.24.3 Processes
Both spatial variation and scope must be specified for processes. See sepa-
rate explanations for scope and spatial variation in separate paragraphs.
54 MIKE Zero
Semantic Rules
55
Reference Manual
1 None
2 Horizontal
3 Horizontal and vertical
56 MIKE Zero
Temperature Dependencies
57
Reference Manual
4.29 Transport
In ECO Lab the state variables that are present in the water column has the
option of using the advection-dispersion module for calculating the trans-
port based on hydrodynamics. If this option is not specified in the ECO
Lab Template, the state variable will have a fixed location and the calcula-
tion of its state will only be based on the processes defined in ECO Lab
template and not based on advection-dispersion processes.
It is also possible to have state variables in the water column that have a
fixed nature. An example of that could be relevant in models involving
aquaculture, for instance cages of scallops in the water column.
4.30 Units
In ECO Lab it is possible to use a limited number of predefined unit types
that are supporting the EUM unit conversion system.
For state variables there are 3 unit types to choose from in the ECO Lab
template editor:
For processes the unit is always relating to time, so formally the unit is
[per second], but it should be understood as [undefined per second]. This
way the user has the option of changing the time unit to for instance [per
58 MIKE Zero
Water Quality ECO Lab Templates
hour] in the engine dialogs of ECO Lab, while the 'undefined' part of the
unit will not be converted according to the EUM system.
For constants, forcings and auxiliary variables the units are not supported
by the EUM unit conversion system, but it is possible to specify user spec-
ified text, which will be written in e.g. output and dialogs.
1 BOD
2 DO
3 Nitrate
4 Nitrite
5 Phosphate
6 Faecal Coliform
7 Total Coliform
59
Reference Manual
60 MIKE Zero
A F
ABS(X) . . . . . . . . . . . . . . . . . . 48 Faecal coliform . . . . . . . . . . . . 59
AD time step (AD_DT) . . . . . . . . . 39 Flooded area of grid cell . . . . . . . 40
ARCCOS(X) . . . . . . . . . . . . . . . 48 Forcings . . . . . . . . . . . . . . . . 37
ARCSIN(X) . . . . . . . . . . . . . . . 48
ARCTAN(X) . . . . . . . . . . . . . . . 48 G
ARCTAN2(X,Y) . . . . . . . . . . . . . 48 Global . . . . . . . . . . 20, 23, 26, 29, 32
Arrhenius20 . . . . . . . . . . . . . . . 41
Arrhenius5 . . . . . . . . . . . . . . . . 41 H
Auxiliary variables . . . . . . . . . 24, 37 Heavy metal . . . . . . . . . . . . . . 49
Heavy Metal ECO Lab template . . . 37
B Horizontal . . . . . . . 20, 23, 26, 29, 32
Bed area of grid cell . . . . . . . . . . 40 Horizontal and vertical 20, 23, 26, 29, 32
Bed level . . . . . . . . . . . . . . . . . 39 Horizontal current direction . . . . . 40
BOD . . . . . . . . . . . . . . . . . . . 59 Horizontal current speed . . . . . . . 40
BOD-DO . . . . . . . . . . . . . . . . . 49 Horizontal grid cell flux . . . . . . . . 40
BOD-DO relations . . . . . . . . . . . 45 HOUR . . . . . . . . . . . . . . . . . . 51
Built-in constants . . . . . . . . . . 20, 37
Built-in forcings . . . . . . . . . . . 24, 37 L
Built-in functions . . . . . . . . . . . . 37 Lambert Beer1 . . . . . . . . . . . . . 42
Lambert Beer2 . . . . . . . . . . . . . 42
C Lassiter . . . . . . . . . . . . . . . . . 41
Calibration . . . . . . . . . . . . . . . . 37 Latitude . . . . . . . . . . . . . . . . . 39
Coliforms . . . . . . . . . . . . . . . . . 45 LN(X) . . . . . . . . . . . . . . . . . . 48
Constants . . . . . . . . . . . . . . 18, 37 LOG(X) . . . . . . . . . . . . . . . . . 48
COS(X) . . . . . . . . . . . . . . . . . . 48 Logical functions . . . . . . . . . 37, 51
COSH(X) . . . . . . . . . . . . . . . . . 48 Longitude . . . . . . . . . . . . . . . . 39
D M
DAY . . . . . . . . . . . . . . . . . . . 51 Macrophytes . . . . . . . . . . . . . . 45
Daynumber . . . . . . . . . . . . . . . 40 Mathematical functions . . . . . . 37, 51
Derived output . . . . . . . . . . . . . 31 MAX(X,Y) . . . . . . . . . . . . . . . 48
Derived outputs . . . . . . . . . . . . . 37 Michaelis Menten 1 . . . . . . . . . . 42
Detritus sedimentation/decay . . . . . 45 Michaelis Menten 2 . . . . . . . . . . 42
DO . . . . . . . . . . . . . . . . . . . . 59 MIN(X,Y) . . . . . . . . . . . . . . . . 48
MINUTE . . . . . . . . . . . . . . . . 51
E MONTH . . . . . . . . . . . . . . . . . 51
ECO Lab time step (WQ_DT) . . . . . 39
Euler integration method . . . . . . . . 37 N
EUM unit conversion . . . . . . . . 58, 59 Nitrate . . . . . . . . . . . . . . . . . . 59
Eutrophication . . . . . . . . . . . . . . 49 Nitrite . . . . . . . . . . . . . . . . . . 59
Eutrophication ECO Lab template . . 37 Nutrients . . . . . . . . . . . . . . . . 45
EXP(X) . . . . . . . . . . . . . . . . . . 48
Expressions . . . . . . . . . . . . . . . 37 O
Oxygen . . . . . . . . . . . . . . . . . 45
61
Oxygen saturation . . . . . . . . . . . 41 Temperature . . . . . . . . . . . . . . . 39
Oxygen saturation Weiss . . . . . . . 41 Temperature dependencies . . . . . . 37
Total coliform . . . . . . . . . . . . . . 59
P Transformation . . . . . . . . . . . . . 50
Phosphate . . . . . . . . . . . . . . . . 59 Transport . . . . . . . . . . . . . . . . 37
Phytoplankton . . . . . . . . . . . . . 45
PI() . . . . . . . . . . . . . . . . . . 49, 51 U
POW(X,Y) . . . . . . . . . . . . . . . . 48 Unit types . . . . . . . . . . . . . . 20, 23
Predefined ECO Lab templates . . . 37 Units . . . . . . . . . . . . . . . . . . . 37
Process matrix . . . . . . . . . . . 16, 37
Process type . . . . . . . . . . . . . . 37 V
Processes . . . . . . . . . . . . . . 27, 37 Variable . . . . . . . . . . . . . . . . . 17
Vertical current speed . . . . . . . . . 40
R Vertical grid cell flux . . . . . . . . . . 40
References . . . . . . . . . . . . . 17, 37 Volume of grid cell . . . . . . . . . . . 40
Relative Daylength . . . . . . . . . . . 42
Reserved words . . . . . . . . . . . . 37 W
Reverse Michaelis Menten . . . . . . 42 Water bed . . . . . . . . . . . . . . . . 15
Runge Kutta 4th Order . . . . . . . . 37 Water column . . . . . . . . . . . . . . 15
Runge Kutta 5th Order with quality Water density . . . . . . . . . . . . . . 40
check . . . . . . . . . . . . . . . . . . 37 Water depth . . . . . . . . . . . . . . . 40
Water layer height . . . . . . . . . . . 39
S Water Quality ECO Lab templates . . 37
Salinity . . . . . . . . . . . . . . . . . . 39 Water surface . . . . . . . . . . . . . . 15
Scope . . . . . . . . . . . . . . . . 15, 37 Water surface level . . . . . . . . . . . 40
SECOND . . . . . . . . . . . . . . . . 51 Water surface slope in flow direction . 40
Sediment . . . . . . . . . . . . . . . . 15 Wind direction . . . . . . . . . . . . . . 39
Sediment (denitrification/ Wind velocity . . . . . . . . . . . . . . 39
immobilisation) . . . . . . . . . . . . 45
Semantic rules . . . . . . . . . . . . . 37 Y
Settling . . . . . . . . . . . . . . . . . . 50 YEAR . . . . . . . . . . . . . . . . . . . 51
SIN(X) . . . . . . . . . . . . . . . . . . 48
SINH(X) . . . . . . . . . . . . . . . . . 49
Spatial variation . .20, 23, 26, 32, 37, 53
SQR(X) . . . . . . . . . . . . . . . . . 49
SQRT(X) . . . . . . . . . . . . . . . . 49
State variables . . . . . . . . . . . 14, 37
Sunrise . . . . . . . . . . . . . . . . . 42
Sunset . . . . . . . . . . . . . . . . . . 42
Surface area of grid cell . . . . . . . . 40
Syntax rules of expressions . . . . . . 37
T
TAN(X) . . . . . . . . . . . . . . . . . . 49
TANH(X) . . . . . . . . . . . . . . . . . 49
62 MIKE Zero