5 Adding Water Quality Models


Now lets turn our attention to the water quality / ecology part of the case-study simulation. Both the WarmLake and TropicalReservoir case-studies have the AED model pre-configured. A schematic (conceptual model) of the interactions being simulated in the AED module are shown below.



Activate the water quality AED modules by making sure the &wq_setup block is ready and uncommented, and the wq_lib = ‘aed’ entry is set. Make sure glm3.nml can find another namelist file aed.nml to configure the water quality model parameters, using the &wq_setup parameter wq_nml_file.


The above simulation was only plotting temperature and salinity and these plots were configured in plots.nml. Open plots.nml to see how you can customise the graphs. There are many other variables we may be interested in plotting when we run the watter quality model such as oxygen, nutrients, and algae. A pre-configured file called plots_aed.nml has been created. To use this file you simply need to add plots_aed.nml after the call to glm –xdisp in the mac terminal or the Windows batch file (right click and open the batch file with a text editor).



In plots_aed.nml the required variables are all listed, make sure the number of plots is high enough to include them all, and feel free to customise the settings.

Table 5.1: Water quality variables and their descriptions.
Description Variable Name
Passive tracer TRC_tr1
Water age TRC_age
Suspended solids NCS_ss1
Dissolved oxygen OXY_oxy
Dissolved inorganic carbon CAR_dic
pH CAR_pH
Methane (dissolved) CAR_ch4
Methane (bubbles) CAR_ch4_bub
Reactive Silica SIL_rsi
Ammonium NIT_amm
Nitrate/Nitrite NIT_nit
Phosphate PHS_frp
Particulate inorganic phosphorus PHS_frp_ads
Dissolved organic carbon OGM_doc
Particualte organic carbon OGM_poc
Dissolved organic nitrogen OGM_don
Particulate organic nitrogen OGM_pon
Dissolved organic phosphorus OGM_dop
Particulate organic phsophorus OGM_pop
Green algae PHY_green
Green algae PHY_green_IN
Green algae PHY_green_IP
Diatoms PHY_diatom
Diatoms PHY_diatom_IN
Diatoms PHY_diatom_IP
Cyrptophytes PHY_crypto
Cyrptophytes PHY_crypto_IN
Cyrptophytes PHY_crypto_IP
Zooplankton ZOO_zoo01


Add water quality variables to the specific depth output files (i.e. WQ_5.csv). To do so we must edit the output section of the glm3.nml file, by adding the variables as extra columns to the WQ_x.csv files that were configured earlier

If they are there already, make sure that the number of variables nvar is high enough to include them all.

As an example of output water quality variables, let’s plot all the nitrogen variables. Change csv_point_vars to include NIT_amm, NIT_nit, OGM_don, OGM_pon, PHY_green_IN - these are all the variables that contribute to the total nitrogen (TN) pool. Now re-run the model (e.g. Windows users double clicking glm.bat again). Once it’s run open WQ_35.csv to see these new variables and create a stacked area plot to show how the different variables contribute to TN.

Create a well formatted, interesting graph of variables of your choice (for example, you may like to consider all of the phytoplankton groups or create sums of these to generate a NPZD model) to see how they interact and change over time. If any variables are much bigger or smaller than the others, then use two y-axes or multiple plots.