Use of Water Quality Module Diagnostics

From TUFLOW FV Wiki
Jump to navigation Jump to search
USEFUL LINKS
Wiki Links Help Downloads
TUFLOW FV Wiki Main Page Products Support/Contact TUFLOW FV Downloads
TUFLOW FV Tutorials Requesting a Licence Tutorial Module Data
TUFLOW Classic/HPC Wiki TUFLOW FV Glossary Manuals

Description

This wiki page presents two examples of how diagnostic variable outputs provided by the TUFLOW FV Water Quality (WQ) Module might be used in water quality model calibration. These diagnostic outputs mostly describe fluxes of computed variables, e.g. uptake rates of nitrate by phytoplankton (i.e. uptake fluxes). They are therefore valuable in establishing which water quality processes are dominating a simulation, and hence what parameters should be varied (within acceptable ranges) to progress model calibration. In short, diagnostic outputs should be fully exploited when calibrating water quality models: their judicious use will obviate the need to revert to legacy approaches of applying ‘educated guesses’ to parameter modification during water quality model calibration processes, with commensurate savings of time, effort and expense.


The Model

The freely available water quality mass conservation model is used in these examples, and it is explained in full in this Appendix of the TUFLOW FV Water Quality (WQ) Module User Manual. A general overview from that Appendix is repeated here.

The mass conservation model is configured as follows.

  • General
    • 1 month (745 hours) duration
    • Includes salinity, temperature (and heat calculations), sediment and varying numbers of water quality computed variables
    • 15 minute output
    • 15 minute water quality simulation timestep
    • Designed to mimic a deep lake that cools over an autumnal period
  • Geometry
    • Four three-dimensional flat bottomed columns, with the same bed elevation
    • Lateral cell areas each of approximately 10 km²
    • Depth of 21 metres
    • 20 vertical layers, with 17 fixed and 3 sigma (which span the top 4 metres of the water column)
  • Boundary conditions
    • No inflows, outflows or other flow boundaries
    • Meteorological boundaries applied
      • Hourly timestep, 15 minute update
      • Typical mid latitude autumnal conditions, with rainfall included
  • Water quality parameterisation
    • WQ Module control files that present the parameters used are included below for each simulation
    • Each simulation includes the most complex simulation construction (for each simulation class) so as to stress test all available processes
    • Parameters are set to be generally within expected ranges, with some deliberate exceptions designed to illustrate the parameter checking features of the WQ Module
WQDiag 2.01.png

This setup of essentially stationary water is designed to be challenging for mass conservation. In particular, the exclusion of external flow boundaries (that can reset or overwhelm internal process calculations) is deliberate and suits the use of diagnostic variables to understand internal processing pathways. These conditions might mimic a low rainfall lacustrine environment.


Set up TUFLOW FV

This tutorial recommends the use of TUFLOW FV 2023.0 or later. Download, set up and running the model are described in the TUFLOW FV Water Quality Module User Manual Appendix noted above. Please download the model from the TUFLOW Website under the Example / Demo Models section.
The mass conservation model requires linking with the external turbulence model GOTM. To do so, download the TUFLOW FV External Turbulence API. Once downloaded, unzip the file .\GOTM\tuflowfv_external_turb.dll and replace the default tuflowfv_external_turb.dll that resides in the same directory as TUFLOWFV.exe. If this step has already been undertaken as part of running TUFLOW FV tutorials, then it need not be repeated here.


Base Case

This wiki page uses the inorganics, milligrams per litre mass balance simulation. To execute the model, open a command window and navigate to ‘mass_conservation_model’ directory of the model folder structure:

WQDiag 4.01.png

The following command should then be issued from the command window (where <tuflowfv.exe> is the path to the user’s TUFLOWFV.exe):

  • run INORGANICS MGL <tuflowfv.exe>

Results will be written to the ‘results’ directory and can be interrogated using the MATLAB or Python tools provided with TUFLOW FV. Further instruction on results interrogation is therefore not provided here.


Example 1: Nitrate

This example will examine nitrate concentrations in the surface layer of the mass conservation model. The base case nitrate concentration timeseries (i.e. an unchanged water quality configuration in the mass conservation model) is below. Nitrate concentrations increase by about 10% throughout the course of the simulation.

WQDiag 5.0.01.png

For the purposes of this example, it will be assumed that calibration data has been collected and that it shows that nitrate concentrations decrease over this time, rather than increase. The question for the modeller then arises as to which of the multitude of parameters that control nitrate concentration should (or could) be adjusted (and in which direction) in order to better calibrate the model. The TUFLOW FV WQ Module diagnostics can be used to directly address this question. The steps to do so are described following.

