%vim:set tw=68:
\documentclass[a4paper,11pt,oneside,openright,titlepage]{scrbook}
\usepackage{lastpage}
\usepackage[latin1]{inputenc}
\usepackage{color}
\usepackage{graphicx}
\usepackage{times}
\usepackage{fancyhdr}
\usepackage{natbib}
\usepackage{mdwlist}
\usepackage{sty/Manual}
\usepackage{wasysym}


%----------------------------------------------
% Document DATE and VERSION
% set these values when releasing a new version

\newcommand{\documentdate}{21. December, 2011}
\newcommand{\documentversion}{1.0.3}
\newcommand{\softwareversion}{GREAT-ER 3.0.0}
\newcommand{\documentID}{}
\newcommand{\documentname}{GREAT-ER Desktop Manual}

\definecolor{stepBackground}{gray}{0.8}

%
% Use this during writing, to make the content visible in xdvi (would be
% a black box otherwise): 
%\renewcommand{\TutorialStep}[1]%
%{
%	\begin{center}
%	\fbox{\parbox{0.95\textwidth}{#1}}
%	\end{center}
%}

\newcommand{\imagescale}{0.6}


\begin{document}

%-----------------------------------
% define header/footer
% The settings here are for single page documents (only odd page set)

% for some pages latex switches back to pagestyle plain :-(
\fancypagestyle{plain}{%
	\fancyhf{} % clear all header and footer fields
	\fancyhead[RO,LE]{\footnotesize GREAT-ER 3.0 \documentname \\ \leftmark}
	\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
	\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
	% set the document title for the footer here!
	\fancyfoot[LO,RE]{\footnotesize \documentdate 
	\\\documentID}
	\renewcommand{\footrulewidth}{0.4pt}
}

% and now define pagestyle fancy
\fancyhead{} % clear all fields
\fancyhead[RO,LE]{\footnotesize GREAT-ER 3.0 \documentname \\ \leftmark}
\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
% set the document title for the footer here!
\fancyfoot[LO,RE]{\footnotesize \documentdate 
\\\documentID}

\renewcommand{\footrulewidth}{0.4pt}

\pagestyle{fancy}

%-----------------------------------

\parindent0cm

% TITLE PAGE
{

% Icon
\includegraphics[width=\textwidth]{artwork/great-er3_0-title}\\[4.5cm]

% Title
\begin{center}
	\sffamily\bfseries\Large 
    \Huge \documentname \\[5.5cm]
\end{center}
}
\thispagestyle{empty}

\vfill

% Author
{\sffamily\small
\begin{tabular}{p{0.3\textwidth}p{0.3\textwidth}p{0.3\textwidth}}
	\includegraphics[width=0.3\textwidth]{/home/intevation/logos/intevation/intevation-logo}
&
\parbox[b]{0.3\textwidth}{
Intevation GmbH\\
Neuer Graben 17\\
49074 Osnabrück\\
Germany\\
www.intevation.de
}
&
{\sffamily\small
\documentdate
}
\end{tabular}
}



\newpage

\vfill

This document has been designed with \LaTeX{}.
It is available as source code, PDF- and HTML-format.\\

Version: \documentversion \\
Date: \documentdate \\
Authors: Jan-Oliver Wagner $\cdot$ Frank Koormann

\vfill

Related documents:
\begin{itemize}
\item Thuban Manual, \\Intevation GmbH, 2011
\item GREAT-ER III Installation Manual, \\Intevation GmbH, 2011
\item GREAT-ER III Administration, \\TechniData AG, 2003
\end{itemize}
\vfill

\vfill

\begin{center}Copyright (c) 2002 - 2011 Intevation GmbH.\end{center}

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.

\tableofcontents

\chapter{Installation}
\label{chap:installation}
{\bf For the installation of \GREATER\ under Microsoft Windows an installer is
provided performing all required steps. Please refer to the 
{\em GREAT-ER III Installation Manual} for details.
}

The section below lists the requirements for \GREATER\ if you want to
install it on other platforms like GNU/Linux. 

\section{Requirements}

\GREATER\ is implemented in Python and makes use of various Free Software
add-ons to this programming language. See the {\tt\small README} files
of the packages {\sffamily GREAT-ER}, {\sffamily GREAT-ERModel}, 
{\sffamily GREAT-ER-DB}, {\sffamily dagreater} and {\sffamily Thuban} for details. 
In conclusion are required:
\begin{itemize}
	\item Python\footnote{\tt http://www.python.org} 
		(version 2.7 or higher)
	\item wxPython\footnote{\tt http://www.wxpython.org} 
		(version 2.8.12, this implies a wxWindows of the same version)
	\item proj\footnote{\tt http://proj.osgeo.org/} (version 4.7.0 or highter)
	\item Python Numeric Package\footnote{\tt http://numpy.sourceforge.net} 
		(version 1.6.1)
	\item Python Imaging 
		Library\footnote{\tt http://www.pythonware.com/products/pil/} 
		(PIL, version 1.1.7)
	\item ReportLab\footnote{\tt http://reportlab.sourceforge.net/} 
		(version 2.5)
	\item Twisted\footnote{\tt http://twistedmatrix.com/} (version 1.0.0)
	\item PostgreSQL 9.0.4 client libraries.
\end{itemize}

\section{Installation without installer package\label{setup}}
\begin{enumerate}
	\item Install Thuban so that the thubaninit module is on 
		Python's module path. One way to do that is to use the 
		{\tt\small python setup.py install\_local} 
		command to build Thuban and to add the directory
   		containing the Thuban sources to the PYTHONPATH 
		environment variable.

	\item Put the packages GREAT-ER-DB, GREAT-ERModel and 
	GREAT-ER into the same directory.

	\item Build GREAT-ER-DB (see {\tt\small GREAT-ER-DB/README} for
			details).
\end{enumerate}

\include{greater-tutorial}

\chapter{User Interface}
\label{chap:user_interface}

The chapter ''User Interface'' describes the functionality of the current 
version (\softwareversion) of the \GREATER\ Client. 

\section{Main Window}

The main window is the core of the \GREATER\ Client, it consists of the 
Title Bar, Menu Bar, Tool Bar, Map and Status Bar.

\begin{center}
\Fig{\includegraphics[width=\textwidth]{screenshots/mainwindow-elements}}{
     \GREATER\ Main Window}
\end{center}

\subsection{Title Bar}

If you have already a open simulation session in your user client, 
the title bar shows some information to identify the session: 
{\sl session name - substance - catchment}.

\subsection{Menu Bar}

The menu bar provides access to the various actions needed to perform a
simulation (i.e. session management, substance editing, catchment selection,
etc.). Depending on the current status of a simulation session menu items 
are enabled or disabled (grayed out).

\subsection{Tool Bar}

The tool bar covers first some self-explaining buttons to navigate on the
geographic data displayed on the map. The last five buttons provide 
\GREATER\ specific tools to
edit the market data and discharge data by selecting discharge points on the
map as well as analysis functions. 
These features are also available via the 'Catchment'-Menu and the 
'Analysis'-Menu respectively.

\subsection{Map}

If already specified the map displays the catchment area: river network,
discharge points and catchment boundary. Further map layers and the result
data will be added in the future development phases of the \GREATER\ client.

\subsection{Legend}

The legend describes the map contents and provides control over the 
layer appearances (colors, line width, classification, order).

If a sufficient projection information is available, the legend also displays a
scale bar to illustrate distance relations on the map.

\subsection{Status Bar}

The status bar is split into three sections: The first section displays either
the map coordinates related to the mouse pointer position or if browsing
through the menu bar small help texts on the highlighted menu items. 
The second section provides information on the status of the 
database connection: If connected the user-name used for the authentication
is displayed along with the users' group. 
The third section indicates if there are unsaved modifications for the current
session.

\clearpage

\section{Menu \underline{F}ile}

\subsection{\underline{A}uthenticate}

This menu item is available if no database connection is established.
A dialog for setting up connection to a \GREATER\ database
allows to enter database, user-name and password for the
authentication process. If you don't have
an account yet, please read section \ref{setup}.\\

\begin{center}
\Fig{\includegraphics[width=4cm]{screenshots/authenticate-dlg}}{
     Authentication Dialog}
\end{center}

Successful authentication will activate availability of
menu items now reasonable for further operations, namely
the session management (New, Open, Save As and Delete).
Also, the Authenticate menu item is disabled and connection
information are added to the session info-tree.
Furthermore, a local simulation server is started as a background
process to allow simulations without connecting to a remote
server, see section \ref{subsec:serverselection} for configuration options.

The database connection can be closed via the menu item
Disconnect and is automatically
closed when the \GREATER\ application is closed (e.g. via menu item Exit).

\subsection{\underline{D}isconnect}

Once a database connection has been established, this menu
item is active. It will close the current session and then
disconnect from the database.
If the session is modified, the user is offered an option to save the 
modifications before disconnecting from the database.

\subsection{\underline{N}ew Session}

The menu item is enabled once a database connection is established.
The Edit Session-Dialog (see section \ref{editsession}) is raised
to enter the session's name, substance and catchment and comment.
All but the name is optional and can also be specified later.

If a session is open with unsaved modifications the user
is offered a dialog to save the session before creating a new one.

\subsection{\underline{O}pen Session \label{opensession}}

This menu item is enabled if a database connection has been
established (via Authenticate). The dialog that appears
is separated into two areas: on the left a list is presented
containing all available sessions, public and personal ones.

In the right area, additional information on the currently
selected scenario is displayed: substance and catchment name
as well as the session comment. Furthermore, the access rights
are shown with the owner of the session, his group and the
privileges for the session. Sessions without the privileges
for you to at least view them are not listed.

To load a session, either hit the OK button or double-click
on the session name.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/opensession-dlg}}{
     Open Session Dialog}
\end{center}

If the previously loaded session was modified but not saved,
a dialog is raised to allow saving of the previous session.

If no sessions are found in the database, the user is
notified accordingly with a simple message dialog.
The user should start with a new session.

\pagebreak

\subsection{\underline{E}dit Session \label{editsession}}

If there is a current session, this menu item is enabled.
A dialog is raised to modify the session's name, substance,
catchment, comment and privileges.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editsession-dlg}}{
     Edit Session Dialog}
\end{center}

The changes are not stored in the database unless a
Save Session operation is performed.

The substance and catchment can alternatively be changed
in the corresponding menus. Those dialogs show more
details on the actual substance or catchment during the selection.

\subsection{\underline{S}ave Session}

This item is enabled if there is an open session and it
has been modified. All session data in the database
will be overwritten with the current session without further request.

{\bf Note,} that when saving a session, your ID will be applied
overwriting the user ID of the previous owner.

Saving a session may fail for two reasons:

\begin{enumerate}
\item	You don't have the permission to write.\newline
		This happens if you opened a session where you have only
		privileges to view. In this case, use 'Save Session As' 
		to create your own copy.
\item	Another user opened the same session and saved it meanwhile.
		In this case, use 'Save Session As' to create your own copy.
\end{enumerate}

\subsection{Sa\underline{v}e Session As}

If a session has been opened this menu item is enabled and
allows to store the current session separate from the
original session.

{\bf Note}, that the new session will be the one which will be 
loaded in the client after a 'Save Session As'.

A dialog similar to the Edit Session dialog
(see section \ref{editsession}) is raised
allowing to change name,
comment and privileges of the session so that it can be distinguished
from the original one.

{\bf Note,} that the session's name
does not need to be unique in the database and hence multiple
sessions with the same name may exist.
You should avoid this situation by specifying different names.

\subsection{\underline{C}lose Session}

This menu item is always active if there is an open session.

If the current session is modified, the user is offered the option 
to save the changes before actually closing the session.

\subsection{\underline{D}elete Session}

This option is always available with an established database connection.

A dialog similar as for Open Session (see section \ref{opensession}
is opened allowing to select
the session that should be removed from the database.

After selection, the user is required to confirm the action.

% \subsection{Show Session \underline{T}ree}
% 
% This item is enabled when the session tree
% window is currently closed. It will be reopened
% and show detailed information on the current session.
% 
% \begin{center}
% \Fig{\includegraphics[scale=\imagescale]{screenshots/sessioninfotree-win}}{
%      Session Tree Window}{Session Tree Window}
% \end{center}
% 
% This dialog addresses more advanced users and intends to provide
% a structured overview and more systematic insight for the current session.
% 
% The window can be closed whenever wished. Its contents are
% automatically updated for any relevant change.

\subsection{E\underline{x}it}

This item is always enabled and will quit the application.
If the current session is not saved, a dialog is raised
to do so now.

\clearpage

\section{Menu \underline{S}ubstance}

The Substance Menu provides access to the substance data. 
The menu items 'New', 'Open' and 'Delete' are enabled if a database connection 
has been established and a session has been open or newly started. The 'Edit'
and 'Save As' items are only enabled if the session already contains
substance data.

\subsection{\underline{N}ew}

The Edit Substance-Dialog (see section \ref{editsubstance}) is raised
to enter the substance name, comment and its various parameters.
All but the name is optional and can also be specified later.

If the open session already contains substance data a warning 
dialog will be raised.

{\bf Note}, that adding a new substance implies to delete all 
market and result data as well as user-defined discharge data from the
current session since they 
potentially don't have a valid link to the session data with 
the new substance data.

\subsection{\underline{O}pen \label{opensubstance}}

The dialog that appears is separated into two areas:
on the left a list is presented
containing all available substances.

In the right area, the comment on the highlighted
substance is displayed together with owner and privileges.

To load a substance, either hit the OK button or double-click
on the substance name.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/opensubstance-dlg}}{
     Open Substance Dialog}
\end{center}

If the previously loaded substance was modified but not saved,
a dialog is raised to allow saving of the previous substance.

If no substances are found in the database, the user is
notified accordingly with a simple message dialog.
The user should start with a new substance.

{\bf Note}, that opening another substance data set implies to delete 
all 
market and result data as well as user-defined discharge data from the
current session since they potentially don't have a 
valid link to the session data with the new substance data.

\subsection{\underline{E}dit \label{editsubstance}}

This action is only available if a substance has been selected.

A dialog is opened for entering all properties of the
substance. See section \ref{sciparamgui} to read
more on how entering scientific parameters are supported
by the graphical user interface.

The substance data are separated into various sections
{\bf note,} that the structure and contents is defined in the database
and may have been changed by the database administrator):

\paragraph{Identification}

The substance name, CAS and EINECS number and additional synonyms
can be specified to aid identification. The substance name is obligatory,
all other parameters are optional.

\newcommand{\substanceimagescale}{0.4}
\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/substance-dlg-identification}}{
     Edit Substance Dialog, page Identification
}
\end{center}

\pagebreak

\paragraph{Physico-chemical Properties}

General physico-chemical properties can be edited on this page.
More process-specific physico-chemical parameters are placed on
the related pages.

\begin{center}
\Fig{\includegraphics[scale=0.4]{screenshots/substance-dlg-physicochemical}}{
     Edit Substance Dialog, page Physico-chemical Parameters
}
\end{center}

\paragraph{Partitioning}

The necessity of declaring partitioning coefficients depends on the selected
model.

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-partitioning}}{
     Edit Substance Dialog, page Partitioning
}
\end{center}

