Aquatic module - GLOBIO4/GlobioModelPublic GitHub Wiki
The Aquatic module is implemented as different separate submodules of GLOBIO 4 and can be run in the GLOBIO 4 framework. The Aquatic module calculates biodiversity impacts (MSA) in relation to a set of environmental pressures. In addition to these submodules several preprocessing modules are available to create various input dataset for the Aquatic module.
The Aquatic module is designed to work with various raster resolutions. The created submodules are tested using rasters with a 30 arc-sec resolution. Using 5 arc-min raster should be possible but is not tested.
The Aquatic module is developed to be highly flexible regarding to the input it needs. During the development process the following water types were used.
Types
-------------------------------
Lakes (deep and shallow)
Reservoirs (deep and shallow)
Rivers
Floodplains
Wetlands
Water types from different sources are converted to these water types.
The Aquatic module calculates biodiversity impacts (MSA) for the watertypes mentioned above. In contrast to the terrestric types of Terrestric module of GLOBIO one raster cell can contain multiple watertypes. The occurrence of a watertype in a rastercell is expressed in a fraction of the total area of the rastercell. Fractions of different watertypes are stored in seperate rasters.
For each watertype or a combination of watertypes the MSA is calculated and saved in intermediate rasters. The MSA values in each intermediate raster are only valid for the watertype they are calculated for, i.e. where the corresponding watertypes have a fraction which is greater than 0.0.
When combining intermediate MSA rasters of different watertypes the final MSA is calculated by weighting the seperate MSA by fraction.
The Aquatic module uses the following input datasets.
Type Description
---------------------------------------- -----------------------------------------------------------
River fractions Raster with river fractions.
Floodplain fractions Raster with floodplain fractions.
Lake fractions (shallow and deep) Rasters with shallow and deep lake fractions.
Reservoir fractions (shallow and deep) Rasters with shallow and deep reservoir fractions.
Wetland fractions Raster with wetland fractions.
Upstream distance to dams Raster with upstream distance to dams (km).
Downstream distance to dams Raster with downstream distance to dams.
River fragment length Raster with river river fragment lengths (km).
Damdensity Raster with damdensity (km-2).
River connectivity Index (RCI) Raster with river connectivity Index (RCI)
Actual discharge per month Rasters with actual discharge per month (m3/s).
Reference discharge per month Rasters with reference discharge per month (m3/s).
Mean reference discharge per month Rasters with mean reference discharge per month (m3/s).
Land-use Raster with land-use (10 arcsec).
Catchments Raster with catchments.
River flow directions Raster with river flow directions.
Water temperatuur per month Rasters with water temperatuur per month (ºC).
N concentration Raster with N concentration (g/m3).
P concentration Raster with P concentration (g/m3).
Most of these input dataset can be create using the various preprocessing modules.
The Aquatic module will calculate the following output datasets.
Type Description
--------------------------------- --------------------------------------------------------------------------------------
Aquatic MSA Raster with aquatic MSA.
Concentration of cyano bacteria Raster with the concentration (g ww/m3) of cyano bacteria in lakes and reservoirs.
When calculating the output data sets various intermediate data sets are created.
Description
Converts connected riversegments to rivers (multi-lines).
Data needs
Shapefile with river segments.
Outputs
Shapefile with connected river segments.
Pseudocode
Input: Shapefile with river segments. RIV
Output: Shapefile with connected river segments. OUT
Pseudocode: for all river segments from RIV do:
CON = get connected lines to segment start/endpoint.
Convert CON to multi-line.
Add multi-line to OUT.
Description
Performs several conversion actions.
Data needs
p.m.
Outputs
p.m.
Description
Extracts riversegments based on a discharge threshold.
Data needs
p.m.
Outputs
p.m.
Description
Extracts riversegments based on a discharge threshold.
Data needs
p.m.
Outputs
p.m.
Description
Merges watertype fractions from different sources to one set of watertype fractions.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the damdensity as an indicator for river fragmentation.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the river fragment length as an indicator for river fragmentation.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the River Connectivity Index (RCI) as an indicator for river fragmentation.
Data needs
p.m.
Outputs
p.m.
Description
Calculates fractions for lakes and reservoirs.
Data needs
p.m.
Outputs
p.m.
Description
Calculates fractions for rivers.
Data needs
p.m.
Outputs
p.m.
Description
Calculates fractions for rivers.
Data needs
p.m.
Outputs
p.m.
Description
Creates river fragments (i.e. parts separated by dams) from river segments.
Data needs
p.m.
Outputs
p.m.
Description
Splits river segments at (nearby) dams.
Data needs
p.m.
Outputs
p.m.
Description
Creates a 30sec raster with downscaled (pcr-globwb) streamflow discharge.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the Ammended Annual Proportional Flow Deviation.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the anthropogenic landuse fractions in upstream catchments (FRHLU).
Data needs
p.m.
Outputs
p.m.
Description
Calculates the AAPFD MSA for floodplains..
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for floodplains.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for deep lakes.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the concentration cyano bacteria in lakes and reservoirs.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the median surface water temperature across months in lakes and reservoirs.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for shallow lakes.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the total aquatic MSA.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for reservoirs.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the AAPFD MSA for rivers.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the landuse MSA for rivers.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for river fragmentation.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic MSA for rivers.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the aquatic landuse MSA for wetlands and floodplains.
Data needs
p.m.
Outputs
p.m.
Description
Calculates the fractions of loss and actual wetlands.
Data needs
p.m.
Outputs
p.m.
The directory \Calculations contains the following files of the Aquatic module:
- GLOBIO_CalcAquaticAAPFD.py
- Calculates the Ammended Annual Proportional Flow Deviation.
- GLOBIO_CalcAquaticFRHLU.py
- Calculates the anthropogenic landuse fractions in upstream catchments (FRHLU).
- GLOBIO_CalcAquaticFloodplainAAPFDMSA.py
- Calculates the AAPFD MSA for floodplains..
- GLOBIO_CalcAquaticFloodplainMSA.py
- Calculates the aquatic MSA for floodplains.
- GLOBIO_CalcAquaticLakeDeepMSA.py
- Calculates the aquatic MSA for deep lakes.
- GLOBIO_CalcAquaticLakeReservoirCyanoBacteria.py
- Calculates the concentration cyano bacteria in lakes and reservoirs.
- GLOBIO_CalcAquaticLakeReservoirWaterTemperature.py
- Calculates the median surface water temperature across months in lakes and reservoirs.
- GLOBIO_CalcAquaticLakeShallowMSA.py
- Calculates the aquatic MSA for shallow lakes.
- GLOBIO_CalcAquaticMSA.py
- Calculates the total aquatic MSA.
- GLOBIO_CalcAquaticReservoirMSA.py
- Calculates the aquatic MSA for reservoirs.
- GLOBIO_CalcAquaticRiverAAPFDMSA.py
- Calculates the AAPFD MSA for rivers.
- GLOBIO_CalcAquaticRiverFRHLUMSA.py
- Calculates the landuse MSA for rivers.
- GLOBIO_CalcAquaticRiverFragmentationMSA.py
- Calculates the aquatic MSA for river fragmentation.
- GLOBIO_CalcAquaticRiverMSA.py
- Calculates the aquatic MSA for rivers.
- GLOBIO_CalcAquaticWetlandFloodplainFRHLUMSA.py
- Calculates the aquatic landuse MSA for wetlands and floodplains.
- GLOBIO_CalcAquaticWetlandLossFractions.py
- Calculates the fractions of loss and actual wetlands.
The directory \Config contains the following files of the Aquatic module:
- Globio_Aquatic.glo
- Defines the predefined Aquatic calculation modules.
- Globio_Aquatic_Preprocessing.glo
- Defines the predefined Aquatic preprocessing modules.
The directory \Preprocessing contains Python modules for creating input data for the Aquatic module. The following files are present:
- GLOBIO_AquaticConnectedRivers.py
- Converts connected riversegments to rivers (multi-lines).
- GLOBIO_AquaticConvert.py
- Performs several conversion actions.
- GLOBIO_AquaticDrainageToRivers.py
- Extracts riversegments based on a discharge threshold.
- GLOBIO_AquaticDrainageToRivers_V2.py
- Extracts riversegments based on a discharge threshold.
- GLOBIO_AquaticFractions.py
- Merges watertype fractions from different sources to one set of watertype fractions.
- GLOBIO_AquaticFragmentationDamDensity.py
- Calculates the damdensity as an indicator for river fragmentation.
- GLOBIO_AquaticFragmentationFragmentLength.py
- Calculates the river fragment length as an indicator for river fragmentation.
- GLOBIO_AquaticFragmentationRCI.py
- Calculates the River Connectivity Index (RCI) as an indicator for river fragmentation.
- GLOBIO_AquaticLakeReservoirFractions.py
- Calculates fractions for lakes and reservoirs.
- GLOBIO_AquaticRiverFractions.py
- Calculates fractions for rivers.
- GLOBIO_AquaticRiverFractions_V2.py
- Calculates fractions for rivers.
- GLOBIO_AquaticRiverFragments.py
- Creates river fragments (i.e. parts separated by dams) from river segments.
- GLOBIO_AquaticSplitRivers.py
- Splits river segments at (nearby) dams.
- GLOBIO_AquaticStreamflow30sec
- Creates a 30sec raster with downscaled (pcr-globwb) streamflow discharge.
The directory \Scripts contains the following files of the Aquatic module:
- Run_Aquatic_All.glo
- Executes a full run of the aquatic part of GLOBIO.
- Run_Aquatic_Preprocessing_All.glo
- Executes a full run of the aquatic preprocessing part of GLOBIO.
The directory \Workers contains Python modules which are mainly used by the pre-processing modules and implement WorkerBase derivatives for doing multiprocessing calculations. The following files are present:
- AquaticConnectedRivers.py
- Converts connected riversegments to rivers (multi-lines).
- AquaticDrainageToRivers.py
- Extracts riversegments based on a discharge threshold.
- AquaticFragmentationFragmentLength.py
- Calculates the river fragment length as an indicator for river fragmentation.
- AquaticFragmentationRCI.py
- Calculates the River Connectivity Index (RCI) as an indicator for river fragmentation.
- AquaticLakeReservoirFractions.py
- Calculates fractions for lakes and reservoirs.
- AquaticRiverFractions.py
- Calculates fractions for rivers.
- AquaticRiverFragments.py
- Creates river fragments (i.e. parts separated by dams) from river segments.
- RasterFunc.py
- Miscellaneous multiprocessing raster functions.
To prepare the input data for the various submodules the following preprocessing scripts are created. These scripst are located in the \Preprocessing directory.

