% $Id: greater-tutorial.tex,v 1.2 2003-07-23 15:50:04 frank Exp $
\CVS$Id: greater-tutorial.tex,v 1.2 2003-07-23 15:50:04 frank Exp $
%
% Tutorial ***************************************************************
%

\chapter{Tutorial}
\label{chap:tutorial}

\TutorialStep{
The essential steps to run a {\bf first} simulation to get an
impression of \GREATER\ are printed within a gray shaded box 
(like this one). They
represent the minimum contents of the tutorial. 

The complete tutorial chapter can be
seen as a guided tour through all the main features of \GREATER.

Finally, Chapter \ref{chap:user_interface}
serves as a reference manual and provides a
complete overview of \GREATER\ features.
}

\begin{center}
\Fig{\includegraphics[scale=1.1]{session-workflow.eps}}
	{\GREATER\ Session Work-flow\label{FIGsessionWorkflow}}
\end{center}

\section{Basic Concepts}

\subsection{Session Concept}

The collection of data needed to perform a simulation
(and available simulation results) is called a ''session''.

Sessions can be stored and loaded and thus offer the quick retrieval
of a certain situation. A unique title for a session is not mandatory
but helpful to assist the search of a specific session in a long list.

Additionally, sessions form the basis of the exchange of complete
simulation data sets (see GREAT-ER II Administration, Section Data Exchange).

A session consists of the following data:

\begin{enumerate}

\item	{\bf Title}: A significant name for the session.

\item   {\bf Comment}: The comment can more detailed describe the
	contents and meaning of the session.

\item	{\bf Catchment ID}: The ID (name) of the catchment (e.g. {\em Aire}).
	The catchment data themselves are not part of a session.
	Such data (e.g. river network) are fixed and cannot be edited.

\item	{\bf Substance}: The whole substance data set is stored 
	within a session. It is possible to edit and 'play around' with 
	substance properties
	to see the effect of the simulation results. This does not affect
	the carefully collected substances of the substance database. 
	On the other hand the session is not affected by changes of data sets
	in the database which can lead to unrelated input and result data.
	However, substance data sets can also be stored as ''templates'' into
	the database to share a set with other users.

\item	{\bf Release Data}: Although the positions and number of discharge
	sites within a catchment are not editable, the attributes of the
	discharge sites can be modified. For this the set of attributes is
	stored with the session. In contrary to the substance database,
	modified data sets can not be written back to the \GREATER\ catchment
	database.
  
\item   {\bf Environmental Data} A numerous group of parameters (of the
	higher model modes) is neither substance nor catchment specific. 
	These are stored as environmental data. A default set is automatically 
	loaded on creation of a new session and stored with the session.
	Similar to the substance data environmental data sets can be stored as
	''templates''.

\item	{\bf Model Parameter}: The complete model parameter data set
	needed by the \GREATER\ model is stored within a session. 

\item	{\bf Modification Information}: Tracks if any element 
	of the session has been changed since the last save and 
	hence the session is different 
	to the session in the database with the same title.

	If results are available for the session it is also tracked if the 
	results are in sync with the input parameters. When a session is saved
	after some modifications it still can be necessary to run a
	simulation to harmonize input data and results.

	Both informations are displayed in the session's window status 
	bar (see below).

\item   {\bf Results}: If available, simulation results are stored with 
	the session. This covers as well analysis results like the 
	PEC values or percentiles.
 
\item   {\bf Privileges}: The \GREATER\ database provides a fine grained
	concept of privileges on data access which: The concept distinguishes
	{\em owner} of the data, the {\em group} the owner belongs to and 
	{\em all} users. For each of the categories the owner can set 
	read and write access selectively.
\end{enumerate}

The most important data of a session are collected in the title bar of the
corresponding view window. This makes the title, catchment ID and substance ID
permanently visible helps to identify the session in a window list.

% \paragraph{Open Sessions}
% 
% In \GREATER\ you can have many {\em open sessions}, only one of which can  
% {\em active} at one time. The name of the active session is shown in the 
% \ArcView\ title bar. Scenario-related operations always 
% are performed on the active session (eg. Close Scenario, Edit Data
% Start Simulation, etc).
% 
% The view window that corresponds to the active session is 
% usually visible at the front. If a catchment has yet not been specified, 
% the overview of Europe is visible.
% 
% The active session can be set by creating a new session, selecting
% a session from the session database or the bottom list of the first menu 
% and by activating the corresponding View window.
% 
% \subsubsection{Substance Database}
% 
% The substance unique ID (key) is the concatenation of its name and its CAS No.
% (Chemical Abstract Service Number). The CAS alone is not sufficient 
% because it is often not (quickly) available and it does not make sense
% to use any other number (which might be that of another substance) instead.
% Furthermore it is not sufficient to only use the name of a substance 
% as the key, since the typography does not seem to be commonly used
% (eg. Pentachlorphenol/Pentachlorophenol/PCP).
% 
% It is possible to have many different substance databases. The default 
% database delivered with
% \GREATER\ should only be modified/extended
% if the new values can be trusted (literature/laboratory reference).
% 
% \subsubsection{Expert Mode vs. Easy-To-Use Mode}
% 
% \GREATER\ offers two modes for the user interface: The expert mode and
% the easy-to-use mode.
% 
% 'Expert' in this context requires familiarisation
% with GIS in general and with \ArcView\ in detail. The expert mode
% gives access to all \ArcView\ operations and commands. This includes
% the possibilities of undocumented changes or deletion of basic
% \GREATER\ data sets. Obviously, this feature provides additional 
% capabilities but also contains a hidden danger. You should decide 
% carefully whether to perform operations in the expert mode or not.
% An expert beginner should be able to decide which kind of operations
% should not harm the whole system and its data sets.
% 
% 'Easy-to-use' basically makes it is impossible to harm the system and/or
% the underlying \GREATER\ data sets. If you are only interested in
% performing simulations and viewing the results, this mode is sufficient.