\pagebreak

\paragraph{WWTP Removal}

Depending on the selected models various parameters have to be
entered to describe the substance fate in sewers and the different
treatment plants.

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-wwtpremoval}}{
     Edit Substance Dialog, page WWTP Removal
}
\end{center}

\paragraph{Bio-Degradation}

The bio-degradation page covers some very specific parameters for
bio-degradation kinetics. They are required for WWTP and river models.
See the model's technical documentation
for a more detailed explanation of the parameters.

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-degradation}}{
     Edit Substance Dialog, page Bio-Degradation
}
\end{center}

\paragraph{River Removal}

As with WWTP removal, more or less detailed
elimination rates have to be entered, depending on the selected mode for
the river sub-model.

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-riverremoval}}{
     Edit Substance Dialog, page River Removal}
\end{center}

\paragraph{Emission Data}

You can specify a default domestic consumption (kg per capita and year)
of the substance assumed for any discharge site in the simulation area.

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-emissiondata}}{
     Edit Substance Dialog, page Emission Information}
\end{center}

\paragraph{Risk Assessment}

The card {\em Risk Assessment} contains an entry for the predicted no effect
concentration (PNEC) used in the {\em Risk Analysis} (\menuitem{Analysis}
menu).

\begin{center}
\Fig{\includegraphics[scale=\substanceimagescale]{screenshots/substance-dlg-riskassessment}}{
     Edit Substance Dialog, page Risk Assessment}