Step 1: Identify relevant processes and flux pathways

The first step in using the available diagnostics is to determine which processes are of relevance. To do so, the relationships between nitrate and the fluxes that determine its concentration need to be identified. This information is presented (in the case of the inorganics simulation class used in this example) in this interactive figure in the TUFLOW FV Water Quality User Manual. A screen grab of the relevant part of this figure – with the linkages to and from nitrate highlighted – is repeated below. This highlighting of nitrate-related processes is achieved simply by clicking once on the nitrate icon in the figure within the manual.

WQDiag 5.1.01.png

The figure shows that the following water quality processes (or flux pathways) influence the concentration of nitrate in the inorganics simulation class:

  • Nitrate sinks (red arrows directed away from the nitrate icon)
    • Denitrification
    • Dissimilatory reduction of nitrate to ammonium (DRNA)
    • Anaerobic oxidation of ammonium (Anammox), and
    • Productivity (uptake by phytoplankton, either directly (basic phytoplankton model) or indirectly via internal nitrogen (advanced phytoplankton model))
  • Nitrate sources (blue arrows directed towards the nitrate icon)
    • Wet and dry atmospheric deposition
    • Nitrification, and
    • Sediment flux

Step 2: Identify the corresponding diagnostic variables

The next step in using the available diagnostics is to relate the above processes (flux pathways) to the reported TUFLOW FV WQ Module diagnostic variables. This can be achieved through reviewing the relevant Appendix in the TUFLOW FV Water Quality Module User Manual. Given the large number of diagnostic variables available, the dynamic tabular search function in the Appendix should be used to do so. An example is shown below of the search function in operation. The search term is ‘denitrification’ and the result is a table that is one row long (instead of 104).

WQDiag 5.2.01.png

The entry contains all the information needed to utilise the diagnostic variable in subsequent calculations, including the variable name, units, description and a hyperlink to the relevant equation describing denitrification flux in the body of the manual (boxed in red). The target of this link (Equation F.7 and associated text) is below for information.

WQDiag 5.2.02.png

Repeating this process, users can identify the following diagnostic variables that describe the fluxes from Step 1 that relate to nitrate concentration. The relevant equations from the user manual are also show for completeness:

Nitrate sinks:

  • Denitrification
    • WQ_DIAG_DENITRIFICATION_MG_L_D
WQDiag 5.2.03.png
  • Dissimilatory reduction of nitrate to ammonium (DRNA)
    • WQ_DIAG_DISS_NO3_RED_MG_L_D
WQDiag 5.2.04.png
  • Anaerobic oxidation of ammonium (Anammox), and
    • WQ_DIAG_ANAER_NH4_OX_MG_L_D
WQDiag 5.2.05.png
  • Productivity
    • WQ_DIAG_PHYTO_COM_NO3_UPTAKE_MG_L_D
WQDiag 5.2.06.png

Nitrate sources:

  • Wet and dry atmospheric deposition
    • WQ_DIAG_DIN_ATMOS_EXCHANGE_MG_M2_D
WQDiag 5.2.07.png
  • Nitrification
    • WQ_DIAG_NITRIFICATION_MG_L_D
WQDiag 5.2.08.png
  • Sediment flux
    • WQ_DIAG_ACTUAL_NO3_SED_FLUX_MG_M2_D
WQDiag 5.2.09.png

Step 3: Output the corresponding diagnostic variables

The next step in using the available diagnostics is to run a simulation that outputs these variables. There are several ways to do this, but all involve setting up output blocks in an *.fvc control file. The first way is to simply output all diagnostic variables in a block, using the ‘wq_diag_all’ flag as follows:

WQDiag 5.3.01.png

Given their large number however, these output files can become very large very quickly, and the time taken to write them during simulations can be a nontrivial computational overhead. It is therefore recommended that only required diagnostic variables be output. In this example (given the outcomes of Step 2) the corresponding output blocks could look like the following, where two blocks have been used for clarity:

WQDiag 5.3.02.png

Step 4: Process the corresponding diagnostic variables

Once the required diagnostic variables have been identified (Step 2) and output (Step 3), they can be interrogated. This will require some post processing with either MATLAB or Python. One important aspect of post processing is that all diagnostics be converted to the same units of mass flux. Diagnostics are reported as concentration fluxes, so some processing is required to do this. An example MATLAB script ‘Example1.m’ is provided in the functions directory of the mass conservation model Git repository.

..\wqm\mass_conservation_model\matlab\functions\Example1.m