\subsection{Model system}

The current version of \GREATER\ comes with a model system covering four
sub-models: emission, sewer, treatment plant and river. There are up to three 
{\em complexity modes} for each of this sub-models: 
in the simplest model's modes
only first-order elimination rates are considered, higher model modes
regard elimination processes related to solved or sorbed fractions in
various degrees of detail. 

All of the sub-models are deterministic in principle. Using the Monte-Carlo
method set on top of these models, \GREATER\ drives a 
stochastic approach and
model results are returned as distributions of concentrations. \GREATER\
delivers results for all considered geographic objects: sewers (i.e. the
influent of a treatment plant), all treatment plants (effluent) and all 
river stretches within the catchment under investigation. 
See the model description for more details.

Model results are displayed by coloring river stretches on a map, or as
concentration profiles through a river. \GREATER\ provides users with
several options to analyze the results and to derive further values from
them. For further details see below in the tutorial and menu description.

\subsection{Parameter handling}
Depending on the selected models, a various amount of parameters are required 
to run a simulation. These parameters are sorted according to their
relation (to a
substance, catchment or model). \GREATER\ provides several dialogs to enter
or modify the parameters. 

\GREATER\ aids users to enter the parameters required
according to the selected model's complexity modes with 
an identifier in the input dialogs and a tool to check for missing parameters.
Both are explained in detail below.

\GREATER\ is delivered with an expert knowledge data base on the
parameters to avoid wrong data entries: Values are compared against two
ranges: a warning range and an error range. 
The warning range specifies the usual range of a parameter.
If an entry exceeds the parameter
warning range, a dialog will point out this possible mistake. Nevertheless,
it is possible to run a simulation with such settings. Values exceeding 
a warning range are marked with a yellow background.

In contrast, the error range defines the logical range of a parameter. 
Values outside this range are impossible and will lead to errors.
If a entry exceeds the error range it is not possible to leave the 
dialog (other than canceling) until a value within the 
warning range has been entered. 
A dialog will give a error message and hints on the logical range of the
parameter. The parameter entry is marked with a red background. 
 
Finally, for better documentation and transparency of simulation results a
separate comment can be entered for each parameter. This comment should
mention the data source and might contain additional information on
laboratory practices, etc.

\subsection{GIS Functionality}

\GREATER\ uses the Free Software GIS data viewer 
\Thuban\footnote{\tt http://thuban.intevation.org} as platform for 
the user interface. Various features and analysis functions are available
for use with \GREATER. Some are discussed below, for a complete overview see 
the \Thuban\ Manual.


\section{Starting \GREATER}
\TutorialStep{
Select the ''GREAT-ER II'' icon from the GREAT-ER folder in the ''Start'' menu.
}

After the start-up \GREATER\ presents the initial screen. 

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/initial_screen.eps}}
	{\GREATER\ - initial screen\label{FIGinitialScreen}}
\end{center}

The \Thuban\ menu bar is replaced by a specific \GREATER\ menu bar, the
number of buttons and tools reflects the set needed for \GREATER.
Please note that each menu item (when highlighted) is explained briefly 
at the bottom left corner of the \GREATER\ window.

The menu items are ordered according to the usual work flow of a simulation
session: initially you have to create or select a session. The next step
is to modify the data. Usually users will simulate a specific
substance with several catchments and may want to use more detailed models
if the simple ones identify issues. Hence the menu bar reflects this
order of steps: 
\menuitem{Substance}, \menuitem{Catchment}, \menuitem{Environment} 
and \menuitem{Simulation}. The 
following items enable you to analyze the simulation results and offer 
various options to display accessory data or to modify the 
presentation of data based on additional information.

The three menu items \menuitem{Map}, \menuitem{Layer},
\menuitem{Table} provide access on the \Thuban\ features with some 
additional analysis functionality.

Menu items and tool buttons are enabled or disabled depending on
the current settings and data availability.

\section{Authentication}

\GREATER\ stores all data in an underlying database and provides a 
fine grained access rights management: The system distinguishes between the
owner of a data set, the group of users the user belongs to and all users
with access to the database. Read and write access can be granted individually.

A user has to authenticate before the database is accessible and therewith
\GREATER\ is usable.