\end{center}

\subsection{\underline{S}ave As}

The Save Substance As Dialog is raised allowing to specify the name,
comment and privileges for the new substance entry.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/savesubstanceas-dlg}}{
     Save Substance As Dialog
}
\end{center}

\subsection{\underline{D}elete}

A dialog similar to the Open Substance Dialog (see section \ref{opensubstance})
is raised allowing to
select a Substance from the database to be removed.

\section{Menu \underline{C}atchment}

\subsection{\underline{S}elect}

This menu item is enabled if a database
connection has been established and a session been opened
or newly started.

A dialog is raised where you can select a new catchment for the active
session from the list of catchments in the database.

{\bf Note,} that with a the new catchment selection current 
market and result data as well as user-defined discharge data
will be deleted.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/selectcatchment-dlg}}{
     Select Catchment Dialog}
\end{center}


\pagebreak

\subsection{Edit \underline{E}mission Data}

This menu item is enabled if a database
connection has been established and a session has been opened
or newly started and a catchment been selected.

This command activates the Edit Emission Data tool.
You can now select a discharge site with the mouse pointer
to change its specific consumption and release attributes.

The Edit 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.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editemissiondata-dlg}}{
     Edit Emission Data Dialog}
\end{center}

Please note that in case of an 'unknown' specific value the general 
value will be applied for a simulation\footnote{E.g. for an unknown 
consumption the simulation falls back to the consumption specified under
the Substance Data Dialog}.

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 beforehand.
The input considered here is the mass flow of substance into the
treatment plant in kg/a.
As with the loads from domestic inputs, the industrial input
is subsequently processed by the treatment plant model, if present,
for the selected location.