It is designed to be used alongside this wiki page only, and it is not intended for any other use or extension. Users are welcome to independently extend its use of course, but support will not be provided by TUFLOW to do so and the functioning of the script cannot be guaranteed.

The above script:

  • Interrogates a WQ results file at a surface cell
  • Converts all diagnostics to fluxes in kg/day
  • Plots nitrate concentration, flux sinks and flux sources in one figure to allow comparison

This output is used in the next step.

Step 5: Interpret corresponding diagnostic variables

Once the required diagnostic variables have been identified (Step 2), output (Step 3) and post processed (Step 4), they can be interpreted. The key outcome of this interpretation is the identification of fluxes that dominate a particular computed variable concentration – i.e. have the largest absolute magnitudes. The underlying processes that produce these fluxes will therefore contribute significantly to resultant concentrations of computed variables of interest (in this example, nitrate). The parameters that govern these processes can then be adjusted as required. Presented as a hierarchy, this process of interpretation is:

  • Identify largest magnitude fluxes
    • Identify underlying simulated processes that produce this flux
      • Identify associated parameters that can be varied to modify this flux

In short, the use of TUFLOW FV WQ Module diagnostic variables is a defensible and efficient way to quickly identify which user specified parameters can and should be altered to influence simulation behaviours and therefore predictions to better align with data and/or measurements. Diagnostics are therefore extremely valuable tools for the modeller who is subject to time, budget and resource constraints. This is hierarchy process is demonstrated following.

Identify largest magnitude fluxes

The resultant figure produced from interrogating the unchanged mass conservation model at one of the four surface cells (specifically, 3D cell ID 1) using the MATLAB script noted above is as follows.

WQDiag 5.5.1.01.png

The figure presents the following timeseries for predictions in a single cell (3D cell ID 1), in three panes which are (from top to bottom):

  • Nitrate concentration (mg/L)
  • Fluxes that are sinks of nitrate (kg/day)
  • Fluxes that are sources of nitrate (kg/day)

The fluxes (in kg/day) are presented on the same vertical scale, which allows for easy comparison.

The figure shows that:

  • The largest sink flux is denitrification. Uptake fluxes sometimes exceed denitrification but uptake is not constant (it only occurs during daylight hours) so represents a smaller cumulative flux over the simulation duration
  • The largest source flux is nitrification

Identify underlying processes

By using these diagnostics, it can be immediately seen that denitrification and nitrification processes dominate the calculation of nitrate concentrations in the cell considered. The equations that govern these processes (taken from the user manual) were presented above but are repeated here for convenience.

Denitrification:

WQDiag 5.5.2.01.png

Nitrification:

WQDiag 5.5.2.02.png

Identify associated commands and parameters

If (as per assumed in this example) it is required that nitrate concentrations decrease over the course of the simulation rather than increase (as per the top pane in the figure above), then on inspection of the above equations (and the Commands Appendix in the user manual) there are two options for parameter adjustment available to the user:

  • Alter parameters in the ‘denitrification == ‘ command in the inorganic nitrogen model block of the water quality control file to increase denitrification fluxes. These are:
    • Increase denitrification rate
    • Alter the half saturation oxygen concentration for denitrification
    • Alter the denitrification temperature coefficient
  • Alter parameters in the ‘nitrification == ‘ command in the inorganic nitrogen model block of the water quality control file to decrease nitrification fluxes. These are:
    • Decrease nitrification rate
    • Alter the half saturation oxygen concentration for nitrification
    • Alter the nitrification temperature coefficient

The exact nature of parameter changes will need to be decided by the user, however for illustrative purposes, both options presented above are considered here.

Firstly, the denitrification rate can be increased (by way of example only it has been doubled) as follows.

WQDiag 5.5.3.01.png

The equivalent figure presenting nitrate concentrations and associated fluxes (with the latter being on the same vertical axes limits as previously presented) follows.

WQDiag 5.5.3.02.png

The figure shows that indeed the dentrification (sink) flux has increased (second pane) and with no other changes to the model, has resulted in the desired decrease in simulated nitrate concentration (top pane) of 3D cell 1.

Alternatively, the nitrification rate could have been reduced. After returning the denitrification rate to its original value, the nitrification rate was therefore reduced as follows. No other changes were made to the model parameterisation.

WQDiag 5.5.3.03.png

The equivalent figure presenting nitrate concentrations and associated fluxes (with the latter being on the same vertical axes limits as previously presented) follows.

5.5.3.04.png

The figure shows that indeed the nitrification (source) flux has decreased (third pane) and with no other changes to the model, has resulted in the desired decrease in simulated nitrate concentration (top pane) of 3D cell 1.

