problem running AED2

14 views
Skip to first unread message

CG

unread,
Apr 27, 2026, 8:46:21 AM (4 days ago) Apr 27
to Aquatic Ecosystem MOdelling Network (AEMON) discussion forum


Hello all,

I am trying to run simulations using GLM–AED2, but I am not succeeding. I have been able to run simulations with GLM alone, and everything worked fine. However, when I add the biogeochemical module, the simulation stops after approximately two years (while temperature is still being modelled).

I am almost sure that the issue comes from the sediment module in the glm3.nml file, but I do not know how to correct it. I am running the model with GLM v3.0.5, but I also tried GLM v3.3, and it still does not work.

Another strange thing is that, in the overflow file, I have values for temperature, NIT_amm, NIT_nit, and PHS_frp, but not for OXY_oxy or SIL_rsi.

You can find my glm3.nml and aed2.nml files below. Do you have an idea of where it could come from ?

GLM :

&glm_setup
   sim_name = 'EguzonGLMSimulation'
   max_layers = 500
   min_layer_vol = 0.05
   min_layer_thick = 0.05
   max_layer_thick = 1.044548
   density_model = 1
/
&mixing
   surface_mixing = 1
   coef_mix_conv = 0.1235774
   coef_wind_stir = 0.1807641
   coef_mix_shear = 0.221332
   coef_mix_turb = 0.5568999
   coef_mix_KH = 0.1028209
   deep_mixing = 2
   coef_mix_hyp = 0.2576925
   diff = 0
/
&wq_setup
   wq_lib = 'aed2'
   wq_nml_file = 'aed2/aed2.nml'
   ode_method = 1
   split_factor = 1
   bioshade_feedback = .true.
   repair_state = .true.
   mobility_off = .false.
/
&morphometry
   lake_name = 'Eguzon'
   latitude = 46.45315
   longitude = 1.61388
   base_elev = 150
   crest_elev = 201.7
   bsn_len = 7392
   bsn_wid = 403
   bsn_vals = 72
   H = 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 195.5, 195.7, 196, 196.3, 196.5, 196.7, 197, 197.3, 197.5, 197.7, 198, 198.3, 198.5, 198.7, 199, 199.3, 199.5, 199.7, 200, 200.3, 200.5, 200.7, 201, 201.3, 201.5, 201.7
   A = 900, 8900, 18200, 28600, 36500, 44300, 51500, 59700, 68300, 77600, 85000, 95900, 107100, 120900, 135200, 156300, 180900, 197700, 210400, 254500, 330300, 405600, 472400, 544600, 608700, 664700, 742900, 809900, 872200, 937900, 1004400, 1079200, 1144900, 1209400, 1275000, 1341900, 1411600, 1488700, 1559500, 1630000, 1704300, 1773900, 1849600, 1924000, 2001100, 2113500, 2177400, 2208900, 2256400, 2295500, 2320500, 2346000, 2387800, 2424100, 2447300, 2473100, 2511900, 2550800, 2576600, 2602500, 2641300, 2680100, 2706000, 2731900, 2770700, 2809500, 2835400, 2861300, 2900100, 2938900, 2964800, 2990600
/
&time
   timefmt = 2
   start = '2020-01-01 00:00:00'
   stop = '2024-12-31 00:00:00'
   dt = 3600
   timezone = 0
/
&output
   out_dir = 'output'
   out_fn = 'output'
   nsave = 24
   csv_lake_fname = 'eguzon'
   csv_point_nlevs = 1
   csv_point_fname = 'WQ_'
   csv_point_at = 0.5
   csv_point_nvars = 6
   csv_point_vars = 'TEMP','OXY_oxy','SIL_rsi','NIT_amm','NIT_nit','PHS_frp'
   csv_outlet_allinone = .false.
   csv_outlet_fname = 'outlet_'
   csv_outlet_nvars = 6
   csv_outlet_vars = 'TEMP','OXY_oxy','SIL_rsi','NIT_amm','NIT_nit','PHS_frp'
   csv_ovrflw_fname = 'overflow'