\TutorialStep{Select \menuitem{\underline{F}ile} / 
\menuitem{\underline{A}uthenticate}. In the dialog enter your user name and 
password for the (optional) database.

If no database is specified, the user's profile default database is used.}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/authenticate-dlg.eps}}
{Authenticate Dialog}
\end{center}

After successful authentication the model system is started automatically.
The status bar identifies this phase.
Additional menu items are active to initially work on a
session. The status bar displays the user logged in and the group the user
belongs to. If not the default, the selected database is displayed as well.

\pagebreak

\section{Setting up a session}

\parbox[b]{0.15\textwidth}
{\includegraphics[scale=\imagescale]{./screenshots/menu-file.eps}
}
\hfill
\parbox[b]{0.8\textwidth}{
The first menu of the \GREATER\ user interface, called 
\menuitem{\underline{F}ile}, covers all options to manage sessions:
creating new or loading existing ones, saving or deleting 
sessions. As usual for GUI applications, this menu also includes 
the exit item.
}

\subsection{Creating a new session}

\TutorialStep{
To create a new session, select the corresponding 
\menuitem{\underline{N}ew Session} menu item from the
\menuitem{File} menu. A new dialog appears:
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/newsession-dlg.eps}}
{New Session Dialog \label{FIGnewScenario}}
\end{center}

To create a new session you have to specify a {\em session name}
at this stage.
The name is used to identify the session in all further
steps of \GREATER\ application. Optionally, you can select a substance and 
a catchment from related lists and enter a comment on the
session to give additional remarks. Finally the privileges for the  
session can be specified. The default value considers the data as private,
changes to the privileges should be done with care.

\TutorialStep{
As an example, enter the name {\tt Tutorial Session} and select the
substance {\em LAS} with the catchment {\em Calder}.
Leave the dialog with ''OK''.
}

\pagebreak

The \GREATER\ user interface now changes:

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial_session.eps}}
{Tutorial Session with Catchment Calder \label{FIGinitialAire}}
\end{center}

The map now displays the Calder catchment with {\em river network},
{\em discharge sites} and {\em catchment boundary}, as mentioned in the
legend. The {\em discharge-river} layer
results from the fact that sewage treatment plants are situated at 
some distance from the discharged river. Usually the distance is too small
to be seen on the full catchment scale. 
The {\em picture sites} theme is a very special theme which is 
only visible if 
photos are available to give users a better impression of the catchment.
These \GREATER\ specific layers cannot be removed.

The title bar now gives some hints on the displayed data: The name of
the session, the substance and the catchment.
The status bar warns users that there are unsaved
changes. 

\pagebreak

You may play around with
the display tools (identify, zoom, pan). The {\em identify tool}
presents the attributes of selected geographic objects. 

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/identify-dlg.eps}}{
	Identify Tool Dialog \label{FIGidentify}}
\end{center}

\subsection{Needed inputs}
Having now created a new session you may use the settings and data loaded
from the data bases (by selecting substance and catchment) or modify them.

As mentioned above, \GREATER\ provides several complexity modes for the 
various models. Obviously, the amount of required data increases with the
complexity mode of a model. The \GREATER\ user interface accentuates
 this
by identifying parameter values within the dialogs: Parameters marked with a
cross are needed in the current model mode selection.

By default all sub-models (sewer, waste water treatment and river) are set
to complexity mode one. The parameters needed at this complexity level are
initialized when creating a complete new session. We step through
the various dialogs to examine the \GREATER\ functionality.

\subsection{Editing substance data}
\TutorialStep{
Having selected a substance within the session creation, the related data
set is loaded from the database. To view this, select
\menuitem{\underline{S}ubstance} / \menuitem{\underline{E}dit} menu.}

\parbox[b]{0.15\textwidth}{
\includegraphics[scale=\imagescale]{./screenshots/menu-substance.eps}
}
\hfill
\parbox[b]{0.8\textwidth}{
The appearing substance dialog covers all directly related substance data
split into eight categories. The dialog opens with the identification card.
It is compulsory to give the substance a name; all other parameters
which may ease identification are optional. Only three further cards 
are relevant at the current stage: WWTP removal, River
removal and Emission data.
}

For each parameter editable in the \GREATER\ dialogs a ''Details'' box provides
further information on the meaning of the parameter, the type of parameter
and potential warning and error ranges. In the also a comment can be entered 
and if available a default can be set. Finally if a parameter can be
considered as distributed the distribution dialog can be raised.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/substance-dlg-identification.eps}}
{Substance Dialog \label{FIGsubstanceDialog}}
\end{center}

As \GREATER\ also considers three plant types in the easiest 
{\em WWTP} 
sub-model, the related elimination rates have to be entered. All other
parameters are related to higher model modes. This also means that in-sewer
removal is not considered in mode one. To work with in-sewer removal, set 
the sewer sub-model mode to mode two (related dialog is mentioned later 
in this tutorial) and enter an elimination rate.

Please note that the plant types currently related to the treatment
plant in the various catchments delivered with \GREATER\
always consider a primary settler as the first step in sewage treatment. 
If you only have an overall elimination rate for a plant or one explicitly
without a primary settler, set the related rate to zero and
enter the known elimination rate for the plant type in question.

The WWTP removal card also gives hints on another fundamental \GREATER\
concept (if you have selected the sample LAS substance data set). 
As described in the briefly under the basic concepts, the \GREATER\ models 
perform a
stochastic simulation set on top of a deterministic model by the Monte-Carlo
method. This covers the variations within the catchment's hydrological 
regime but also considers other parameters. I.e. for the selected parameter
it is possible to specify a distribution. This can be either normal,
logarithmic normal or uniform. Depending on the selected distribution
a set of values has to be entered to describe the distribution.