Description: Converts splitted river segments to rivers (multi-lines).
Input: Shapefile with river segments. RIV
Output: Shapefile with connected river segments. OUT
Pseudocode: for all river segments from RIV do:
CON = get connected lines to segment start/endpoint.
Convert CON to multi-line.
Add multi-line to OUT.
Description: Performs several conversion actions.
Input: Various data sets.
Output: Various data sets.
Pseudocode: -
Description: Extracts river segments from drainage line based on a
discharge threshold.
Input: Shapefile with drainage lines. DRA
Raster with river discharge. RDI
Discharge threshold. DTH
Output: Shapefile with river segments. OUT
Pseudocode: for all drainage lines from DRA do:
Get bounding box of line.
for all cells in the bounding box do:
DIS = cell value from RDI.
if DIS > DTH:
Add drainage line to OUT.
Description: Extracts river segments from drainage line based on a
discharge threshold.
In the new version the cellsize parameter is removed. The
working resolution is based on the resolution of the river
discharge raster.
Input: Shapefile with drainage lines. DRA
Raster with river discharge. RDI
Discharge threshold. DTH
Output: Shapefile with river segments. OUT
Pseudocode: for all drainage lines from DRA do:
Get bounding box of line.
for all cells in the bounding box do:
DIS = cell value from RDI.
if DIS > DTH:
Add drainage line to OUT.
Description: Merges watertype fractions from different sources to one
set of watertype fractions.
Input: Raster with river fractions. RF
Raster with shallow lake fractions. SLF
Raster with deep lake fractions. DLF
Raster with shallow reservoir fractions. SRF
Raster with deep reservoir fractions. DRF
Raster with GLWD watertypes. GLWD
Floodplain GLWD watertypes. FWT
Wetland GLWD watertypes. WWT
Priorities of input rasters (high = 6, low = 1) PRIO
Output: Raster with river fractions. OUTR
Raster with floodplain fractions. OUTF
Raster with shallow lake fractions. OUTSL
Raster with deep lake fractions. OUTDL
Raster with shallow reservoir fractions. OUTSR
Raster with deep reservoir fractions. OUTDR
Raster with wetland fractions. OUTW
Pseudocode: OUTR = RF
OUTSL = SLF
OUTDL = DLF
OUTSR = SRF
OUTDR = DRF
Select GLWD = 4 or GLDW = 5.
OUTF = GLWD
Select GLWD = 6 or GLDW = 7 or GLDW = 8 or GLDW = 9 or
GLDW = 10 or GLDW = 11 or GLDW = 12.
OUTW = GLWD
TOTF = total of all fractions.
for all output rasters do:
Select cells where TOTF > 1.0.
OUT = OUT / TOTF
When using priorities the following steps are done.
Sort PRIO from high to low.
TOTF = 0.0
for each input raster based on PRIO do:
if GLWD input:
Select cells in FWT or WWT.
OUT *= 1.0
TOTF = TOTF + 1.0
else:
OUT *= input raster fraction.
TOTF = TOTF + input raster fraction.
if TOTF > 1.0:
DIFF = TOTF - 1.0
OUT *= OUT* - DIFF
TOTF = TOTF - DIFF
Description: Calculates the damdensity as an indicator for
river fragmentation.
Input: Shapefile with dams. DAM
Raster with catchments. CAT
Output: Raster with damdensity (km-1). OUT
Pseudocode: RAS = 0
for all dams from DAM do:
Get corresponding raster cell.
RAS = RAS + 1
SUM = calculate sum of RAS per catchment.
AREA = calculate AREA of catchments.
OUT = SUM / AREA
Description: Calculates the river fragment length as an indicator for
river fragmentation.
Input: Shapefile with river fragments. RIV
Output: Raster with river fragment lengths (km). OUT
Pseudocode: CELLS = create list with cell-ids.
for all fragments from RIV do:
Get bounding box of fragment.
for all cells in the bounding box do:
if fragment intersects cell:
Append length to CELLS.
for all cells in CELLS do:
CELLS = update length at junctions as mean of all lengths.
for all cells in CELLS do:
OUT = length
Description: Calculates the River Connectivity Index (RCI) as an
indicator for river fragmentation.
Input: Shapefile with river fragments. RIV
Raster with catchments. CAT
Output: Raster with RCI. OUT
Pseudocode: FRAGLENGTHS = create list with fragment-id and cathment-id.
TOTLENGTHS = create list with cathment-id.
for all fragments from RIV do:
Get bounding box of fragment.
for all cells in the bounding box do:
Get fragment intersections with cell.
LEN = length of all intersections.
Add LEN to FRAGLENGTHS.
Add LEN to TOTLENGTHS.
RCIS = create list with cathment-id.
for all lengths in FRAGLENGTHS do:
Get catchment-id.
With catchment-id do:
RCIS = RCIS + fragment length ** 2 / TOTLENGTHS ** 2
for all rci in RCIS do:
rci = rci * 100
for all fragments from RIV do:
Get bounding box of fragment.
for all cells in the bounding box do:
if fragment intersections with cell:
OUT = get corresponding rci from RCIS.
Description: Calculates fractions for shallow or deep lakes
and reservoirs.
Input: Shapefile with lakes and reservoirs. LR
Type fieldname. LFN
Lake types. LTY
Reservoir types. RTY
Depth fieldname. DFN
Depth threshold (m). DTH
Output: Raster with shallow lake fractions. OUTSL
Raster with deep lake fractions. OUTDL
Raster with shallow reservoir fractions. OUTSR
Raster with deep reservoir fractions. OUTDR
Pseudocode: Select all polygons from LR where LFN in LTY.
And select all polygons from LR where DFN <= DTH.
< function >
for all polygons from LR do:
Get bounding box of polygon.
for all cells in the bounding box do:
AREA = 0
if polygon fully contains cell:
AREA = area of cell
else:
if polygon intersects cell:
AREA = area of intersections
OUTA = AREA
TOTAREA = create raster with cell areas.
for all cells in OUTA do:
OUTSL = OUTA / TOTAREA
Select all polygons from LR where LFN in LTY.
And select all polygons from LR where DFN > DTH.
Do < function >.
Save to OUTDL.
Select all polygons from LR where LFN in RTY.
And select all polygons from LR where DFN <= DTH.
Do < function >.
Save to OUTSR.
Select all polygons from LR where LFN in RTY.
And select all polygons from LR where DFN > DTH.
Do < function >.
Save to OUTDR.
Description: Calculates fractions for rivers.
Input: Shapefile with rivers. RIV
Average river width (km). WTH
Output: Raster with river fractions. OUTF
Pseudocode: for all river segments from RIV do:
Get bounding box of polygon.
for all cells in the bounding box do:
Get intersections from cell and river segment.
LEN = get length of all intersections.
for all cells in LEN do:
AREA = LEN * WTH
CORRA = AREA * RATIO (i.e. correction for high/low latitude)
TOTAREA = create raster with cell areas.
for all cells in CORRA do:
OUTF = CORRA / TOTAREA
Description: Calculates fractions for rivers.
In the new version the river width is now calculated based
on the river discharge using the formula
w = a * Q^b (in meters)
instead of using a constant river width.
Also the lakes and reservoirs are "excluded" from the
rivers. Using the lakes and reservoirs is optional.
Input: Shapefile with rivers. RIV
Shapefile with lakes and reservoirs (optional). LR
Raster with river discharge. RDI
River width factor A. RWA
River width factor NB. RWB
Output: Raster with river fractions. OUTF
Pseudocode: if LR specified:
RIV = Exclude the lakes/reservoirs from the rivers.
for all river segments from RIV do:
Get bounding box of polygon.
for all cells in the bounding box do:
Get intersections from cell and river segment.
LEN = get length (km.) of all intersections.
for all cells in RDI do:
Calculate width (km.) from river discharge.
WTH = RWA * ( RDI ** RWB) / 1000
for all cells in LEN do:
AREA = LEN * WTH
CORRAREA = AREA * RATIO (i.e. correction for high/low latitude)
TOTAREA = create raster with cell areas.
for all cells in CORRA do:
OUTF = CORRAREA / TOTAREA
Description: Creates river fragments (i.e. parts separated by dams)
from river segments.
Input: Shapefile with connected rivers. RIV
Shapefile with dams. DAM
Output: Shapefile with river fragments. OUT
Pseudocode: for all rivers from RIV do:
Get bounding box of river.
Select all dams from DAM in bounding box.
for all river segments from river do:
CON1 = get connected river segments from segment start,
skip duplicate segments, stop at dam or river
start/endpoint
CON2 = get connected river segments from segment end,
skip duplicate segments, stop at dam or river
start/endpoint
CON = CON1 + CON2 + river segment.
Calculate length of all CON segments.
Converts CON segments to fragment (multi-line), add
length.
Add river fragment to OUT.
Description: Splits river segments at (nearby) dam locations.
Input: Shapefile with river segments. RIV
Shapefile with dams. DAM
Search tolerance (degree). TOL
Output: Shapefile with splitted river segments. OUTR
Shapefile with snapped dam locations. OUTD
Pseudocode: for all dams in DAM do:
Get point on nearest river segment (within TOL).
if point on river segment found:
RIVWITHDAMS = Add found river segment.
Add dam to found river segment.
for all river segments in RIV do:
if river segment in RIVWITHDAMS:
Split river segment on found dam locations.
Add new river segments to OUTR.
Add found dam locations to OUTD.
else:
Add river segment to OUTR.
Description: Creates a 30 arcsec raster with downscaled (pcr-globwb)
streamflow discharge.
Remark: For calculating the streamflow for different months
this module should be called for each month.
Input: Raster with 5 arcmin scenario SC5
streamflow discharge (m3/s).
Raster with 5 arcmin reference mean RMN5
streamflow discharge (m3/s).
Raster with 5 arcmin reference minimum RMI5
streamflow discharge (m3/s).
Raster with 5 arcmin reference maximum RMA5
streamflow discharge (m3/s).
Raster with 30 arcsec reference mean RMN30
streamflow discharge (m3/s).
Raster with 30 arcsec reference minimum RMI30
streamflow discharge (m3/s).
Raster with 30 arcsec reference maximum RMA30
streamflow discharge (m3/s).
Output: Raster with streamflow discharge (m3/s). OUT
Pseudocode: Select SC5 <= RMN5:
OUT = RMN30 - ((RMN30 - RMI30)/(RMN5 - RMI5)) * (RMN5 - SC5)
Select SC5 > RMN5:
OUT = RMN30 + ((RMA30 - RMN30)/(RMA5 - RMN5)) * (SC5-RMN5)
To create the output data sets the following submodules are created. These scripts are located in the /Calculations directory.