The user may wish to explore the impact on predicted nitrate concentrations of altering other parameters in the above equations.


Example 2: Phytoplankton

This example will examine phytoplankton concentrations in the surface layer of the mass conservation model. The base case green phytoplankton group concentration timeseries (i.e. an unchanged water quality configuration in the mass conservation model) is below. Concentrations fluctuate with day and night but remain relatively constant throughout the course of the simulation.

WQDiag 6.0.01.png

For the purposes of this example, it will be assumed that calibration data has been collected and that it shows that green phytoplankton concentrations increase substantially (i.e. bloom) over this time, rather than remain constant. The question for the modeller then arises as to which of the multitude of processes and parameters that control phytoplankton concentration should (or could) be adjusted (and in which direction) in order to better calibrate the model. The TUFLOW FV WQ Module diagnostics can again be used to directly address this question. The steps to do so are described following.

Step 1: Identify relevant processes and flux pathways

The first step in using the available phytoplankton diagnostics is to determine which processes are of relevance. To do so, the relationships between phytoplankton and its sources and sinks need to be identified. This information is presented (in the case of the inorganics simulation class used in this example) in this interactive figure in the TUFLOW FV Water Quality User Manual. A screen grab of the relevant part of this figure – with the linkages to and from phytoplankton concentrations highlighted – is repeated below. This highlighting of phytoplankton-related processes is achieved simply by clicking once on the phytoplankton icon in the figure within the manual.

WQDiag 6.1.01.png

The figure shows that the following processes (or flux pathways) influence the concentration of phytoplankton in the inorganics simulation class:

  • Phytoplankton sinks (red arrows directed away from the phytoplankton icon)
    • Settling
    • Mortality
    • Energy release (i.e. respiration)
    • Excretion (from both respiration and exudation), and
    • Exudation
  • Phytoplankton source (blue arrow directed towards the phytoplankton icon)
    • Productivity

Given this simulation’s configuration, this list can be consolidated as follows:

  • Phytoplankton sinks (red arrows directed away from the phytoplankton icon)
    • Settling
    • Mortality
    • Respiration
    • Excretion (summed from respiration and exudation)
  • Phytoplankton source (blue arrow directed towards the phytoplankton icon)
    • Productivity

Step 2: Identify the corresponding diagnostic variables

In the case of phytoplankton dynamics, the TUFLOW FV Water Quality Module offers two suites of complementary diagnostic variables:

  • Flux diagnostics (which are conceptually similar to the nitrate fluxes discussed in Example 1 above), and
  • Limitation functions

These are described following.

Flux diagnostics

In a similar fashion to the nitrate fluxes discussed in Example 1, phytoplankton fluxes are reported as diagnostics. This can be identified through reviewing the relevant Appendix in the TUFLOW FV Water Quality Module User Manual. Given the large number of diagnostic variables available, the dynamic tabular search function in the Appendix should be used to do so. An example is shown below of the search function in operation. The search term is ‘productivity’ and the result is a table that is twelve rows long (instead of 104) The first row is shown below.

WQDiag 6.2.1.01.png

The entry contains all the information needed to utilise the diagnostic variable in subsequent calculations, including the variable name (noting the placeholder in the diagnostic variable name ‘PHY_NAME’ – this will be ‘GREEN’ in the current example), units, description and a hyperlink to the relevant equation describing productivity flux in the body of the manual (boxed in red). The target of this link (Equation I.5 ) is below for information.

WQDiag 6.2.1.02.png

Repeating this process, users can identify the following diagnostic variables that describe the consolidated fluxes from Step 1 that relate to phytoplankton concentration (with ‘GREEN’ in the name to match simulation results). The relevant equations from the user manual are also shown for completeness.

Phytoplankton sinks:

  • Settling
    • WQ_DIAG_GREEN_SEDMTN_MICG_M2_D
WQDiag 6.2.1.03.png
  • Mortality
    • WQ_DIAG_GREEN_MORT_MICG_L_D
WQDiag 6.2.1.04.png
  • Respiration
    • WQ_DIAG_GREEN_RESP_MICG_L_D
WQDiag 6.2.1.05.png
  • Excretion (summed from respiration and exudation)
    • WQ_DIAG_GREEN_EXCR_MICG_L_D
WQDiag 6.2.1.06.png

Phytoplankton source:

  • Productivity (see the user manual for details on calculation of the productivity rate)
    • WQ_DIAG_GREEN_PRIM_PROD_MICG_L_D
WQDiag 6.2.1.07.png