Leaving the dialog, the Edit Emission Data tool remains active.
Selecting another tool will deactivate it.

\subsection{Edit \underline{D}ischarge Data}

This menu item is enabled if a database
connection has been established and a session been opened
or newly started and a catchment been selected.

This command activates the Edit Discharge Data tool.
You can now select a discharge site with the mouse pointer
to change its specific properties.

Similar to the Edit Emission Data dialog, the Edit Discharge Data dialog
enables users to modify the parameters of a specific treatment plant.

Several site-specific parameters can be changed.
These include population, the elimination rate (used for complexity
modes), 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 also considered such as
domestic input, non-domestic use (this covers mainly industrial
inputs) and runoff.
If only an overall value is available for treatment plants this
should be entered as domestic flow.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editdischargedata-dlg}}{
     Edit Discharge Data Dialog}
\end{center}

Please note that domestic flow is given in liter/(capita*day), where
non-domestic flow and run-off are considered as $m^3/s$.

Please note that in case of an unknown specific values the general 
values will be applied for a simulation\footnote{E.g. for an unknown 
WWTP removal the simulation falls back to the WWTP removal specified under
the Substance Data Dialog}.

Furthermore please note that it is possible to specify a distribution for a
general removal efficiency, but not for a site-specific removal efficiency.
Nevertheless, it is possible to have a distributed general
removal efficiency for e.g. activated sludge plants, and a fixed
rate for a selected site.

