%vim:set tw=68:
% $Source$
% $Id$

%
% Description of the GREAT-ER Sediment Extension
%
% This chapter describes and introduces the GREAT-ER Sediment Extension
%

\chapter{GREAT-ER Sediment Extension}
\label{greater_sediment_extension}

This appendix gives a compact overview and describes the features of
the GREAT-ER Sediment Extension.
%Although the components of the extension are described in the main manual 
%at appropriate sections, this appendix gives a compact overview. 

\section{Introduction}

The GREAT-ER Sediment Extension development is a CEFIC LRI project. 
Its focus is to add sediment as an additional compartment to GREAT-ER.
This covers:
\begin{itemize} 
	\item Make the water column concentrations for sorbed/dissolved
		fractions available to the GUI.

	\item Derive per stretch sediment concentrations based on 
		equilibrium partitioning.

	\item Various modes to specify the most important parameter for
		fractioning: Suspended solids concentration.

	\item Include diffuse inputs as provided by the 
		TERRACE\footnote{{\bf TE}rrestrial {\bf R}unoff 
			Modelling for {\bf R}isk {\bf A}ssessment 
			of {\bf C}hemical {\bf E}xposure} project.
\end {itemize}

%\section{Usage}
%The GREAT-ER Sediment Module expands the Model Parameter Dialog
%(see section \ref{modelparameters}).
%
%\begin{center}
%\Fig{\includegraphics[scale=0.5]{screenshots/editmodel-dlg-sediment}}{
%     Edit Model Parameters Dialog - page Sediment}
%\end{center}
%
%The Sediment extension can be based on a unique suspended sediments
%concentration probability density function for the entire catchment
%(which is editable under Environmental Parameters). Alternativly the model
%system can load SS concentrations on a per stretch basis from a file.
%
%Due to the
%partioning the Sediment extension corresponds with the River model modes 2 
%and higher and will only be executed when an appropriate River mode is
%selected. You 
%will be prompted a warning if you are leaving the Model Parameters dialog with
%a combination of River mode 2 and an activated Sediment extension.
%
%\begin{center}
%\Fig{\includegraphics[scale=0.5]{screenshots/editmodel-sediment-warning}}{
%     Edit Model Parameters - Sediment extension disabled warning}
%\end{center}
%
%\subsection*{\underline{S}ediment Extension Results}
%
%When using the \GREATER\ Sediment Extensision there is a new menu item activated 
%in the 'Analysis'-Menum, which covers the result data from the extension.
%
%If selected a dialog similar to the Add Background Layer Dialog
%is opened. Select the result layers you are interested in. Your selection will
%be displayed in the legend.
%
%\begin{center}
%\Fig{\includegraphics[scale=\imagescale]{screenshots/sedimentresults-dlg}}{
%     Sediment Extension Results Dialog}
%\\
%\end{center}
%
%{\bf Note}, that you first have to display the specific results from the 
%GREAT-ER sediment extension before you can apply further analysis tools to
%them.

\section{Model basics}

The core of the GREAT-ER river model is the analytical steady-state surface
water model WATER \citep{Trapp1998}. The chemical elimination is described 
by first order instream removal:

\begin{equation}
\label{eqn:first_order_removal}
R_{River} = 1 - e ^ {-HRT \cdot k}
\end{equation}

The elimination rate coefficient ($k$) is calculated as follows:

\begin{eqnarray}
k & = & k_{deg} + f_s k_{sed} + f_d k_{vol}\\
\mbox{with}\nonumber\\
f_d & = & \frac{1}{1+10^{-6}\cdot K_{d\_river}\cdot SS} \\
\label{eqn:f_d}
f_s & = & 1 - f_d
\label{eqn:f_s}
\end{eqnarray}

\subsection{Fractional concentrations and Sediment}

Based on partitioning the three concentrations for the water column can 
be calculated:

\begin{eqnarray}
C_{total} & = & \left(1 - R_{River}\right) \cdot C_0\\
C_{dissolved} & = & f_d \cdot C_{total} \\
C_{sorbed} & = & f_s \cdot C_{total} \\
\end{eqnarray}

The WATER model also covers an equilibrium based sediment model component:

\begin{equation}
\label{eqn:c_sediment}
C_{Sediment} = f_d \cdot C_{total} \cdot K_{SW} 
		 = C_{dissolved} \cdot 
		   \left( K_{d\_river} \frac{\rho_{S}}{\rho_{W}} + \theta\right)
\end{equation}

where:
\begin{tabbing}
$\rho_{S}$ \=: Dry sediment density $[kg_{dwt}/L]$\\
$\rho_{W}$ \>: Water density (1 $[kg/L]$)\\
$\theta$   \>: Volumetric water fraction of the sediment 
\end{tabbing}