These can be edited manually by the experienced users but it is recommended to
use the distribution dialog which is invoked by the 
\menuitem{Edit Distribution} button.
Leaving the distribution dialog you may recognize that distributions
are coded by the descriptive values separated by a semicolon.
  
\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/distribution-dlg.eps}}
{Distribution Dialog \label{FIGsubstanceDialog}}
\end{center}

The {\em River removal} card enables you to control 
the elimination processes within the river.
Only an aggregated first-order elimination
rate is needed for the simplest river fate model. 

The {\em Emission data} card enables you to specify a general 
household consumption value
for the substance. As the consumption values have to be related to both, 
a substance and
a region, the parameter entered in the substance data dialog
is used as a general value. The {\em Edit Emission Data} dialog discussed 
later in this tutorial enables you to specify consumption values for selected 
discharge sites. These consumption values can not be considered as distributed.

Leaving the substance dialog, all substance settings for a first simulation
run are made. 
If you want to learn more about substance data management within
\GREATER\, please refer to the 
User Interface description (chapter \ref{chap:user_interface}):
The menu items invoke functions that are known from various 
applications managing documents, with the difference that they do not work
for the whole data but for a subset of a session, the substance data.
 
\clearpage

\subsection{Editing catchment data}
\parbox[b]{0.15\textwidth}{
\includegraphics[scale=\imagescale]{./screenshots/menu-catchment.eps}}
\hfill
\parbox[b]{0.8\textwidth}{
The catchment data consists mainly of spatial data sets which are not
editable. Data management functions are 
limited to the selection of a new catchment for the current session
and editing of selected attributes.
}

The main 
items of the catchment menu, \menuitem{Edit Emission Data} and 
\menuitem{Edit Discharge-site Data}, are also managed by 
tools: After selection
you can click on the map to choose the discharge site to be edited.

\subsubsection{Edit Emission Data}
The {\em emission data dialog}
enables you to specify site-specific consumption data. 
To cover industrial sites, users can enter an additional input 
into the treatment plant. This input reflects discharges resulting from the
production processes and can be calculated from the production volume.
Please note that the calculation of the fraction of the production volume
which will be released is not part of \GREATER\ but must be calculated
manually by hand before. 
The input considered here is the mass flow into the
treatment plant in [kg/a]. Same as loads from usual consumption 
the industrial input is processed by the treatment plant models. 

\begin{center}
\Fig{\includegraphics[scale=0.45]{./screenshots/editemission-tutorial-dlg.eps}}
{Edit Emission Data Dialog \label{FIGeditMarketData}}
\end{center}

\subsubsection{Edit Discharge Data}
Similar to the emission data on the first view the 
{\em discharge-site data dialog} enables users to modify the parameters 
for a specific treatment plant. I.e. where the emission data dialog lets 
users enter site-specific data to overwrite the general information for
selected discharge, the discharge-site dialog enables users to work on a copy
of the geo-referenced attribute tables.

This covers population, the elimination rate (used for complexity mode
one), the treated fraction of incoming sewage water (e.g. bypass or
overflow) and in general the type of treatment plant. Incoming water 
from separate "sources" is considered : domestic input, non-domestic use
(this covers mainly industrial inputs) and run-off (e.g. from sealed areas).
If only an overall value is available for treatment plants this should be
entered as domestic flow. 

Please note that domestic flow is given in 
[liter / (capita $\cdot$ day)], where non-domestic flow and run-off are
considered as [cubic meter / second]. 

Please note furthermore that it is possible to specify a distribution for a 
general elimination rate, but not for a site-specific elimination rate.
Nevertheless, it is possible to have a distributed elimination rate for,
e.g. activated sludge plants, and a fixed rate for a selected site.
 
\begin{center}
\Fig{\includegraphics[scale=0.45]{./screenshots/editdischargedata-tutorial-dlg.eps}}
{Edit Discharge-Site Data Dialog \label{FIGeditDischargesiteData}}
\end{center}

\section{Environmental Data}

\parbox[b]{0.15\textwidth}{
\includegraphics[scale=\imagescale]{./screenshots/menu-environment.eps}}
\hfill
\parbox[b]{0.8\textwidth}{
Not all parameters needed by the \GREATER\ Models are related to the substance
or the geographic data. These are grouped under ''Environmental Data'' and
cover some general data of the compartments under investigation and some
correlation data. 
}
The menu provides management functionalities similar to the features under
the substance menu.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/editenvironmentparameters-dlg-environment.eps}}
{Edit Environmental Data Dialog \label{FIGeditEnvironmentalData}}
\end{center}

\section{Running a simulation}

\TutorialStep{
We are now entering the 
\menuitem{Simulation} menu. This menu covers a further dialog on entering 
model specific parameters.
}

\parbox[b]{0.15\textwidth}{
\includegraphics[scale=\imagescale]{./screenshots/menu-simulation.eps}}
\hfill
\parbox[b]{0.8\textwidth}{
The {\em Edit Model Parameters} allows you to enter the number of Monte-Carlo
shots and an optional offset concentration and select the complexity modes for
the three sub-models: sewer, WWTP (activated sludge and trickling filter)
and river. A text field provides some hints on the available modes. 
}

If you change complexity modes,
it is usually necessary to go back to earlier data dialogs to enter
additional parameters. E.g. if you need in-sewer removal to be 
considered, you have to go back to the substance data dialog to 
enter a removal rate for sewers (if not entered already). 
Please note that in-sewer removal is the only higher model in which
only one parameter has to be entered. All other sub-models require 
a somewhat larger data set. 