/
&init_profiles
   lake_depth = 50.41
   num_depths = 3
   the_depths = 0.5, 10.5, 31.5
   the_temps  = 8.295, 8.195, 7.167
   the_sals   = 0, 0, 0
   num_wq_vars = 10
   wq_names = 'SIL_rsi','NIT_amm','NIT_nit','PHS_frp',
              'OGM_pon','OGM_don','OGM_pop','OGM_dop','OGM_poc','OGM_doc'
   wq_init_vals = 231, 231, 231,
      1.8, 1.8, 1.8,
      191, 191, 191,
      0.6, 0.6, 0.6,
      17, 17, 17,
      142, 142, 142,
      1.18, 1.18, 1.18,
      8.6, 8.6, 8.6,
      80, 80, 80,
      675, 675, 675
/
&meteorology
   met_sw = .true.
   lw_type = 'LW_IN'
   rain_sw = .false.
   atm_stab = 0
   rad_mode = 1
   albedo_mode = 1
   cloud_mode = 2
   fetch_mode = 0
   subdaily = .true.
   meteo_fl = 'input_files/weather_v3_longwave.csv'
   wind_factor = 0.8625975
   sw_factor = 0.9177645
   lw_factor = 1
   at_factor = 1
   rh_factor = 1
   rain_factor = 1
   ce = 0.002014294
   ch = 0.002610605
   cd = 0.001102113
   catchrain = .false.
   rain_threshold = 0.01
   runoff_coef = 0.3
/
&light
   light_mode = 0
   n_bands = 4
   light_extc = 1, 0.5, 2, 4
   energy_frac = 0.51, 0.45, 0.035, 0.005
   Benthic_Imin = 10
   Kw = 1.393423
/
&bird_model
   AP = 973
   Oz = 0.279
   WatVap = 1.1
   AOD500 = 0.033
   AOD380 = 0.038
   Albedo = 0.2
/
&inflow
   num_inflows = 3
   names_of_strms = 'creuse','petite_creuse','sedelle'
   strm_hf_angle = 75, 70, 30
   strmbd_slope = 0.4, 0.4, 0.4
   strmbd_drag = 0.016, 0.016, 0.016
   inflow_factor = 1, 1, 1
   inflow_fl = 'input_files/inflow_creuse_glm_aed2.csv','input_files/inflow_petite_creuse_glm_aed2.csv','input_files/inflow_sedelle_glm_aed2.csv'
   inflow_varnum = 3
   inflow_vars = 'flow','temp','salt'
   coef_inf_entrain = 0
   time_fmt = 'YYYY-MM-DD'
/
&outflow
   num_outlet = 1
   outlet_type = 1
   outl_elvs = 185.1807
   bsn_len_outl = 5100
   bsn_wid_outl = 200
   outflow_fl = 'input_files/outflow_glm_turb_res.csv'
   outflow_factor = 1
   time_fmt = 'YYYY-MM-DD'
/
&sediment
   sed_heat_Ksoil = 0.01, 0.01, 0.01
   sed_temp_depth = 0.15, 0.15, 0.15
   sed_temp_mean = 6, 7, 18
   sed_temp_amplitude = 3.5, 8, 20
   sed_temp_peak_doy = 190, 190, 190
   benthic_mode = 2
   n_zones = 3
   zone_heights = 10, 20, 51.7
   sed_reflectivity = 0.1, 0.01, 0.01
   sed_roughness = 0.1, 0.01, 0.01
/
&debugging
   disable_evap = .false.
/

AED2 :

&aed2_models
   models = 'aed2_noncohesive','aed2_oxygen','aed2_carbon','aed2_silica','aed2_nitrogen','aed2_phosphorus','aed2_organic_matter','aed2_phytoplankton','aed2_totals'
/
&aed2_noncohesive
   num_ss = 1
   ss_initial = 1
   Ke_ss = 0.06
   settling = 1
   w_ss = -0.03
   d_ss = 2e-06
   rho_ss = 1500
   resuspension = 0
   epsilon = 0.007
   tau_0 = 0.03
   tau_r = 1
   Ktau_0 = 0.001
   macrophyte_link_var = ''
   simSedimentMass = .true.
   fs = 0.4
   sed_porosity = 0.256
/
&aed2_oxygen
   oxy_initial = 360
   Fsed_oxy = -30
   Ksed_oxy = 51.6
   theta_sed_oxy = 1.02