\subsection{Diffuse Input}

Considering diffuse input as constant and continous over the stretch the 
instream removal model results in:

\begin{equation}
\label{eqn:first_order_removal_diffuse}
R' = (1 - e^{-kt})(1 - \frac{I}{k m_0})
\end{equation}

where: 
\begin{tabbing}
$\rho_{S}$ \=: \kill
$I$	   \>: Diffuse Input $[kg/d]$\\
$m_0$	   \>: Initial substance mass at beginning of the stretch 
\end{tabbing}

The model as described above is implemented by the GREAT-ER III
river model modes 2 and 3.

\section{Sediment Modes}

The ruling parameter (apart from substance specific values) for the
partitioning and sedimentation is the suspended solids concentration ($SS$).
To reflect different scenarios of parameter availability the GREAT-ER Sediment
Extension provides four options for the $SS$ parameter:

\begin{itemize}
	\item A single SS concentration as fixed value for all river stretches,
	\item a single distributed SS concentration (considered as lognormal)
		for all river stretches,
	\item a single distributed SS concentration derived from an expert
		knowledge system based on catchment characteristics and 
	\item a per stretch SS concentration derived from TERRACE and provided
		as CSV file uploaded to the database.
\end{itemize}

\subsection{Per catchment suspended solids}
The first three options are implemented by the environmental parameter for
suspended solids concentration (see Fig. A.\ref{fig:envparam_river}): 
The user can either specify a fixed value or a
distribution for the SS on the card 'River' which will be applied on the entire river network. With the implementations for 
GREAT-ER Sediment Extension Milestone 2 the already available 'Estimate'
button will be linked a dialog providing the expert knowlegde system.
The use of all these three variants is straight forward and analog to all other
parameters editable through the GREAT-ER desktop client.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editenvironmentparameters-dlg-river}}{
     Edit Environment Dialog - page River\label{fig:envparam_river}}
\end{center}

\subsection{Per stretch suspended solids}

The per stretch suspended solids concentration implements a link to the TERRACE
project (also a CEFIC LRI project): In addition to diffuse inputs calculated by
the TERRACE model the suspended solid concentrations are provided by a simple
comma seperated value (CSV) table (see format and processing below). The table 
can be uploaded to and removed from a session. The table management is
available under the 'Catchment'-Menu: 
'Load TERRACE Data' and 'Remove TERRACE Data'.

When loading a table, the session is check if already a table is loaded. In
case the user is prompted a warning (see Fig. A.\ref{fig:terrace_file_overwrite}).
Cancelling the dialog leaves the session unmodified. Else a file selection
dialog is opened (Fig. A.\ref{fig:ss_file_selection}). The user must select an
existing file or exit the dialog with 'Cancel'.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/terrace-file-overwrite}}{
     Load TERRACE File - Overwrite Warning\label{fig:terrace_file_overwrite}}
\end{center}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/terrace-file-selection}}{
     Load TERRACE File - File Selection\label{fig:ss_file_selection}}
\end{center}

After file selection the table is checked against the river network: Only if it
contains a record for each strech in the river network (the stretch attribute
table) it is loaded and joined to the river network. Else an error is raised
(see Fig. A.\ref{fig:ss_file_network_error}) and the sesssion is left unmodified.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/terrace-file-overwrite}}{
     Load TERRACE File - Network Mismatch\label{fig:ss_file_network_error}}
\end{center}

After a successful upload and join the stretch specific data is available as a
river network attribute. The user can investigate the data with the
'Identify'-Tool or via the Layer table.

If needed, the uploaded file can be removed from the session using the 
'Remove TERRACE Data' menu item. The user is asked to confirm the remove
explicitely (Fig. A.\ref{fig:terrace_file_remove}).

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/terrace-file-remove}}{
     Remove TERRACE File - Confirmation Dialog\label{fig:terrace_file_remove}}
\end{center}

If the actions performed on the network specific data file have been successful
can be identified by the 'Modified' flag for a before unmodified session. If in
doubt the user should save the session before using the load/remove features.

The desktop client considers the per stretch data file as part of a session and
therewith it will be copied, saved or deleted together with the related
session. Moreover the data is stronlgy related to the selected catchment. If
a new catchment is selected for a session, the file is also removed from the 
current session. 

\subsection{Mode Selection}

As said the first three modes considering the suspended solids concentration 
are using a single (distributed) value per catchment while the latter (per
stretch) is file based. The selection between both approaches is available
through the 
'Edit Model Parameters' dialog (Fig. A.\ref{fig:model_select_data}) on the card
'River / Sediment'. The 'Data' item offers a selection between 'generic data'
and 'per stretch data'. 