There are also parallel suites of some diagnostic variables for nitrogen and phosphorus, however only the carbon suite is considered here. Users may interact with the parallel diagnostics if they wish.

Limitation function diagnostics

An additional suite of phytoplankton diagnostics are also reported. Rather than being fluxes, these additional diagnostics are ’limitation functions’, and have no units. Most commonly (but not always), these refer to the limitations that are being placed on phytoplankton productivity. There is one limitation function reported for each controlling environmental driver, regardless of whether a user has configured a particular phytoplankton group to respond to all drivers. These drivers are:

  • Light
  • Temperature
  • Salinity
  • Silicate
  • Nitrogen, and
  • Phosphorus

Each limitation function varies between zero (0.0) and one (1.0), except for the temperature limitation function that is greater than or equal to zero (0.0). A value of zero for a given driver’s limitation function means that the driver completely supresses phytoplankton growth. An example of this is the limitation function for light, which is always zero during night time hours: phytoplankton cannot produce (grow) without sunlight. Conversely, a value of one for a given driver’s limitation function means that the driver does not supresses phytoplankton growth at all. An example of this might be freshwater phytoplankton producing (growing) in waters entirely devoid of salt. A temperature limitation function greater than one means that phytoplankton productivity is enhanced under ambient temperatures, compared to productivity at 20 degrees Celsius.

All these limitation functions can again be identified through reviewing the relevant Appendix in the TUFLOW FV Water Quality Module User Manual. Given the large number of diagnostic variables available, the dynamic tabular search function in the Appendix should be used to do so. An example is shown below of the search function in operation. The search term is ‘limitation’ and the result is a table that is seven rows long (instead of 104) The first row is shown below.

WQDiag 6.2.2.01.png

The entry contains all the information needed to utilise the diagnostic variable, including the variable name (noting the placeholder in the diagnostic variable name ‘PHY_NAME’ – this will be ‘GREEN’ in the current example), units, description and a hyperlink to the relevant section describing light limitation (there are many models to choose from) in the body of the manual (boxed in red). An example of a light limitation function is shown below for information.

WQDiag 6.2.2.02.png

Repeating this process, users can identify the following diagnostic variables that describe all limitation functions (with ‘GREEN’ in the name to match simulation results). The relevant equations from the user manual (particular to those used in this example of the mass conservation model) are also shown following:

  • Light
    • WQ_DIAG_PHYTO_GREEN_LGHT_LIM_ND
WQDiag 6.2.2.03.png
  • Temperature
    • WQ_DIAG_PHYTO_GREEN_TMPTR_LIM_ND
WQDiag 6.2.2.04.png
  • Salinity
    • WQ_DIAG_PHYTO_GREEN_SAL_LIM_ND
WQDiag 6.2.2.05.png
  • Silicate
    • WQ_DIAG_PHYTO_GREEN_SI_LIM_ND
WQDiag 6.2.2.06.png
  • Nitrogen
    • WQ_DIAG_PHYTO_GREEN_N_LIM_ND
WQDiag 6.2.2.07.png
  • Phosphorus
    • WQ_DIAG_PHYTO_GREEN_P_LIM_ND
WQDiag 6.2.2.08.png

Step 3: Output the corresponding diagnostic variables

The next step in using the available diagnostics is to run a simulation that outputs these variables. There are several ways to do this, but all involve setting up output blocks in an *.fvc control file. The first way is to simply output all diagnostic variables in a block, using the ‘wq_diag_all’ flag as follows:

WQDiag 6.3.01.png

Given their large number however, these output files can become very large very quickly, and the time taken to write them during simulations can be a nontrivial computational overhead. It is therefore recommended that only required diagnostic variables be output. In this example (given the outcomes of Step 2) the corresponding output blocks could look like the following, where several blocks have been used for clarity:

WQDiag 6.3.02.png

Step 4: Process the corresponding diagnostic variables

Once the required diagnostic variables have been identified (Step 2) and output (Step 3), they can be interrogated. This will require some post processing with either MATLAB or Python. One important aspect of post processing is that all diagnostics be in the same units of mass flux. Diagnostics are reported as concentration or areal fluxes, so some processing is required to do this. An example MATLAB script ‘Example2.m’ is provided in the functions directory of the mass conservation model Git repository.

..\wqm\mass_conservation_model\matlab\functions\Example2.m

It is designed to be used alongside this wiki page only, and it is not intended for any other use or extension. Users are welcome to independently extend its use of course, but support will not be provided by TUFLOW to do so and the functioning of the script cannot be guaranteed.