\TutorialStep{
As mentioned earlier, \GREATER\ uses the Monte-Carlo method to set a
stochastic approach on top of a deterministic model. The number of Monte-Carlo
shots performed during a simulation also has to be entered within the
{\em Edit Model Parameters} dialog. 
For a sample application take thousand shots.
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/editmodelparameters-dlg-general.eps}}
{Edit Model Parameters Dialog \label{FIGmodelSelection}}
\end{center}

{\em Offset Concentrations} are included to consider additional loads
within the river network which might be monitored upstream from
the first known
discharge. Note that the given value is used as it is and 
is only added to the 
model results after the simulation. The offset concentration is not
considered within the elimination processes. 

\subsection{Missing Parameters}

\GREATER\ supports the user with an enhanced framework to identify missing 
parameters according to the current model selection: A dialog lists all missing
parameters and in the parameter entry dialogs all required parameters are
marked with a cross.

\TutorialStep{
Change the river model to mode 2 (basic removal processes).
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/editmodelparameters-dlg-river2.eps}}
{Model Parameters Dialog - River Model Selection}
\end{center}

\pagebreak

\TutorialStep{
After editing the model selection the availability of data for the current
model selection can be check with \menuitem{Simulation} / 
\menuitem{Missing Parameters?} In case a list of missing parameters is
displayed, grouped by parameter type and dialog cards.
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/missingparameters-dlg.eps}}
{Missing Parameters Dialog \label{FIGmissingParameters}}
\end{center}

\pagebreak

\TutorialStep{Open the {\em Edit Substance Data} dialog again
(\menuitem{Substance} / \menuitem{Edit}) and select the card 
{\em River Removal}: Now the three removal rates $k_{deg}$ (Degradation), 
$k_{sed}$ (Sedimentation) and $k_{vol}$ (Volatilization) are marked with a 
cross according to the new model selection.}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/required-parameters-river2.eps}}
{Required Parameters River Model Mode 2 - River Removal\label{FIGrequiredParametersRiver2}}
\end{center}

Please note that when selecting the card {\em Phys. Chem. Properties}
the unknown value $K_{OC}$ is marked as required although it was not listed 
under the missing parameters. The reason is that the river model includes an
estimate function for the $K_d$ based on the $K_{OC}$. If neither main value
nor some parameters used in estimate functions is available, the main value is 
listed as missed. In turn, if in our example the $K_{OC}$ would be well
defined, the $K_d$ would not be listed as missed. 

Please refer to the model description for available estimate functions
implemented in the various models.

\TutorialStep{
Change back the river model mode to mode 1 after trying the ''Missing
Parameters'' tool.
}

\pagebreak

\subsection{Start a Simulation}
\TutorialStep{
You are now able to {\em start a simulation}. Select the
\menuitem{Simulation} / \menuitem{Start} item.
A new window appears, displaying the progress
of the simulation:
}

\begin{center}
\Fig{{\includegraphics[scale=\imagescale]{./screenshots/startsimulation-tutorial.eps}}}
{Running simulation on Calder catchment \label{FIGsimulation}}
\end{center}

A running simulation can be canceled pressing the \menuitem{Cancel} button.

\clearpage

\TutorialStep{
After the simulation has finished, the results will be
displayed on the session's map:
The river stretches on the session's map will be colored depending on the
model results. A new layer is visible in the legend 
entitled
{\em Csim Mean [}unit{\em ]}. Csim stands for {\em simulated concentration}
(in contrast to {\em monitored concentration}), {\em mean}
identifies that the mean value of the concentration distribution per
stretch, resulting from the Monte-Carlo method, is displayed. More
specifically, the mean values of the C$_{sim, internal}$ 
are displayed. Please refer
to the model description to learn more about the various result outputs 
of the \GREATER\ model system.
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-results.eps}}
{Visualization of simulation results for the Calder catchment 
\label{FIGsimulationResults}}
\end{center}

\clearpage

\section{Saving a session}
\TutorialStep{
Before proceeding to analyze the model results it is advisable to return
to the beginning, the \menuitem{File} menu, to save the session:
select \menuitem{Save} from the menu: all session settings and the model
results will be saved. The status bar modification information changes from 
''modified'' to ''unmodified'', which also identifies the successful saving.
}

The \GREATER\ user interface provides users with two options to save
session data: {\em save} and {\em save as}.

\paragraph{Save} writes all data from the current session to the 
database and lets you proceed with the current session.

\paragraph{Save As} works slightly differently. 
First you have to specify a new
name for the session and optionally enter a new comment and change privileges.
Since sessions are mainly identified by their names unique
names are recommended. After saving, the new session is the current session.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-save-as.eps}}
{Save As Dialog \label{FIGsaveAs}}
\end{center}

\section{Analyzing model results}