Leaving the dialog, the Edit Discharge Data tool remains active.
Selecting another tool will deactivate it.

\clearpage

\section{Menu \underline{E}nvironment}

The Environment Menu provides access to the environment data. 
The menu items 'New', 'Open' and 'Delete' are enabled if a database connection 
has been established and a session has been open or newly started. The 'Edit'
and 'Save As' items are only enabled if the session already contains
environment data.

\subsection{\underline{N}ew}

The Edit Environment-Dialog (see section \ref{editenvironment}) is raised
to enter the environment parameters.

A warning request is raised, that the previous data are lost.

\subsection{\underline{O}pen \label{openenvironment}}

The dialog that appears is separated into two areas:
on the left a list is presented
containing all available environment datasets.

In the right area, the comment on the highlighted
environment dataset is displayed together with owner and privileges.

To load a environment, either hit the OK button or double-click
on the environment name.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/openenvironment-dlg}}{
     Open Environment Dialog}
\end{center}

If the previously loaded environment was modified but not saved,
a dialog is raised to allow saving of the previous environment.

If no environment datasets are found in the database, the user is
notified accordingly with a simple message dialog.
The user should start with a new environment.

\subsection{\underline{E}dit \label{editenvironment}}

The dialog allows the user to edit various environmental data
and specific properties of the sewer, wastewater treatment plant
and river models.
Please refer to the model documentation for more detailed
information on the model's parameters.

% TODO: rename the screenshot to editenvironment-dlg-...

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editenvironmentparameters-dlg-environment}}{
     Edit Environment Dialog - page Environment}
\end{center}

\begin{center}

\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-sewer}}{
     Edit Environment Dialog - page Sewer}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-primary}}{
     Edit Environment Dialog - page Primary settler}
\end{center}

\begin{center}

\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-secondary}}{
     Edit Environment Dialog - page Secondary settler}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-as}}{
     Edit Environment Dialog - page Activated sludge}
\end{center}

\begin{center}

\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-wwtp}}{
     Edit Environment Dialog - page WWTP mass transfer}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editenvironmentparameters-dlg-river}}{
     Edit Environment Dialog - page River}
\\
\end{center}

\subsection{\underline{S}ave As}

The Save Environment As Dialog is raised allowing to specify the name,
comment and privileges for the new environment entry.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/saveenvironmentas-dlg}}{
     Save Environment As Dialog
}
\end{center}

\subsection{\underline{D}elete}

A dialog similar to the Open Environment Dialog
(see section \ref{openenvironment})
is raised allowing to
select a environment from the database to be removed.

\clearpage

\section{Menu S\underline{i}mulation}