/
&aed2_carbon
   dic_initial = 1600.5
   Fsed_dic = 3
   Ksed_dic = 20
   theta_sed_dic = 1.08
   pH_initial = 7.5
   atm_co2 = 0.00037
   co2_model = 1
   alk_mode = 1
   ionic = 0.1
   co2_piston_model = 1
   ch4_initial = 27.6
   Rch4ox = 0.01
   Kch4ox = 0.5
   vTch4ox = 1.08
   Fsed_ch4 = 0.5
   Ksed_ch4 = 100
   theta_sed_ch4 = 1.08
   methane_reactant_variable = 'OXY_oxy'
   atm_ch4 = 1.76e-06
   ch4_piston_model = 1
/
&aed2_silica
   rsi_initial = 231
   Fsed_rsi = 0.6
   Ksed_rsi = 50
   theta_sed_rsi = 1.08
   silica_reactant_variable = 'OXY_oxy'
/
&aed2_nitrogen
   amm_initial = 1.8
   nit_initial = 191
   n2o_initial = 0.03
   Rnitrif = 0.03
   Knitrif = 78.1
   theta_nitrif = 1.08
   nitrif_reactant_variable = 'OXY_oxy'
   nitrif_ph_variable = ''
   simNitrfpH = .false.
   Rnh4o2 = 1
   Rno2o2 = 1
   simN2O = 0
   Rn2o = 0.05
   Kpart_ammox = 1
   Kin_deamm = 1
   atm_n2o = 3.2e-07
   n2o_piston_model = 4
   Rnh4no2 = 1
   Ranammox = 0.001
   Kanmx_nit = 2
   Kanmx_amm = 2
   Rdenit = 0.5
   Kdenit = 2
   theta_denit = 1.08
   Rdnra = 0.01
   Kdnra_oxy = 2
   simDryDeposition = .true.
   atm_din_dd = 0.5
   simWetDeposition = .true.
   atm_din_conc = 0.5
   Fsed_amm = 1.35
   Ksed_amm = 20
   Fsed_nit = -0.5
   Ksed_nit = 100
   Fsed_n2o = 0
   Ksed_n2o = 100
   theta_sed_amm = 1.08
   theta_sed_nit = 1.08
/
&aed2_phosphorus
   frp_initial = 0.6
   Fsed_frp = 0.08
   Ksed_frp = 50
   theta_sed_frp = 1.08
   phosphorus_reactant_variable = 'OXY_oxy'
   simPO4Adsorption = .true.
   ads_use_external_tss = .false.
   po4sorption_target_variable = 'NCS_ss1'
   PO4AdsorptionModel = 1
   Kpo4p = 0.1
   ads_use_pH = .false.
   Kadsratio = 1
   Qmax = 1
   w_po4ads = -9999
   simDryDeposition = .true.
   atm_pip_dd = 0
   simWetDeposition = .false.
   atm_frp_conc = 0
/
&aed2_organic_matter
   poc_initial = 80
   doc_initial = 675
   pon_initial = 17
   don_initial = 142
   pop_initial = 1.18
   dop_initial = 8.6
   docr_initial = 350
   donr_initial = 13
   dopr_initial = 3
   cpom_initial = 100
   Rpoc_hydrol = 0.01
   Rdoc_minerl = 0.104411
   Rpon_hydrol = 0.05
   Rdon_minerl = 0.05
   Rpop_hydrol = 1e-04
   Rdop_minerl = 0.05
   theta_hydrol = 1.08
   theta_minerl = 1.067978
   Kpom_hydrol = 31.25
   Kdom_minerl = 156.25
   simDenitrification = 1
   dom_miner_oxy_reactant_var = 'OXY_oxy'
   doc_miner_product_variable = ''
   don_miner_product_variable = 'NIT_amm'
   dop_miner_product_variable = 'PHS_frp'
   dom_miner_nit_reactant_var = 'NIT_nit'
   f_an = 1
   K_nit = 10
   simRPools = .false.
   Rdomr_minerl = 1e-04
   Rcpom_bdown = 1e-04
   X_cpom_n = 5e-04
   X_cpom_p = 1e-04
   KeDOM = 5e-06
   KePOM = 0.00096
   KeDOMR = 0.1
   KeCPOM = 0.00096
   simphotolysis = .false.
   photo_c = 0.75
   settling = 3
   w_pom = -0.06
   d_pom = 1e-05
   rho_pom = 1200
   w_cpom = -0.01
   d_cpom = 1e-05
   rho_cpom = 1400
   resuspension = 0
   resus_link = 'NCS_resus'
   sedimentOMfrac = 2e-04
   Xsc = 0.5
   Xsn = 0.05
   Xsp = 0.005
   Fsed_doc = 0
   Fsed_don = 0
   Fsed_dop = 0
   Ksed_dom = 4.5
   theta_sed_dom = 1.08
   extra_diag = .false.