\parbox{0.15\textwidth}{
\includegraphics[scale=\imagescale]{./screenshots/menu-analysis.eps}}
\hfill
\parbox{0.75\textwidth}{
\colorbox{stepBackground}{\parbox{0.7\textwidth}{
After having calculated the results of a model 
\GREATER\ provides you with various
options to analyze the data: As \GREATER\ results are frequency 
distributions of concentrations for river stretches you have the 
option to {\em calculate percentiles}. Additionally the menu provides you
with features to modify the presentation of results: either 
by {\em classification}
or a color coded {\em combination of concentrations with flows}. 
Since \GREATER\ was designed as a tool in the process of risk assessment,
the main items of the analysis are the functions to calculate PEC values
(Predicted Environmental Concentration).

Please note that the \GREATER\ analysis tools are designed to analyze 
distributions of values. Although it is possible to run a simulation with one 
Monte-Carlo shot probably the analysis functions will fail applied to 
this simulation results.
}}} 

\subsection{Background data}

The first analysis tool in the menu is visual and provides access on 
various background layers for a better orientation. 

\TutorialStep{Select \menuitem{Add Background Layers}. A dialog is opened
presenting all available background data for the current catchment. 

Choose 
''Populated Places'', ''Railroads'' and ''Roads''
to be displayed and leave the dialog with ''OK''.
}

\begin{center}
\Fig{{\includegraphics[scale=\imagescale]{./screenshots/add-background-dlg.eps}}}
{Add Background Layers Dialog \label{FIGaddBackgroundLayers}}
\end{center}

\TutorialStep{Three new layers are added to the map displaying the UK populated
places, railroads and roads.}

\begin{center}
\Fig{{\includegraphics[scale=0.55]{./screenshots/tutorial-calder-with-bg.eps}}}
{Calder Catchment with background data \label{FIGcalderWithBackground}}
\end{center}

\TutorialStep{
The monitoring programs undertaken in the pilot areas of 
{\scshape GREAT-ER 1.0} form an integral part of the {\scshape GREAT-ER}
project. The data obtained are stored as geo-referenced data (i.e. monitoring
sites with monitoring data as attributes) within the \GREATER\ database. To
display these data select again \menuitem{Add Background Layers} and choose
''River Monitoring''.

Again a new layer is added to the map (with grey circles). These represent 
the monitoring sites, attributes can be obtained by the {\em identify tool}
or by {\em showing the layers attribute table}.}

\begin{center}
\Fig{{\includegraphics[scale=0.55]{./screenshots/tutorial-monitoring-data.eps}}}
{Calder Catchment with monitoring data \label{FIGcalderWithMonitoring}}
\end{center}



\subsection{PEC Calculations}
As GREAT-ER 1.0 introduced a novel method to estimate environmental
concentrations (calculations are made on real-world data instead of 
large-scale generic data sets) with frequency distributions, the calculation
of PEC values must be different from the known methods.

The methods the PEC values calculations of \GREATER\ are based on published
methods (see Boeije et al, 1999).
Not just one but a collection
of values are provided to characterize the different aspects of exposure in
river catchments
The are split into two categories: 
{\em PEC$_{initial}$} and 
{\em PEC$_{catchment}$}. 

\paragraph{PEC$_{initial}$} is the spatial aggregation of concentrations in
the river directly after emission. This is similar to PEC$_{local}$ as
defined in the EU Technical Guidance Documents, although its calculation is
different. Based on the C$_{sim, start}$ mean values, 
the mean is calculated for
all stretches receiving treated or untreated discharges:
\begin{displaymath}
PEC_{initial} = 
\frac{\sum_i^n C_{sim, start, i}}
	{n}
\end{displaymath}
C$_{sim, start, i}$ is the concentration at the beginning of 
river stretch $i$, directly receiving treated or untreated waste 
water emissions. 

\TutorialStep{
By definition, the PEC$_{initial}$ is calculated on the base of the 
C$_{sim, start}$ mean values. 
Selecting the item \menuitem{PECinitial} the calculation starts.

A dialog displays the analysis results with some further information.
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/pecinitial-dlg.eps}}
{PEC$_{initial}$ calculation results \label{FIGPECinitial}}
\end{center}

\pagebreak

\paragraph{PEC$_{catchment}$} is the average of representative concentrations
over the entire catchment. 
This is a new concept for
geo-referenced exposure assessment, although there is some analogy with the 
PEC$_{regional}$ in the EU Technical Guidance Documents.

The ''most representative'' value for the concentration in the stretch is
taken as C$_{sim, internal}$ 
(the average concentration for the stretch). 
However, different approaches could be used and in order to demonstrate 
the effect of using different possible definitions, \GREATER\ computes 
different
different PEC$_{catchment}$ values.
These values differ in the set of stretches selected for the calculation
and in the weighting of concentrations. 

All PEC$_{catchment}$ values are defined as the mean of the weighted
concentrations of the selected stretches. Possible selections are (A) all
stretches within a catchment or (B) only polluted stretches. Option (A) is
more comparable to the current regional exposure assessment approach
(unit world models) in which all surface waters in a region are considered
for the dilution of the chemical mass loading. Clearly different, option (B)
considers only the loaded river stretches. The intention of this
approach in the meaning of risk assessment is to focus on the river
stretches potentially at risk: the loaded stretches.

Both approaches have to deal with different issues concerning scale
dependencies or data requirements. These items are discussed in the referred
article.

\begin{itemize}
\item[1.] {\bf Weighting by stretch volume} for both stretch selections.
	The volume is calculated (assuming a rectangular cross section) by	
	flow, flow velocity and length. The weighting method focuses on
	large rivers and therefore on high dilution situations where
	exposure (and risk) levels may be lower than the representative
	rate for the entire catchment.