Description: Calculates the Ammended Annual Proportional Flow Deviation.
Input: Rasters with actual discharge per month (m3/s). AD
Rasters with reference discharge per month (m3/s). RD
Rasters with mean reference discharge per month (m3/s). MRD
Raster with river fractions. RF
Raster with floodplain fractions. FF
Output: Raster with AAPFD (m3/s). OUT
Pseudocode: Select RF > 0.0 or FF > 0.0.
Sum = 0
for all months do:
Sum = Sum + SQR((AD - RD) / MRD)
OUT = SQRT(Sum)
Description: Calculates the AAPFD MSA for floodplains.
Input: Raster with AAPFD (m3/s). AA
Raster with floodplain fractions. FF
Factor A. A
Factor B. B
Factor C. C
Factor D. D
Output: Raster with AAPFD MSA for floodplains. OUT
Pseudocode: Select FF > 0.0
OUT = A * exp(B / (log10(AA+D) + C)
Description: Calculates the aquatic MSA for floodplains.
Input: Raster with landuse MSA for wetlands and floodplains. LUM
Raster with AAPFD MSA for floodplains. AAM
Raster with floodplain fractions. FF
Output: Raster with MSA for floodplains. OUT
Pseudocode: Select FF > 0.0
OUT = LUM * AAM
Description: Calculates the anthropogenic landuse fractions in
upstream catchments (FRHLU).
Input: Raster with landuse (10 arc-sec). LU
Raster with flow directions. FL
Output: Raster with FRHLU fractions. FRHLU
Raster with anthropogenic landuse fractions. OUT
Pseudocode: Calculate 10 arc-sec raster with cell area.
Select from area raster where LU<>urban and
LU<>crop and LU<>pasture.
Set area to 0.0.
Resample 10 arc-sec to 30 arc-sec and sum
anthropogenic areas.
Calculate 30 arc-sec raster with cell area (total area).
Calculate anthropogenic fractions =
anthropogenic area / total area.
Calculate accumulative upstream area (AreaD8) of
anthropogenic fractions using FL.
Calculate total accumulative upstream area (AreaD8) using FL.
OUT = accumulative anthropogenic area / total accumulative area.
Description: Calculates the aquatic MSA for deep lakes.
Input: Raster with N concentration (g/m3). NC
Raster with P concentration (g/m3). PC
Raster with deep lake fractions. SLF
N factor A. N_A
N factor B. N_B
N factor C. N_C
P factor A. P_A
P factor B. P_B
P factor C. P_C
Output: Raster with MSA for deep lakes. OUT
Pseudocode: Select SLF > 0.0.
N_MSA = exp(N_A + N_B * log(NC+N_C))/(1.0 +
exp(N_A + N_B * log(NC+N_C)))
P_MSA = exp(P_A + P_B * log(PC+P_C))/(1.0 +
exp(P_A + P_B * log(PC+P_C)))
Select where both NC and PC has data.
OUT = maximum(N_MSA,P_MSA)
Select where NC has data and PC not .
OUT = N_MSA
Select where PC has data and NC not.
OUT = P_MSA
Description: Calculates the concentration of cyano bacteria in lakes
and reservoirs.
Input: Raster with N concentration (g/m3). NC
Raster with P concentration (g/m3). PC
Raster with surface water temperature (ºC). WT
Raster with shallow lake fractions. SLF
Raster with deep lake fractions. DLF
Raster with shallow reservoir fractions. SRF
Raster with deep reservoir fractions. DRF
Temperature threshold. TT
FTNTP factor A. NP_A
FT factor A. F_A
FT factor B. F_B
FT factor C. F_C
FT factor D. F_D
FT factor E. F_E
FT factor F. F_F
CB factor A. C_A
CB factor B. C_B
CB factor C. C_C
CB factor D. C_D
CB factor E. C_E
CB factor F. C_F
Output: Raster concentration cyano bacteria in lakes OUT
and reservoirs (g ww/m3).
Pseudocode: Select SLF > 0.0 or DLF > 0.0 or SRF > 0.0 or DSF > 0.0.
Select water temperature >= TT.
FT = FT_A + FT_B * (power(WT / TT,FT_C) - 1.0)
Select water temperature < TT.
FT = FT_D + FT_E * (power(WT / TT,FT_F) - 1.0)
Select PC > 0.0.
if NC/PC <= TT:
FTNTP = 1.0 - NP_A * (NC / (PC * TT) - 1.0)
else:
FTNTP = 1.0
OUT = CB_A * power(CB_B * log10(CB_C * max(PC,CB_D)) - CB_E,CB_F)
* FTNTP * FT
Description: Calculates the median surface water temperature across
months in lakes and reservoirs.
Input: Rasters with water temperatuur per month (ºC). WT
Temperature threshold (ºC). TT
Raster with shallow lake fractions. SLF
Raster with deep lake fractions. DLF
Raster with shallow reservoir fractions. SRF
Raster with deep reservoir fractions. DRF
Output: Rasterwith median surface water temperature (ºC). OUT
Pseudocode: Select SLF > 0.0 or DLF > 0.0 or SRF > 0.0 or DRF > 0.0
for all months do:
Select cells > TT
Calculate median across months
OUT = median across months
Description: Calculates the aquatic MSA for shallow lakes.
Input: Raster with N concentration (g/m3). NC
Raster with P concentration (g/m3). PC
Raster with shallow lake fractions. SLF
N factor A. N_A
N factor B. N_B
N factor C. N_C
P factor A. P_A
P factor B. P_B
P factor C. P_C
Output: Raster with MSA for shallow lakes. OUT
Pseudocode: Select SLF > 0.0.
N_MSA = exp(N_A + N_B * log(NC+N_C))/(1.0 +
exp(N_A + N_B * log(NC+N_C)))
P_MSA = exp(P_A + P_B * log(PC+P_C))/(1.0 +
exp(P_A + P_B * log(PC+P_C)))
Select where both NC and PC has data.
OUT = maximum(N_MSA,P_MSA)
Select where NC has data and PC not .
OUT = N_MSA
Select where PC has data and NC not.
OUT = P_MSA
Description: Calculates the total aquatic MSA.
Input: Raster with shallow lake MSA. SLM
Raster with deep lake MSA. DLM
Raster with shallow reservoir MSA. SRM
Raster with deep reservoir MSA. DRM
Raster with river MSA. RM
Raster with floodplain MSA. FM
Raster with wetland MSA. WM
Raster with shallow lake fractions. SLF
Raster with deep lake fractions. DLF
Raster with shallow reservoir fractions. SRF
Raster with deep reservoir fractions. DRF
Raster with river fractions. RF
Raster with floodplain fractions. FF
Raster with wetland fractions. WF
Output: Raster with total aquatic MSA. OUT
Pseudocode: Select SLF > 0.0 or DRF > 0.0 or SRF > 0.0 or DRF > 0.0 or
RF > 0.0 or FF > 0.0 or WF > 0.0
SumMSA = 0
SumFR = 0
for all MSA/fraction rasters r do:
SumMSA = SumMSA + rM * rF
SumFR = SumFR + rF
Select SumFR > 0.0
OUT = SumMSA / SumFR
Description: Calculates the aquatic MSA for reservoirs.
Input: Raster with shallow reservoir fractions. SRF
Raster with deep reservoir fractions. DRF
Reservoir MSA. RM
Output: Raster with MSA for reservoirs. OUT
Pseudocode: Select SRF > 0.0 or DRF > 0.0
OUT = RM
GLOBIO_CalcAquaticRiverAAPFDMSA.py
Description: Calculates the AAPFD MSA for rivers.
Input: Raster with AAPFD (m3/s). AA
Raster with river fractions. RF
Factor A A
Factor B B
Factor C C
Factor D D
Output: Raster with AAPFD MSA for rivers. OUT
Pseudocode: Select RF > 0.0
OUT = max(A,B * log10(AA + D) + C)
Description: Calculates the aquatic MSA for river
fragmentation.
Input: Raster with distance to downstream dams (km). DDS
Raster with distance to upstream dams (km). DUS
Raster with length of river fragments (km). FL
Raster with dam density (km-2). DD
Raster with River Connectivity Index (RCI). RCI
Raster with river fractions. RF
Factor A A
Factor B B
Factor C C
Factor D D
Factor E E
Factor F F
Output: Raster with MSA for river fragmentation. OUT
Pseudocode: Select RF > 0.0
OUT = A + B * DDS + C * DUS + D * FL + E * DD + F * RCI
Description: Calculates the landuse MSA for rivers.
Input: Raster with FRHLU fractions. LUF
Raster with river fractions. RF
Factor A. A
Output: Raster with the landuse MSA for rivers. OUT
Pseudocode: Select RF > 0.0
OUT = 1.0 - A* LUF
GLOBIO_CalcAquaticRiverMSA.py
Description: Calculates the aquatic MSA for rivers.
Input: Raster with MSA for river fragmentation (optional). RFM
Raster with landuse MSA for rivers. LM
Raster with AAPFD MSA for rivers. AM
Raster with river fractions. RF
Output: Raster with MSA for rivers. OUT
Pseudocode: Select RF > 0.0
if RFM is specified:
OUT = RFM * LM * AM
else:
OUT = LM * AM
Description: Calculates the aquatic landuse MSA for wetlands and
floodplains.
Input: Raster with FRHLU fractions. LUF
Raster with wetland fractions. WF
Raster with floodplain fractions. FF
Factor A. A
Output: Raster with landuse MSA for wetlands and OUT
floodplains.
Pseudocode: Select WF > 0.0 or FF > 0.0
OUT = 1.0 - A * LUF
Description: Calculates the fractions of loss and actual wetlands.
Input: Raster with landuse (10 arc-sec). LU
Raster with wetland fractions. WF
Output: Raster with wetland loss fractions. OUTL
Raster with actual wetland fractions. OUTA
Pseudocode: Calculate 10 arc-sec raster with cell area.
Select from area raster where LU<>urban and
LU<>crop and LU<>pasture.
Set area to 0.0.
Resample 10 arc-sec to 30 arc-sec and sum anthropogenic areas.
Calculate 30 arc-sec raster with cell area (total area).
Calculate anthropogenic fractions = anthropogenic area / total area.
Select WF > 0.0.
OUTL = WF * anthropogenic fractions
OUTA = WF - OUTL
Description: Calculates the aquatic MSA for wetlands.
Input: Raster with landuse MSA for wetlands and floodplains. LUM
Raster with wetland loss fractions. LF
Raster with actual wetland fractions. AF
Wetland loss MSA. WLM
Output: Raster with MSA for wetlands. OUT
Pseudocode: LOM = WLM
Select AF > 0.0 or LF > 0.0.
SumMSA = 0
SumFR = 0
for all MSA/fraction rasters r do:
SumMSA = SumMSA + rM * rF
SumFR = SumFR + rF
Selecteer SumFR > 0.0
OUT = SumMSA / SumFR
After installing GLOBIO 4 (see the Installation Guide) the Aquatic submodules can be run like any other GLOBIO 4 module using the command globio.
The Aquatic submodules are defined in the configuration file Globio_Aquatic.glo located in the Config directory. Unlike the GLOBIO 4 modules, by default this file in not already included.
To use the Aquatic submodules in your run configuration script you must include the submodules by adding the following line at the beginning of your script:
INCLUDE Globio_Aquatic.glo
In Linux open a terminal window and go to the directory where GLOBIO 4 is installed (for example /Globio4/src/Globio). Type the following command:
cd /Globio4/src/Globio
CAUTION: Be sure you have installed the extra libraries and software and you have defined the environment variable TAUDEMPATH in the globio4 shellscript.
Create your own configuration script or edit the existing configuration file Run_Aquatic_All.glo in the directory Scripts. Modify the paths and other settings to meet your needs. To run the script type the following command.
globio Run_Aquatic_All.glo
After the script is finished the results can be found in the output directory specified in the script.