This menu provides items for simulation control.
The items are only enabled if there is an active session.

\subsection{Edit \underline{M}odel Parameters} \label{modelparameters}

This dialog allows you to specify the model complexity and execution.
If you increase complexity modes, it may be necessary to go
back to earlier data dialogs to enter additional
parameters. For example, 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. Please note that in-sewer
removal is the only 'higher' model in which only one parameter
has to be entered. All other 'higher' models require a
somewhat larger data set.

Background 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 simply added to the model results
after simulation.
The background concentration is not considered within the
elimination processes.

The concentration has to be entered before running a simulation.
The unit is always mg/L.
After the simulation  the specified  background concentration
will be added to the model results.
If the model results are displayed in a different unit an
automatic conversion will be activated for the background concentration.

A Monte-Carlo-Shot number of 0 is equal to a conventional,
non-stochastic simulation where for all distributed
parameters the mean values are applied.

\begin{center}
\Fig{\includegraphics[scale=0.45]{screenshots/editmodelparameters-dlg-general}}{
     Edit Model Parameters Dialog - page General}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editmodelparameters-dlg-sewer}}{
     Edit Model Parameters Dialog - page Sewer}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editmodelparameters-dlg-as}}{
     Edit Model Parameters Dialog - page Activated Sludge WWTP}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editmodelparameters-dlg-tf}}{
     Edit Model Parameters Dialog - page Trickling Filter WWTP}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editmodelparameters-dlg-river}}{
     Edit Model Parameters Dialog - page River}
\end{center}

\paragraph{Data} The river model can make use of 
\begin{itemize}
	\item generic data from the environmental parameter sets. 
		Use this if you want
		to interactively work with settings like the $f_{OC}$ or the 
		$SS$ concentration. This option has also to be used to 
		work fully functional with the GREAT-ER Sediment Extension
        \ref{greater_sediment_extension}
	\item the GREAT-ER class concept, i.e. various
		classes defined for different stretch types of a catchment 
		during data preprocessing. The class values are fixed.
\end{itemize}

\subsection{Missing \underline{P}arameters? \label{missingparameters}}

Using the current model selection, the simulation server is
asked which parameters still need to be specified in order
to perform a simulation.

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

The dialog informs about the according parameters and where to
find them. All necessary parameters are marked in the dialogs with a cross,
so that you can quickly identify them.

\subsection{\underline{S}tart}

This command will start the simulation for the active session if
all required data have been specified. If the parameters are not
sufficiently specified, the same dialog as for Missing Parameters
(see section \ref{missingparameters}) is raised.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/startsimulation-dlg}}{
     Simulation Status Dialog}
\end{center}

The Progress dialog informs about the current state of the simulation.

If you want to run another simulation concurrently, you just need to launch
another instance of the \GREATER\ application.

\subsection{Select Simulation Ser\underline{v}er}
\label{subsec:serverselection}

The \GREATER\ client application does not perform simulations on its own.
Instead it connects to a simulation server, which again will
connect to the database to retrieve parameters and write the results.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/selectsimulationserver-dlg}}{
     Select Simulation Server}
\\
\end{center}

There are two options to connect to a simulation server. The default is
a locally running simulation server. The performance is then corresponding
to your local hardware.

Alternatively, you may access a remote simulation server. Those can
be set up with a cluster configuration to radically increase performance
and allow multiple users to run simulations concurrently.

To connect to a remote simulation server you need to enter the the IP address
or domain name
(e.g. {\tt greater.simulserver.example}) and the port number for the server
(e.g. {\tt 12345}). Therewith the connection string for the server is:

{\tt http://greater.simulserver.example:12345}

You can test the correctness of your settings with the 'Test Server Connection'
button. On success the number of workers connected to the selected server is
listed. On failure an according error message is raised.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/simulationserversuccess-dlg}}{
     Select Simulation Server - Test Server Connection Success}
\\
\end{center}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/simulationserverfailure-dlg}}{
     Select Simulation Server - Test Server Connection Failure}
\\
\end{center}

\clearpage

\section{Menu \underline{A}nalysis}

The Analysis menu provides further functions for the analysis of model results.
The  menu  items  are only enabled if the active session contains model 
results.

\subsection*{\underline{A}dd Background Layer}

\GREATER\ is installed with some background layers stored in the database for
better orientation. These layers can be loaded on demand and are displayed 
with predefined settings (which can be changed manually later on). 

The database also provides the results of the monitoring campaigns undertaken
in the pilot areas of GREAT-ER 1.0 as layers. The layer identifies the location
of monitoring sites, the monitoring results are available by showing the 
layers attribute table.

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