%	Not agreed by the core group, this technically possible weighting is 
%	drawn out.
%\item[2.] {\bf Weighting by inverse stretch volume} considering both 
%	stretch selections
%	stands in contrast to the previous method. This approach 
%	focuses on the small rivers with low dilution and therefore on 
%	the often more valuable and vulnerable stretches. The resulting
%	risk assessment signs may be higher than representative rate for
%	the entire catchment and are on the level of local values.
  
\item[2.] {\bf Weighting by stretch length} for both stretch selections. 
	The interpretation of the weighting method is that stretches with 
	equal length are of equal importance. Small rivers are considered 
	to be equally valuable as large rivers.
\end{itemize}

Methods 1 and 2 depend on the scale and detail of the underlying
digital river network, and the more (unpolluted) headwaters are included, the
lower the aggregated PEC$_{catchment}$ will be. Conversely, in a
low detailed river network, small (and possibly more valuable) stretches
are neglected. 

\begin{itemize}
\item[3.] {\bf Weighting by flow increment} considers all stretches within a
	catchment.
	The weighting of a stretch is calculated by the difference of flow in
	relation to its upstream stretch (two stretches in the case of a
	confluence). Thus the values related to stretches are similar 
	to those in 
	weighting by length. A slight accentuation might be given to
	receiving stretches because, besides the natural flow increment,
	these are artificially influenced by the waste water flow.

	The initial stretch of a river is considered with its complete flow
	(there is no longer an upstream stretch and thus the increment is the
	flow). If these stretches are unpolluted, the weighting method is
	more or less independent of the scale of detail of the digital 
	river network: no matter how detailed rivers are digitized, 
	the flow of a given stretch can be considered as the sum of all its
	upstream stretches and therefore the stretch representing the
	headwaters is of the same value as all stretches regarded
	separately.	
\end{itemize} 

\TutorialStep{
The PEC$_{Catchment}$ is based on the C$_{sim, internal}$ mean value.
The calculation is started by selecting the item \menuitem{PEC Catchment}.

A dialog displays the analysis results with some further information.
}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/peccatchment-dlg.eps}}
{PEC$_{catchment}$ calculation results \label{FIGPECcatchment}}
\end{center}

\clearpage

\subsection{Risk Analysis}

A new analysis tool introduced with \GREATER\ is the {\em Risk Analysis} tool.

\TutorialStep{
The risk analysis tool (available via 
\menuitem{Analysis} / \menuitem {Risk Analysis}) calculates the ratio of 
C$_{sim, internal}$ mean value and the substance specific predicted no 
effect concentration ({\em PNEC}, see card {\em Risk Assessment} of substance
dialog). 

The analysis results in a new map layer with two classes displaying the river
stretches with a ratio greater than 1.0 and with less or equal 1.0.
}

If no PNEC value is available you are asked first to enter a value in the
substance dialog.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-riskanalysis.eps}}
{Risk Analysis results \label{FIGPECcatchment}}
\end{center}

\clearpage

\subsection{Mass Flux}

\TutorialStep{

Selecting menu item \menuitem{Analysis} / \menuitem{Mass Flux} or 
corresponding tool bar button the mass flux tool is activated.
It allows you to retrieve the mass flux for a selected stretch based on
the mean flow ($Q_{mean}$) and the $C_{sim, end}$ mean value.

This tool is helpful if single values have to be taken over into 
other applications.
}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/tutorial-massflux.eps}}{
     Mass Flux}
\end{center}

\clearpage 

\subsection{Concentration Profiles}

The {\em Concentration Profile} provides a tool to sample C$_{sim, internal}$ 
mean values from a selected stretch downstream to the root of the catchment.
The sampled values are displayed in a diagram plotted against river kilometers.

\TutorialStep{
Activate the {\em Concentration Profile} from the tool bar and select 
with the pointer a river stretch from the map. 
The stretches considered for he sampling are highlighted in the map and 
the sampled C$_{sim, internal}$ mean values are displayed in a xy-plot.}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-concentrationprofile.eps}}
{Concentration Profile\label{FIGconcentrationProfile}}
\end{center}

The xy-plot intends to give you a first impression of the concentration
profile. For further analysis and enhanced diagrams the sampled data can be
exported to be processed with the spreadsheet of your choice:
\begin{itemize}
	\item Running the concentration profile tool a temporary table 
		is derived collecting the records of sampled river stretches.
		Such tables are named applying a 
		{\tt\small Concentration Profile (start stretch <stretch num>)} 
		scheme.

	\item A table can be shown using the \menuitem{Table} / \menuitem{Show}
		menu item: Select the tables to be shown and confirm with OK.
		A new windows is opened showing the table contents.

	\item The table does not only display the river kilometers and 
		C$_{sim, internal}$ mean values but the basic results and 
		all additional analysis results (percentiles, risk analysis)
		derived so far.

	\item Applying the {\em Export} button in the upper right corner of the	
		table window the data can be exported as \em{comma separated
		values} (CSV) or dBase file (DBF), both convenient to be
		imported into a spreadsheet.
\end{itemize}

\begin{center}
\Fig{\includegraphics[scale=0.5]{./screenshots/tutorial-tableview.eps}}
{Concentration Profile Table with Export\label{FIGconcentrationProfileTable}}
\end{center}