/
&aed2_phytoplankton
   num_phytos = 10
   the_phytos = 1, 2, 3, 4, 6, 7, 8, 9, 10, 11
   settling = 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
   do_mpb = 0
   R_mpbg = 0.5
   R_mpbr = 0.05
   I_Kmpb = 100
   mpb_max = 1000
   resuspension = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   resus_link = ''
   n_zones = 3
   active_zones = 1
   p_excretion_target_variable = 'OGM_dop'
   n_excretion_target_variable = 'OGM_don'
   c_excretion_target_variable = 'OGM_doc'
   si_excretion_target_variable = ''
   p_mortality_target_variable = 'OGM_pop'
   n_mortality_target_variable = 'OGM_pon'
   c_mortality_target_variable = 'OGM_poc'
   si_mortality_target_variable = ''
   p1_uptake_target_variable = 'PHS_frp'
   n1_uptake_target_variable = 'NIT_nit'
   n2_uptake_target_variable = 'NIT_amm'
   si_uptake_target_variable = 'SIL_rsi'
   do_uptake_target_variable = 'OXY_oxy'
   c_uptake_target_variable = 'CAR_dic'
   dbase = 'aed2/aed2_phyto_pars_v1.nml'
   extra_diag = .false.
   min_rho = 900
   max_rho = 1200
/
&aed2_totals
   TN_vars = 'NIT_nit','NIT_amm','OGM_don','OGM_pon','PHY_green_IN'
   TN_varscale = 1, 1, 1, 1, 0.15
   TP_vars = 'PHS_frp','PHS_frp_ads','OGM_dop','OGM_pop','PHY_green_IP'
   TP_varscale = 1, 1, 1, 1, 0.01
   TOC_vars = 'OGM_doc','OGM_poc','PHY_green','PHY_diatom','PHY_crypto'
   TOC_varscale = 1, 1, 1, 1, 1
/

Thanks a lot for your help!

Best regards,
Clara

Tuba Bucak

unread,
Apr 28, 2026, 3:23:21 AM (4 days ago) Apr 28
to aquaticm...@googlegroups.com
Hi Clara,

I just tried running my current lake model setup using your aed2 file (also including the sediment module in glm). Since I didn't have your phytoplankton .nml file, I had to ignore that module for now.

The model ran successfully without crashing - but of course we have different boundary conditions-. The overflow file output is quite interesting as you mentioned: OXY_oxy and SIL_rsi are missing though output.nc seems to be fine. How critical is the overflow WQ file for you? I guess the water quality in the overflow should be identical to the surface layer concentrations. If you just need the data, we can also extract those variables directly from the output.nc file instead. But of course that would be nice to know why we have interesting output in overflow.

If you could share your complete setup, including the phytoplankton file, I can try to have a look again.

Best

CG <clara...@gmail.com>, 27 Nis 2026 Pzt, 14:46 tarihinde şunu yazdı:

   nit_initial = 191*0.014

--
You received this message because you are subscribed to the Google Groups "Aquatic Ecosystem MOdelling Network (AEMON) discussion forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aquaticmodelli...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/aquaticmodelling/6aca6e0b-a640-426d-b373-f0e5d02053c5n%40googlegroups.com.

CG

unread,
Apr 29, 2026, 3:03:57 AM (3 days ago) Apr 29
to Aquatic Ecosystem MOdelling Network (AEMON) discussion forum

Hi,

Thank you for your reply!

I don’t necessarily need the overflow file; I just found it odd that OXY_oxy and SIL_rsi were missing, and I was wondering whether there was something weird in my setup.

I think there is definitely something going on with the sediment module, because I changed the configuration to two zones and now it is running. However, when I look at the generated graphs, there is something really strange with the phosphate flux from the sediments.

For the GLM, I am using the following configuration for the sediment module:

&sediment
   sed_heat_Ksoil = 0.01, 0.01
   sed_temp_depth = 0.15, 0.15
   sed_temp_mean = 7, 18
   sed_temp_amplitude = 8, 25
   sed_temp_peak_doy = 227, 227
   benthic_mode = 2
   n_zones = 2
   zone_heights = 30, 51.7
   sed_reflectivity = 0.01, 0.01
   sed_roughness = 0.01, 0.01
/

Here is my phytoplankton file:

&phyto_data
  pd%p_name               = 'cyano_microcys','cyano_2','green','diatom','crypto'
  pd%p_initial            = 0.1, 0.1, 0.1, 3, 0.1
  pd%p0                   = 0.03, 0.03, 0.03, 0.03, 0.03
  pd%w_p                  = 0, 0, 0, -0.86, 0
  pd%Xcc                  = 50, 50, 40, 50, 40
  pd%R_growth             = 1.9, 1.9, 1.9, 1.9, 1.9
  pd%fT_Method            = 1, 1, 1, 1, 1
  pd%theta_growth         = 1.08, 1.08, 1.08, 1.08, 1.08
  pd%T_std                = 20, 20, 20, 20, 20
  pd%T_opt                = 27.5, 20, 26.3, 16, 18
  pd%T_max                = 38.4, 31, 35, 22, 23
  pd%lightModel           = 0, 0, 0, 0, 0
  pd%I_K                  = 25, 25, 58, 20, 25
  pd%KePHY                = 0.005, 0.005, 0.005, 0.005, 0.005
  pd%f_pr                 = 0.005, 0.005, 0.005, 0.005, 0.005
  pd%R_resp               = 0.05, 0.05, 0.05, 0.05, 0.05
  pd%theta_resp           = 1.08, 1.08, 1.08, 1.08, 1.08
  pd%k_fres               = 0.25, 0.25, 0.25, 0.25, 0.25
  pd%k_fdom               = 0.20, 0.20, 0.20, 0.20, 0.20
  pd%salTol               = 0, 0, 0, 0, 0
  pd%S_bep                = 2, 2, 2, 2, 2
  pd%S_maxsp              = 35, 35, 35, 35, 35
  pd%S_opt                = 0.1, 0.1, 0.1, 0.1, 0.1
  pd%simDINUptake         = 1, 1, 1, 1, 1
  pd%simDONUptake         = 0, 0, 0, 0, 0
  pd%simNFixation         = 0, 0, 0, 0, 0
  pd%simINDynamics        = 2, 2, 2, 2, 2
  pd%N_o                  = 0.25, 0.25, 0.25, 0.25, 0.25
  pd%K_N                  = 1, 1, 1, 1, 1
  pd%X_ncon               = 0.035, 0.035, 0.035, 0.035, 0.035
  pd%X_nmin               = 0.00086, 0.00086, 0.04, 0.0073, 0.0086
  pd%X_nmax               = 0.032, 0.032, 0.08, 0.029, 0.032
  pd%R_nuptake            = 0.032, 0.032, 0.028, 0.028, 0.02
  pd%k_nfix               = 0, 0, 0, 0, 1
  pd%R_nfix               = 0, 0, 0, 0, 0
  pd%simDIPUptake         = 1, 1, 1, 1, 1
  pd%simIPDynamics        = 2, 2, 2, 2, 2
  pd%P_0                  = 0.03, 0.03, 0.03, 0.03, 0.03
  pd%K_P                  = 0.05, 0.05, 0.05, 0.5, 0.05
  pd%X_pcon               = 0.0015, 0.0015, 0.0015, 0.0015, 0.0015
  pd%X_pmin               = 0.004, 0.004, 0.004, 0.004, 0.004
  pd%X_pmax               = 0.009, 0.009, 0.009, 0.009, 0.009
  pd%R_puptake            = 0.006, 0.006, 0.006, 0.007, 0.006
  pd%simSiUptake          = 0, 0, 0, 1, 0
  pd%Si_0                 = 0.3, 0.3, 0.3, 0.3, 0.3
  pd%K_Si                 = 2.5, 2.5, 2.5, 2.5, 2.5
  pd%X_sicon              = 0.4, 0.4, 0.4, 0.4, 0.4
/
Thanks a lot for your help!

Clara

Capture d’écran 2026-04-29 085755.png
Reply all
Reply to author
Forward
0 new messages