In addition to the layers provides with \GREATER\ layers from other sources can
be loaded via the \Thuban\ menu {\menuitem{Map} / \menuitem{Add Layer}. Please
refer to the \Thuban\ manual for details.


\subsection*{Calculate River Csim \underline{X}}

Since  \GREATER\  calculates  a  distribution  of  concentrations  for  each  
stretch  (based  on  the  Monte-Carlo simulation) this menu item enables 
users to calculate any percentile from the distribution of $C_{sim,internal}$.
The  model  results  are  considered  as  log-normal  distributed.  
After  specifying  a  percentile  (the
unit is per cent, hence the specified value must be greater than 0 
and less than 100) the values will be
derived per stretch and a new field will be added to the results table. 
After calculation a new layer is
displayed in the scenarios view, entitled "Csim xx [unit]". The coloring is the same as that used for the mean values.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/calculaterivercsim-dlg}}{
     Calculate River Csim}
\\
\end{center}

\subsection*{C\underline{s}im Classes River}

The dialog enables the user to change the classification ranges and numbers,
optionally on a new Csim percentile.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/csimclasses-dlg}}{
     Csim Classes River}
\\
\end{center}

Additional classification features are available via the \Thuban\ {\em Layer
Properties} dialog. Please refer to the \Thuban\ manual for details.

\subsection*{Combine Csim/\underline{F}low}

The Combine Csim / Flow feature generates a new layer considering both 
$C_{sim,internal}$ mean and mean
flow.  The  resulting  layer  will  display  the  $C_{sim,internal}$ 
mean  classification  by  color-coding  the  legend
and  the  mean  flow  by  stretch  width: 
Stretches with zero concentration fall into the default class,
all other stretches are grouped in four classes for concentration and 
five classes for flow:

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/combine-csim-flow}}{
     Classification generated by {\em Combine Csim/Flow} tool }
\\
\end{center}

\pagebreak

\subsection*{PEC Initia\underline{l}}

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
(compare \citep{Boeije2000}):

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/pecinitial-dlg}}{
	 PEC initial}
\\
\end{center}

\pagebreak

\subsection*{PEC \underline{C}atchment}

PEC$_{catchment}$ is the average of representative concentrations
over the entire catchment. 
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 (compare \citep{Boeije2000}): 

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/peccatchment-dlg}}{
	 PEC catchment}
\\
\end{center}

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 (EU, 1996).

\pagebreak

\subsection*{Discharge \underline{I}nfluent Csim / Discharge \underline{E}ffluent Csim }

The \GREATER\ models calculate concentrations for both the catchment river
network and the influent and effluent of the catchment's treatment plants.

The two menu items \menuitem{Discharge Influent Csim} and 
\menuitem{Discharge Effluent Csim} load the corresponding data and display the
simulation results with a quantile classification.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/discharge-results}}{
	 Discharge results}
\\
\end{center}

\pagebreak

\subsection*{Mass \underline{F}lux}

This menu item is enabled if the current session contains 
simulation results. It corresponds with the mass flux button from the 
tool bar.

Selecting menu item or 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=\imagescale]{screenshots/massflux-dlg}}{
	 Mass Flux}
\\
\end{center}

\pagebreak

\subsection*{Concentration \underline{P}rofile}

This menu item is enabled if the current session contains 
simulation results.

This command activates the Concentration Profile tool.
You can now select a river stretch with the mouse pointer
to generate the profile. 

After selecting a stretch, calculated concentrations are collected downstream.
The concentrations are plotted against the river kilometers (starting at 
the selected stretch). The stretches considered for the profile sampling are
highlighted.

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

% \section{Alpha}
% 
% The Alpha menu is only shown if you start the \GREATER\ client with the 
% {\small\tt --alpha} option. It allows further access on data which will be
% implemented more comfortable in the next phases for the \GREATER\ client.
% 
% The contents provided in the tables are raw data. The menu items were
% introduced in this early version to allow users to explore the data and
% especially analyse the simulation results returned by the simulator wrapper.
% 
% \subsection{Show Discharge Table}
% 
% The menu item is active if the current session contains a catchment. 
% The user can explore the attribute data of the discharge sites of the
% catchment.
% 
% \subsection{Show Stretch Table}
% 
% The menu item is active if the current session contains a catchment. 
% The user can explore the attribute data of the river stretches of the
% catchment.
% 
% \subsection{Show Discharge Results Table}
% 
% The menu item is only active if the session contains simulation results.
% The user can explore the results for the discharge sites.
% 
% \subsection{Show Discharge Results Table}
% 
% The menu item is only active if the session contains simulation results.
% The user can explore the results for the river stretches.