The availablility of data is displayed by the 'TERRACE data file loaded' item.
The item cannot be edited directly but identifies the status of TERRACE data
files loadable through the 'Catchment' menu items. 

The 'Data' item offers also a third mode: 'Class data'. This mode
refers to an alternative concept of GREAT-ER 1.0 / 2.0: Classes are defined 
for stretches/discharges by the preprocessing, the user has no direct way 
to edit or query these settings. However, the concept provides a method to
use 'typical' values for a class of discharges (e.g. trickling filter,
activated sludge) or stretches (brook, main stream) for parameters where per 
object values are not available.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/editmodelparameters-dlg-riversediment}}{
     Edit Model Parameters - River / Sediment Card\label{fig:model_select_data}}
\end{center}

In addition to the suspended sediment concentration handling the 
'Edit Model Parameters' dialog offers the control over the diffuse input
data provided through the TERRACE file: The 'Consider diffuse input' switch
activates/deactivates the diffuse input.

As usual for GREAT-ER all parameters / selections are always editable. The 
completeness of parameters / data for a given for selection of models (or
modes) is checked automatically before starting a model run and can be called
explicitely by the menu item 'Simulation / Missing Parameters?' 

There is one exception (since it does not affect a parameter in the usual
meaning): A warning is raised if mode selections for river and sediment are not
matching (Fig. A.\ref{fig:model_sediment-warning}).

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/editmodel-sediment-warning}}{
     Edit Model Parameters - 
	Sediment extension disabled warning\label{fig:model_sediment-warning}}
\end{center}

\section{Result-Analysis}

To provide easy access on the results calculated by the 
GREAT-ER Sediment Extension the features of the GREAT-ER \menuitem{Analysis}
menu have been enhanced: A new menu item \menuitem{Sediment Extension Results}
is added. The item is active if results from the sediment extension are
available. A dialog is raised from which the results of interest can be
selected (Fig. A.\ref{fig:sedimentresults-dlg}).

\begin{center}
\Fig{\includegraphics[scale=0.5]{screenshots/sedimentresults-dlg}}{
     Sediment Extension Results Dialog\label{fig:sedimentresults-dlg}}
\end{center}

For each selected result set a layer will be added to the legend. As a
consequence the analysis tools now are available only if a result layer is
selected in the legend. Depending on the selected result layer various tools
are available (e.g. the PEC calculation or Risk Analysis are only defined for
the total water column concentration).

The following functions are available per result group:\\
\begin{center}
\begin{tabular}{l|l|l|l|l}
{\bf Function} & {\bf$C_{total}$} & {\bf$C_{dissolved}$} 
		& {\bf$C_{sorbed}$} & {\bf$C_{Sediment}$} \\ \hline
Calculate River CSim X 	& \checked & \checked & \checked & \checked \\
CSim Classes River 	& \checked & \checked & \checked & \checked \\
Combine CSim/Flow 	& \checked & \checked & \checked & \checked \\
PEC Inital		& \checked & -        &	-        & -	    \\
PEC Catchment		& \checked & -        & -        & -	    \\
Risk Analysis		& \checked & -        & -        & - 	    \\
Mass Flux		& \checked & \checked & \checked & -	    \\
Concentration Profile	& \checked & \checked & \checked & \checked
\end{tabular}
\end{center}

\section{The TERRACE file}

The TERRACE file is a simple table of records as comma seperated values (CSV).
It must contain a record for each stretch of the river network (compare 
\menuitem{Table}~/~\menuitem{Show}~/~\menuitem{Join~of~RIVERNET~and~Stretch~Attributes}
or the catchments {\small\tt .rna} file from the preprocessing.

Each record consists of 6 fields:
\begin{tabbing}
DiffuseStdDev \=: \kill
BasinID	      \>: ID of the TERRACE (sub) basin, for informational purposes.\\
StretchID     \>: ID of the corresponding stretch, this is the link to the 
		  river network.\\
SSConcMean    \>: Suspended Solids concentration, mean value $[g/m^3]$.\\
SSConcStdDev  \>: Suspended Solids concentration, standard deviation.\\
DiffuseMean   \>: Diffuse Input into stretch, mean value $[kg/d]$.\\
DiffuseStdDev \>: Diffuse Input into stretch, standard deviation.
\end{tabbing}

Based on the mean and standard deviation suspended solids concentration and
diffuse input can be considered as distributed parameters. It is assumed that 
both parameters are logarithmic-normal distributed.
