#####################################
Groundwater vulnerability: GLA method
#####################################

For the conditions of Central Europe and especially Germany, scientists developed the concept of the National Geological Services (GLA) of Germany, which was first introduced by HÖLTING et al. (1995). The concept enables to calculate the protective function of an aquifer cover.
It distinguishes between the influence of the soil, unconsolidated and consolidated lithology as well as the annual percolation rate.
This plugin works with a scoring system, where a high score indicates a high protective function and vice versa. This means all input data are compared with predefined lookup values in order to set a certain score for each input data. After transferring the input data into scores, the protective function is calculated with the following equation:

.. image:: images/equation.png
   :width: 400px

with

============ ==================================================
P            protective function of the aquifer cover
S            available water capacity of the soil
U            lithology type of unconsolidated sediments
C            lithology type of consolidated rocks
T            thickness of each lithology layer beneath the soil
R            rate of percolating water
G\ :sub:`P`\ perched groundwater
G\ :sub:`A`\ artesian groundwater
i, j         continous numbering of geological layers
============ ==================================================

Important notes
===============
- Currently, only TIFF/TIF images are supported
- All input rasters must share the same geometry. This means they must share the same pixel positions and same raster size, e.g. this is achieved by providing the same number of rows and columns including same pixel size.
- Any no data value will be changed to 0 automatically.

Input data
==========

.. image:: images/ui_1.png

Field 1: Available water capacity
---------------------------------
The available water capacity (AWC) describes the amount of water in a soil that can be held against gravity and is available fro growing crops. The GLA methods includes the soil within a depth of 1 m. Thus, the input data must have information about the AWC over a depth of 1 m. If more than one soil layer occurs (and therefore more than one available water capacities), those values must be merged to a total AWC value.
The plugin checks if the AWC value of a pixel lies between a certain minimum and a certain maximum.
*Example*: the total AWC value for one pixel is given with 75 mm. According to the default lookup table, the corresponding score will be 50 points.

Field 2: Percolation rate
-------------------------
The percolation data describes the amount of water percolating from the surface to the top of the groundwater table, given in mm/a. The GLA methods includes the percolation rate either as groundwater recharge (GWR) or as climatic water balanace (CWB). As the GLA method recommends the use of GWR data prior to CWB data, this method is selected per default. Nevertheless, this selection can be changed under the tab *Tables*.
The scoring of the percolation layer follows the same priciple as the scoring of the AWC layer: if the pixel value lies between a certain minimum and a certain maximum, the pixel is scored with the corresponding score value.

Field 3: Lithology
------------------
The lithology describes all geological layers from a depth of 1 m below the surface to the top of the water table. It has to be distinguished between unconsolidated and consolidated rocks. The lithology layers represent isopach layers for each petrography. In other words: the layer name describes the petrography, the layer content describes the thickness in meters of each layer.

Unconsolidated lithology
^^^^^^^^^^^^^^^^^^^^^^^^
The window to manage unconsolidated lithology features is divided in two parts. The left part handles all files to be loaded into the plugin (L1). The right part provides the lookup values (L2). Load lithology files by clicking the *Add* button.
Inside the file browser select all necessary input files. **Note**: Currently only TIFF/TIF-images are supported.
Each lithology file must be connected to a proper lithology description from the lookup table. At first, click on the desired layer in L1 and then double click on the lithology type of interest. Clicking on the button *apply selection* does the same. If a single lithology association must be reset, the button *clear association* empties the selected line. The button *clear all* empties the whole list in L1. A blick on the *OK* button finished the association procedure. The window is not terminated but hidden and can be brought back by opening the window again from the main window of the plugin.
By clicking the save button, the current lithology description can be saved to a text file. By clicking the load button, a lithology description from a previous stage can be loaded from text file.

Consolidated lithology
^^^^^^^^^^^^^^^^^^^^^^
The window to manage consolidated lithology features is divided in two parts. The left part handles all files to be loaded into the plugin (S1). The right part provides the lookup values. Load lithology files by clicking the *Add* button.
Inside the file browser select all necessary input files. **Note**: Currently only TIFF/TIF-images are supported.
Each lithology file must be connected to a proper lithology description from the lookup table. At first, click on the desired layer in S1 and then select the proper lithology type and structure. A double click on one of the lookup tables confirms the selection. Clicking on the button *apply selection* does the same. If a single lithology association must be reset, the button *clear association* empties the selected line. The button *clear all* empties the whole list in L1. A blick on the *OK* button finished the association procedure. The window is not terminated but hidden and can be brought back by opening the window again from the main window of the plugin.
By clicking the save button, the current lithology description can be saved to a text file. By clicking the load button, a lithology description from a previous stage can be loaded from text file.

Fields 4 & 5: Perched and artesian groundwater
----------------------------------------------
The existence of perched and artesian groundwater is an effect of layers with extremely low hydraulic conductivities. Due to the fact that both do not occur frequently, their input is optional.
The input field is unlocked, when activating the check box.
Working with perched or artesian groundwater does not require any look-up tables. The layer only includes the information if the groundwater in an area is perched/artesian or not. Therefore a binary code of 1 (perched/artesian) or 0 (not perched/not artesian) is applied.

Field 6: Output
---------------
The output image is saved to the specified directory. The processing files can be saved as well within the output directory. This includes scored AWC, percolation and, if available, lithology layers.

Field 7: Messages
-----------------
This window informs about certain processing steps, such as reading input data or saving results to the system.

Lookup tables
=============
.. image:: images/ui_2.png

The plugin uses predefined lookup tables in form of CSV-files. It is not recommended to change any of them as they contain the default GLA values. However, local conditions may require a customization of the score function. For this case the user may change the default lookup directory to a target directory with customized lookup tables. A reload button enables the recovery of the default lookup directory.

Example
=======
The example data covers a small region in central Germany