The above script:

  • Interrogates a WQ results file at a surface cell
  • Converts all diagnostics to fluxes in kg/day of chlorophyll a
  • Plots two figures:
    • Phytoplankton (green) concentration, flux sinks and the flux source
    • Phytoplankton (green) concentration, with all limitation functions

These outputs are used in the next step.

Step 5: Interpret corresponding diagnostic variables

Once the required diagnostic variables have been identified (Step 2), output (Step 3) and post processed (Step 4), they can be interpreted. The key outcome of this interpretation for phytoplankton is twofold:

  • The identification of fluxes that dominate a phytoplankton concentration – i.e. have the largest absolute magnitudes. The underlying processes that produce these fluxes will therefore contribute significantly to resultant concentrations of computed variables of interest. The parameters that govern these processes can then be adjusted as required.
  • The identification of environmental drivers that inhibit (in this example) phytoplankton productivity. Altering the way in which these drivers influence productivity can contribute significantly to the prediction of phytoplankton productivity. The parameters that govern these processes can also then be adjusted as required.

Presented as a hierarchy, this process of interpretation is:

  • Identify largest magnitude fluxes
    • Identify underlying simulated processes that produce this flux
      • Identify associated parameters that can be varied to modify this flux
  • Identify lowest limitation function values
    • Identify underlying environmental drivers that produce these values
      • Identify associated parameters that can be varied to modify these limitation functions

In short, the use of TUFLOW FV WQ Module diagnostic variables is a defensible and efficient way to quickly identify which user specified parameters can and should be altered to influence simulation behaviours and therefore predictions to better align with data and/or measurements. Diagnostics are therefore extremely valuable tools for the modeller who is subject to time, budget and resource constraints. This is hierarchy process is demonstrated following, firstly for fluxes and then limitation functions.

Fluxes

Identify largest magnitude fluxes

The resultant figure produced from interrogating the unchanged mass conservation model at one of the four surface cells (specifically, 3D cell ID 1) using the MATLAB script noted above is as follows (settling fluxes have been omitted because they do not include upwards turbulent mixing and as such have a less clear interpretation).

WQDiag 6.5.1.1.01.png

The figure presents the following timeseries for predictions in a single cell (3D cell ID 1), in three panes which are (from top to bottom):

  • Green phytoplankton concentration (μg/L)
  • Fluxes that are sinks of green phytoplankton (kg/day)
  • The flux that is a source of phytoplankton (kg/day)

To allow for clear presentation of subsequent fluxes (in kg/day) the sinks and sources are not presented on the same vertical scale. All subsequent figures do, however, maintain the individual axes limits presented above, per pane, for ease of comparison with this base case.

The figure shows that:

  • The largest sink flux is excretion (and by inference, exudation). Excretion dominates losses to mortality and respiration to the extent that the latter two fluxes are not easily visible at the plotted scale
  • The only source flux is productivity

Identify underlying processes

By using these diagnostics, it can be immediately seen that excretion and productivity processes dominate the calculation of phytoplankton concentrations in the cell considered. The equations that govern these processes (taken from the user manual) were presented above but are repeated here for convenience.

Excretion:

WQDiag 6.5.1.2.01.png

Productivity:

WQDiag 6.5.1.2.02.png

Identify associated commands and parameters

If (as per assumed in this example) it is required that phytoplankton concentrations increase over the course of the simulation rather than remain relatively constant (as per the top pane in the figure above), then on inspection of the above equations (and the Commands Appendix in the user manual) there are two commands for parameter adjustment available to the user:

  • Alter parameters in the ‘respiration == ‘ command in the basic phytoplankton model block of the water quality control file to reduce exudation fluxes (noting that respiration and excretion parameters in this command all influence exudation, see above equations).
  • Alter parameters in the ‘productivity == ‘ command in the basic phytoplankton model block of the water quality control file to increase productivity fluxes

Given the complexity of phytoplankton simulation, there are a multitude of different parameters that could be altered across the two commands above. Perhaps the most common (and least dexterous) approach to increasing phytoplankton concentrations is simply to increase the user specified productivity rate – a higher productivity rate is often thought to boost phytoplankton concentrations linearly. Whilst this approach may sometimes have merit, judicious interpretation of the diagnostic variables and their underlying equations (above) reveals that increasing this productivity will increase both productivity and exudation. Given that these are the two primary competing fluxes in the current example, increasing the productivity rate should not be expected to be a quick fix solution.

To demonstrate this, the (already quite high) green phytoplankton productivity rate has been increased by a further 50% and the model reinterrogated. The corresponding command change is as follows.

WQDiag 6.5.1.3.01.png