An even more enhanced option is provided by joining further data 
on the sampled table before export, e.g. the table of 
discharge sites:	
\begin{itemize}
	\item Select \menuitem{Table} / \menuitem{Join}. A dialog is opened 
		allowing you to specify the two tables to be joined and the two
		fields the join has to be based on.
\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-join-dlg.eps}}
{Join Dialog\label{FIGjoin}}
\end{center}

	\item Specify the concentration profile table (which has been derived
		earlier) as the left table and 
		the ''Join of DISCHARGES and Discharge Attributes'' 
		(which contains the necessary identification data and
		attributes) as the right.

	\item Both tables should be joined on their {\tt\small stretch\_id}
		field.

	\item By default a join results in a new table with only those records
		which could be joined based on the selected field successfully.
		This would result in a table with only those river stretches 
		directly receiving a discharge.

	\item Since we are interested in all sampled river stretches with the
		discharge data as additional information we select the check
		button {\tt\small Outer Join}, which preserves all records from
		the left table and leave fields from the right table empty 
		where no matches are found.

	\item Pressing the {\tt\small Join} button a new table window is 
		opened. The results of the join can now be exported for further
		processing.
\end{itemize}

\clearpage

\TutorialStep{
For additional analysis concepts see the chapters below and the \Thuban\ Manual.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{./screenshots/tutorial-fullcalder.eps}}
{Projected Calder Catchment with Background and Monitoring Data\label{FIGfull}}
\end{center}
}

% \section{Addit\begin{center}
% 
% \Fig{\includegraphics[scale=\imagescale]{./screenshots/missing.eps}}
% {Display Menu \label{FIGmenuDisplay}}
% 
% \TutorialStep{
% The monitoring programmes in the pilot areas represents a large part 
% of \GREATER. These should also be mentioned in the tutorial:
% The monitoring data are stored as geo-referenced data (i.e. monitoring
% sites with monitoring data as attributes). To diplay these data on the
% view, select the item \menuitem{Display} / \menuitem{Add Background Data}.
% A dialog will present a list of all background data available for the
% active session. Monitoring data will also be available amoung these.}
% 
% \begin{center}
% \Fig{\includegraphics[scale=\imagescale]{./screenshots/missing.eps}}
% {Select Background Data Dialog \label{FIGbackgroundData}}
% \end{center}
% 
% \TutorialStep{
% Select one or more entries (for this tutorial {\tt River Monitoring} and
% {\tt STP FE Monitoring}, FE stands for Flow Effluent) and leave the 
% dialog with "OK". Two new themes are displayed on the view.
% }
% 
% \begin{center}
% \Fig{\includegraphics[scale=0.69]{./screenshots/missing.eps}}
% {Display of Monitoring Sites for Aire Catchment\label{FIGmonitoring}}
% \end{center}
% 
% \TutorialStep{
% Once visualised
% on the view, the monitoring data can be investigated using the identify
% tool. 
% 
% You may also try the other available background data to display 
% more geographic data improving orientation.
% Additional display options are described in Chapter 3.
% }
% 
% \begin{center}
% \Fig{\includegraphics[scale=\imagescale]{./screenshots/missing.eps}}
% {Monitoring Data Identify Dialog\label{FIGidentifyMonitoring}}
% \end{center}

% 
% 
% \newpage
% \section{Data Exchange}
% There are two options to exchange simulation results or complete sessions
% using \GREATER: either to share sessions with other users for further
% discussion or to export results for further analysis or inclusion in 
% other documents.
% 
% The first is supported by providing an export / import
% functionality. Selecting \menuitem{Export}, an export file will be created
% from the directory of the active session. The export file will then
% cover all session settings and additional data derived from the results
% and stored in the session's directory. Please note that the 
% export / import feature  
% does not include geographic data such as river network (due to possible
% licence restrictions). Therefore users have to ensure that they are 
% working on
% equal geographic data sets if they want to exchange (and work with)
% session data.
% Conversely an export file can be selected using the
% \menuitem{Import} item and will then be added as a new session to the
% session database.
% 
% \GREATER\ provides some features for the second task - additional options
% are available by \ArcView\ within the expert mode. The item
% \menuitem{Report} under the \menuitem{\GREATER} menu writes a dump of all
% session data and all results to a specified file. Requested
% parts can be abstracted from this using a common text editor. 
% The second option is
% to export a concentration profile for a selected river from a catchment:
% by selecting \menuitem{Analysis} / \menuitem{Concentration Profile} a tool
% will be activated. You have to select a stretch by clicking on the view.
% Moving downstream the C$_{sim, internal}$ values are collected per
% stretch. The collection will be displayed in a simple X/Y-profile.
% Because the chart display options of \ArcView\ are quite limited you have
% the option to export the profile data to create a smarter presentation
% using your favourite data plotting or spreadsheet program.
% 
% Additionally, it should be mentioned that the full set of simulation
% results are stored under the session directory within the files
% {\sl \ttfamily Csim.dbf} (river) and {\sl \ttfamily CsimSTP.dbf}
% (treatment plants). You may use {\em copies} of these files to further
% analyse the data.
% 
% Other options are available under \ArcView\ in the expert mode. The most
% important function might be to export the resulting visualisation onto 
% a map by colouring
% the river stretches. This can be done quite comfortably using the
% \ArcView\ {\em layout} capabilities (mentioned above under section
% \GREATER\ and \ArcView).

