Support / Setup of an AED2 Model Configuration Template

Configuration of the AED library "coupler"

Aside from the setup of the modules to be simulated (described below), several configuration options must first be defined for AED2 to manage its operation and interaction with the host model. Note this is different for GLM vs TUFLOW-FV.


For TUFLOW-FV users, an extra settings block is required at the beginning of aed2.nml. An example is shown below:

&aed2_bio !-- AED2 configuration settings solution_method = 1 display_minmax = .false. do_limiter = .true. do_2d_atm_flux = .true. do_particle_bgc = .false. do_zone_averaging = .false. glob_min = -1e38 glob_max = 1e38 min_water_depth =0.0401 n_equil_substep = 12 !-- Linkages with host model: PHYSICS link_bottom_drag = .false. link_surface_drag = .false. link_water_density = .false. !-- Linkages with host model: LIGHT link_ext_par = .false. link_water_clarity = .false. base_par_extinction = 0.2 ext_tss_extinction = .false. tss_par_extinction = 0.02 !-- Linkages with host model: RIPARIAN link_solar_shade = .false. link_rain_loss = .false. !-- Benthic variable initialisation init_values_file = '' route_table_file = '../External/AED2/Routing_Tbl.csv' /

An up to date example compatible with the latest model version is provided here. Note that in addition to this information, for a TUFLOW-FV simulation to enable AED2, then the user must specify the wq model input file in the *.fvc file as described here.

For GLM users, the water quality model is configured via an optional block in the glm2.nml file. An example is shown below:

&wq_setup !-- Choose 'aed2' or 'fabm' (aed2 is the default) wq_lib = 'aed2' wq_nml_file = 'aed2.nml' ode_method = 1 split_factor = 1 bioshade_feedback = .true. repair_state = .true. mobility_off = .false. benthic_mode = 1 n_zones = 3 zone_heights = 10, 20, 40 /

Selection of the AED modules to simulate, via the namelist (nml) file

Individual AED/AED2/AED2+ modules are engaged by including them in the model list in the &models section of the respective namelist file (note the ! indicates a commented line to disable a module). Refer to the specific tab below for the appropriate nml file templates. After the intiial model list declaration, the library then expects a sequence of nml blocks for each module in the order listed, as explained in the next section.

For AED2, users must specify the chosen modules in aed2.nml as a list, with unwanted modules commented out using !, for example:

&aed2_models models = !--> NUTRIENT/CHEMISTRY modules <--! 'aed2_sedflux', !core module 'aed2_tracer', !core module 'aed2_oxygen', !core module 'aed2_carbon', !core module 'aed2_silica', !core module 'aed2_nitrogen', !core module 'aed2_phosphorus', !core module 'aed2_organic_matter', !core module !off 'aed2_seddiagenesis', !plus module !--> BIOLOGY modules <--! 'aed2_phytoplankton', !core module 'aed2_zooplankton', !core module 'aed2_macrophyte', !plus module !off 'aed2_macroalgae', !plus module !off 'aed2_bivalve', !plus module !off 'aed2_pathogens', !plus module !--> RIPARIAN modules <--! !off 'aed2_geochemistry', !plus module !off 'aed2_land', !plus module !off 'aed2_soilbgc', !plus module !off 'aed2_vegetation', !plus module !off 'aed2_ass', !plus module !--> SUMMARY modules <--! 'aed2_totals', !core module 'aed2_habitat' !plus module /

Note that the chosen module list must consider the order of dependencies (i.e., linked modules) and appear in the correct order for the dependencies to be met. As a guide start with the order in the above example.

Variables are identified as a suffix to the module name - MOD_varname - for example, to view oxygen search for the OXY_oxy. The keywords for most of the simulated variables are also used to specify the inflow boundary conditions in relevant inflow files (depending on the hydrodynamic driver). Although there are numerous state variables in total, many are not compulsory and depend on the modules selected and how the interactions between modules are configured. This configuration is done via options outlined in the aed2.nml file. For example, setting the target for excretion would be done by setting the variable:

n_excretion_target_variable = “OGM_don” 


Example aed2.nml files configured to run a AED2 model setups with varying complexity are available below, and in the examples.

  • AED2 configuration -> aed2.nml (English version, please rename to aed2.nml before use).