The equivalent figure presenting green phytoplankton concentrations and associated fluxes (with the latter being on the same vertical axes limits as previously presented) follows.

WQDiag 6.5.1.3.02.png

The figure shows that whilst the green phytoplankton concentrations do increase, the exudation fluxes also increase significantly over the unchanged case, and so offset productivity gains. Noting that this approach is rather blunt, and that the productivity rate is outside expected ranges, a user will do well in this instance to examine other means of increasing green phytoplankton growth.

One other such approach is to reduce the fractionation of productivity lost to exudation and excretion. Without altering respiration rates, reducing these proportions will reduce overall excretion losses. As such, productivity was returned to the unchanged rate, and these fractionation parameters reduced as follows.

WQDiag 6.5.1.3.03.png

The corresponding green phytoplankton concentration and flux figure follows.

WQDiag 6.5.1.3.04.png

The figure shows that with specification of all parameters within typical ranges, significant increases in green phytoplankton concentrations over the course of the simulation can be achieved – even beyond those predicted previously by using unrealistically high productivity rates. This has been possible through methodical interrogation and interpretation of flux based diagnostic variables. Such an approach, that exploits flux based diagnostic information is therefore highly recommended.

Limitation functions

The above interrogation of fluxes is useful for modifying phytoplankton simulation. It should not, however, be undertaken without also considering the available limitation function diagnostic information. These functions describe the manner in which environmental drivers (such as light) influence phytoplankton dynamics, so support and enhance flux based assessments described above. An example interrogation process is described following.

Identify smallest limitation function values

The resultant figure produced from interrogating the unchanged mass conservation model at one of the four surface cells (specifically, 3D cell ID 1) using the MATLAB script noted above is as follows.

WQDiag 6.5.2.1.01.png

Recalling that a limitation function value of zero indicates complete suppression of growth, the limitation functions above together describe the environmental drivers that limit growth at any given time. For example, light limits growth every day during night time hours, and its limitation function is zero during those hours accordingly. Also, the figure has nitrogen limitation at a constant value of 1 (i.e. never limiting) and this is because this phytoplankton group has been configured to fix atmospheric nitrogen, which is considered to be an infinite (unlimiting) source of nitrogen. Other limitation functions are relatively constant and vary between zero and one.

In order to identify the suite of environmental drivers that inhibit phytoplankton growth over time, the minimum of all limitation functions at each output timestep is required: this timeseries of a minimum will reveal the environmental driver/s most limiting growth. This minimum is plotted as a thick black line in the figure below, which is otherwise the same as the figure above.

WQDiag 6.5.2.1.02.png

Identify environmental drivers

The figure shows that the environmental drivers that control phytoplankton productivity are light and phosphorus availability:

  • Light completely supresses productivity during night time hours
  • Phosphorus limitation is responsible for the clipping of phytoplankton productivity during daylight hours, as shown in previous flux related figures and repeated below, with red boxed highlighting over two examples of this clipping.
WQDiag 6.5.2.2.01.png

Assuming that green phytoplankton concentrations are to be increased (as is the case in this example), the above suggests that the parameters associated with user specification of the phosphorus limitation function (presented above and repeated here for convenience) could be altered to relax this clipping.

WQDiag 6.5.2.2.02.png

Identify associated commands and parameters

On inspection of the above equation (and the Commands Appendix in the user manual) there is one command for parameter adjustment available to the user:

  • Alter parameters in the ‘phosphorus limitation == ‘ command in the basic phytoplankton model block of the water quality control file to relax this limitation

Using the equation above, the two parameters that could be altered in this command are the minimum phosphorus concentration for uptake, and the half saturation phosphorus concentration for uptake. If these concentrations are reduced then the above equation has that phosphorus limitation will be relaxed (i.e. increase the value of the phosphorus limitation function).

To demonstrate this, the green phytoplankton phosphorus limitation parameters were altered as follows.

WQDiag 6.5.2.3.01.png

The corresponding green phytoplankton concentration and limitation function figure follows.

WQDiag 6.5.2.3.02.png

As expected, the phosphorus limitation has been relaxed and results in the following:

  • Green phytoplankton concentrations increase in time, rather than maintaining the reasonably constant behaviour seen in the base case model
  • The overall minimum limitation function (thick black line in the lower pane) has increased during daylight hours so that phosphorus is no longer limiting, or clipping productivity
  • Temperature is now limiting phytoplankton productivity during daylight hours

Given that temperature is now limiting green phytoplankton productivity during daylight hours, relaxing that limitation is described below as a final demonstration of the use of TUFLOW FV Water Quality Module diagnostic variables.