% \section{\underline{M}ap}

% \section{\underline{L}ayer}

% \section{\underline{T}able}

\clearpage

\section{Menu \underline{H}elp}

\subsection{\underline{U}ser Manual}

The menu item displays the on-line version of this manual, if a PDF-viewer
(Portable Document Format) is installed on your computer.

\subsection{\underline{A}bout}

The dialog displays the version for the \GREATER\ Client, the used versions
of Python, wxPython, 
of SciParam (scientific parameter module) and the version of the database API
the client is using to access the \GREATER\ database.

%\section{Parameter Dialogs \label{parameterdialogs}}

\section{Keyboard Shortcuts}

\subsection{General Windows Keyboard Shortcuts}
\begin{center}
\begin{tabular}{|p{4cm}|p{9cm}|}
\hline
\tt <F10> & Activate the application menu.\\
\tt <Shift-F10> & Open a context menu for the current item.\\
\tt <Alt-letter> & Open the menu for the underlined shortcut letter.
                   You don't need to press {\tt <Alt>} if the menu or a sub-menu
                   is already active.\\
\tt <Alt-F6> & Switch to other application windows.\\
\hline
\end{tabular}
\end{center}

\subsection{Dialog Box Keyboard Shortcuts}
\begin{center}
\begin{tabular}{|p{4cm}|p{9cm}|}
\hline
\tt <Tab> & Move to the next control.\\
\tt <Shift-Tab> & Move to the previous control.\\
\tt <Ctrl-Tab> & Move to the next notebook page.\\
\tt <Shift-Ctrl-Tab> & Move to the previous notebook page.\\
\tt <Enter> & Equivalent to clicking the OK button. \\
\tt <Escape> & Equivalent to clicking the Cancel button.\\
\tt <Space> & Equivalent to clicking the current button or radio button.\\
\tt <Alt-Down> & Drop down the list box of a selection list.\\
\tt <Cursor> & Change the current item in a selection list.\\
\tt <Alt-D> & Toggle the input focus between a parameter and its details
              box in parameter dialogs.\\
\hline
\end{tabular}
\end{center}


%-------------------------Appendix-------------------------------------

\begin{appendix}
%
% You have to symlink the documentation and the screenshots from sciparam
% doc/           : ln -s ../../sciparam/doc/sciparam-manual-gui.tex .
% doc/screenshots: ln -s ../../../sciparam/doc/screenshots/*.eps .
\include{sciparam-manual-gui}

\include{greater-sediment}

\renewcommand{\documentID}{gnufdl.tex version 1.2}
\include{gnufdl}

\begin{thebibliography}{}

\harvarditem{Boeije et al.}{2000}{Boeije2000}
Boeije, G., Wagner, J.O., Koormann, F., Vanrolleghem, P.A.,
Schowanek, D.R., Feijtel, T.C.J., 2000.
New PEC definitions for river basins applicable to
GIS-based environmental exposure assessment.
Chemosphere 40(2000), 255-265.

\harvarditem{European Commission}{1996}{EC1996}
    Technical Guidance Documents in Support of The Commission
    Directive 93/67/EEC on Risk Assessment For New Notified
    Substances and the Commission Regulation (EC) 1488/94 on
    Risk Assessment For Existing Substances. ECB, Ispra, Italy.
	{\small\tt http://ecb.jrc.it/tgdoc/}

\harvarditem{Trapp and Matthies}{1998}{Trapp1998}
Trapp, S., Matthies, M., 1998. Chemodynamics and environmental modeling: An
introduction. Springer Verlag, Berlin

\end{thebibliography}

\chapter{Errors}

The \GREATER\ quality has been ensured by various quality management measures,
such as unit tests, manual test protocols and code revisions. Nevertheless, a 
software system as complex as \GREATER\ may still contain some errors. 

The \GREATER\ user interface has been designed to support the error fixing 
by generating 'tracebacks'. These tracebacks give the developers some hints
where the error is located. In case, a dialog is raised displaying the
traceback:

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/traceback}}{
     Traceback \GREATER\ User Interface}
\end{center}

Please report these tracebacks (you can mark them with the mouse and copy with
Ctrl-C) as well as other problems together
with (if possible) a list of the last steps performed before the error occurred 
(to better reproduce the problem) to:
\\

\centerline{\tt http://wald.intevation.org/tracker/?group\_id=55}
 

\end{appendix}

\label{VeryLastPage}
\end{document}