For users wishing to use (legacy) AED modules via the FABM library, the chosen modules are specified via the main fabm.nml configuration file:

&fabm_nml models = 'aed_oxygen', 'aed_carbon', 'aed_nitrogen', 'aed_phosphorus', 'aed_organic_matter', 'aed_phytoplankton', !'aed_zooplankton' !'aed_pathogens' /

Variables are identified as a suffix to the module name - aed_module_varname - for example, to view oxygen search for the aed_oxygen_oxy. The keywords for most of the simulated variables are also used to specify the inflow boundary conditions in relevant inflow files (depending on the hydrodynamic driver). Although there are numerous state variables in total, many are not compulsory and depend on the modules selected and how the interactions between modules are configured. This configuration is done via options outlined in the fabm.nml file. For example, setting the target for excretion would be done by setting the variable:

n_excretion_target_variable = “aed_organic_matter_don” 


An example fabm.nml file configured to run a simple AED model setup is available below:

  • AED configuration for FABM -> fabm_english.nml (English version, please rename to fabm.nml for use).
  • AED configuration for FABM -> fabm_espanol.nml (Español version, please rename to fabm.nml for use).

Inclusion of &module parameter "blocks" for each chosen module

Following the block that chooses the selected modules (described above), each module then requires a specific namelist block outlining the module specific parameters and options. These must appear in the order outlined in the model selection block. Refer to the specific modules for examples and details of block specification here.


Selection of supporting parameter files

Some of the more complex models rely on an associated "database" file of parameters.

Examples are linked here (click to download examples as txt, then be sure rename to name as listed here):

Refer to the linked science modules for details of the parameter database files. Also refer to the provided GLM-AED tutorial(s) found here for new users. A online database and file creation utility is also available via the following button.

Goto AED2 Online Parameter Database


Setup of supporting "benthic map" initialisation files

Several AED2+ modules support spatially variable benthic and/or sediment properties. In GLM this relates to different "Sediment Zones" (when benthic_mode=2), and for TUFLOW-FV this relates to the "Material ID" specified for each cell when creating the mesh. These are read in via *.csv files specified in the "coupler" section above. Section pending updates soon...


Checking and reviewing an AED2 setup

As the model initialises, it will configure the relevant variables from the selected modules, based on the options and flags that were set in aed2.nml. Users can review how a simulation is configured by viewing the list of initialised variables that are output to the screen and/or log file at the beginning of a simulation as per the example below. Refer to specific modules for variable descriptions and their units.


TO BE UPDATED AED2 var name( 1 ) : OXY_oxy AED2 var name( 2 ) : CAR_dic AED2 var name( 3 ) : CAR_pH AED2 var name( 4 ) : CAR_ch4 AED2 var name( 5 ) : SIL_rsi AED2 var name( 6 ) : NIT_amm AED2 var name( 7 ) : NIT_nit AED2 var name( 8 ) : PHS_frp AED2 var name( 9 ) : OGM_doc AED2 var name( 10 ) : OGM_poc AED2 var name( 11 ) : OGM_don AED2 var name( 12 ) : OGM_pon AED2 var name( 13 ) : OGM_dop AED2 var name( 14 ) : OGM_pop AED2 var name( 15 ) : PHY_green AED2 var name( 16 ) : PHY_green_IN AED2 var name( 17 ) : PHY_green_IP AED2 var name( 18 ) : PHY_diatom AED2 var name( 19 ) : PHY_diatom_IN AED2 var name( 20 ) : PHY_diatom_IP AED2 var name( 21 ) : PHY_crypto AED2 var name( 22 ) : PHY_crypto_IN AED2 var name( 23 ) : PHY_crypto_IP AED2 var name( 24 ) : ZOO_zoo01 AED2 var name( 25 ) : ZOO_zoo02 AED2 var name( 26 ) : BIV_filtfrac AED2 var name( 27 ) : TRC_ss1 AED2 var name( 28 ) : TRC_ret AED2 var name( 29 ) : TST_pel AED2 var name( 30 ) : TST_pel_bflux AED2 var_ben name( 1 ) : BIV_zebra AED2 var_ben name( 2 ) : BIV_quagga AED2 var_ben name( 3 ) : TST_ben

Style Switcher

Predefined Colors

Layout Style

Background Image

Background Color

Reset