Identify associated commands and parameters (temperature)

The simplest method to relax temperature limitation is to turn it off. This is unrealistic in most instances but is nonetheless offered by the Water Quality Module. The command to do so follows.

WQDiag 6.5.2.4.01.png

For this condition, applied to the simulation above where phosphorus limitation has already been relaxed, the corresponding green phytoplankton concentration and limitation function figure follows.

WQDiag 6.5.2.4.02.png

The figure shows a significant increase in the predicted concentrations of green phytoplankton over the duration of the simulation, and this is expected given the total relaxation of temperature (and phosphorus) limitation on productivity. The figure also shows that salinity is now the limiting environmental driver during daylight hours.

Rather than turn off temperature limitation entirely, it is generally more defensible to use the standard temperature limitation function and reshape it to better suit environmental (water temperature) conditions. This is achieved by:

  • Altering the standard, optimal and maximum temperatures in the ‘temperature limitation == standard, ….’ command, and/or
  • Altering the temperature coefficient for productivity in the ‘primary productivity == ‘ command

The TUFLOW FV Water Quality Module then takes these temperatures and computes the form of the standard temperature limitation function. This computation is complex and described in detail in the TUFLOW FV Water Quality User Manual, and the relevant section should be reviewed if necessary.

Given this complexity, the shape of the computed temperature limitation function for each simulated phytoplankton group is reported to the water quality log file in a form that is easily copied and pasted into plotting software such as Microsoft Excel or MATLAB. This reporting is to assist users in understanding the outcomes of the Water Quality Module’s calculation of the standard temperature function from user specification of (only) three temperatures - the connection between these three temperatures and the computed temperature limitation function has historically been opaque, so the computed function’s reporting in the water quality log file attempts to improve visibility of this process.

The green phytoplankton’s computed temperature limitation function, as reported in the water quality log file for the unchanged base case simulation is presented in the figure following. The red dots in the figure are the actual temperature limitation values computed at the simulation’s water temperatures for the duration of the simulation. As expected, these red dots fall on the overall computed temperature limitation function – they are a subset of the complete temperature limitation function.

WQDiag 6.5.2.4.03.png

On review of the figure, it is clear that ambient temperature conditions are not optimal for the green phytoplankton group under the unchanged base case temperature limitation function specification. Rather, the computed limitation funciton has the highest (least limiting) values between 21 and 23 degrees Celsius (which is consistent with specifying an optimal temperature of 22 degrees Celsius). The user can explore the changes in temperature function resulting from specification of different standard, optimum and maximum temperatures, but for the purposes of this example, the temperature coefficient for productivity will be reduced to alter the computed temperature limitation functin. Using the below, this will result in (amongst other things) a shallower temperature limitation function at temperatures less that the standard temperature.

WQDiag 6.5.2.4.04.png

The command to do so follows.

WQDiag 6.5.2.4.05.png

For this condition, applied to the simulation above where phosphorus limitation has already been relaxed (but temperature limitation reverted to the unchanged condition):

WQDiag 6.5.2.4.06.png

The corresponding green phytoplankton concentration and limitation function figure follows.

WQDiag 6.5.2.4.07.png

The figure shows that:

  • Green phytoplankton concentrations increase in time, but to a lesser extent than when temperature limitation was completely turned off
  • Salinity and temperature have similar computed limitation on productivity

The base and modified computed temperature limitation functions, together with the corresponding values for the modified simulation follows.

WQDiag 6.5.2.4.08.png

The figure shows that:

  • Consistent with the increased green phytoplankton concentrations, the modified temperature limitation function relaxes temperature limitation (has a higher value) in the region of simulated water temperatures, as expected.

In summary, the above example shows that with judicious and considered manipulation of phytoplankton limitation parameterisations, significant increases in green phytoplankton concentrations over the course of the simulation can be achieved. This has been possible through methodical interrogation and interpretation of limitation function diagnostic variables. Such an approach, in conjunction with exploiting the information available in flux-based phytoplankton diagnostics, is highly recommended. Moreover, it is considered unlikely that a rigorous and defensible phytoplankton model set up and calibration process would not draw on the power offered by the diagnostic variables inherent in the outputs of the TUFLOW FV Water Quality Module.

Conclusion

This page has covered the use of TUFLOW FV WQ Module diagnostic variables. There are many more to explore than just those discussed here so please do so - all diagnostic variables are described in the WQ Module user manual Appendix | here. To complete more tutorials or learn more tips and tricks, please return to the TUFLOW FV Wiki Mainpage.