aed2_carbon

Hello

I’m coupling TELEMAC3D with aed2 and I want to output the CO2 flux at the air/water interface (in regards with some water input rich in dissolved organic carbon (DIC) in my study field).

I succeeded in output variables [group removed], car_CH4 and car_pH explained in the aed manual (the “car” term refer to carbon module of aed2) and make them appear in bluekenue. But I didn’t succeed in output the variables called “Diagnostics” in the manual, which are notably CAR_pco2 (CO2 partial pressure in water) and CAR_atm_co2_flux (CO2 flux at the air/water interface).

I put here an example of aed.nml file that I found in telemac, in which we should be able to configure the output of co2 flux at the air/water interface…

! aed2_carbon - AED carbon model

!-------------------------------------------------------------------------------

! dic_initial [float, unit = mmol/m^3]

! initial DIC concentration (can be overwritten by GLM or TFV IC)

! [name removed][float, unit = mmol/m^2/day]

! sediment CO2 flux

! Ksed_dic [float, unit = mmol/m^3]

! half-saturation oxygen concentration controlling CO2 flux

! theta_sed_dic [float, unit = - ]

! Arrhenius temperature multiplier for sediment CO2 flux

! pH_initial [float, unit = - ]

! initial water column pH

! [name removed][float, unit = ppm]

! atmospheric CO2 concentration

! ionic [float, unit = meq]

! average ionic strength of the water column

!

! ch4_initial [float, unit = mmol/m^3]

! initial CH4 concentration (can be overwritten by GLM or TFV IC)

! Rch4ox [float, unit = - ]

! maximum reaction rate of CH4 oxidation @ 20C

! Kch4ox [float, unit = ppm]

! half-saturation oxygen concentration for CH4 oxidation

! vTch4ox [float, unit = meq]

! Arrhenius temperature multiplier for CH4 oxidation

! Fsed_ch4 [float, unit = mmol/m^2/day]

! sediment CH4 flux

! Ksed_ch4 [float, unit = mmol/m^3]

! half-saturation oxygen concentration controlling CH4 flux

! theta_sed_ch4 [float, unit = - ]

! Arrhenius temperature multiplier for sediment CH4 flux

! methane_reactant_variable

! state variable to be consumed during CH4 oxidation

!

! NOTE: Processes such as photosynthesis and bacterial respiration from other

! AED modules should be configured to use the following names:

! CAR_dic

! CAR_ch4

! CAR_pH

!

! DIAGNOSTICS:

! -

!-------------------------------------------------------------------------------

&aed2_carbon

!-- DIC and pH –

dic_initial = 1600.5

Fsed_dic = 3.0

Ksed_dic = 20.0

theta_sed_dic = 1.08

Fsed_dic_variable=‘SDF_Fsed_dic’

pH_initial = 7.5

atmco2 = 370e-6

ionic = 0.1

!-- CH4 –

ch4_initial = 27.6

Rch4ox = 0.01

Kch4ox = 0.5

vTch4ox = 1.08

Fsed_ch4 = 0.5

Ksed_ch4 = 100.0

theta_sed_ch4 = 1.08

methane_reactant_variable=‘OXY_oxy’

! Fsed_ch4_variable=‘SDF_Fsed_ch4’

/

I tried to add the line below in the aed.nml file but it doesn’t work (error message in link with the use of new terms in aed2_carbon) :

! DIAGNOSTICS:

     CAR_atm_co2_flux

!-------------------------------------------------------------------------------

&aed2_carbon

!-- DIC and pH –

co2_model = 1

alk_code = 1

ionic = 0.1

co2_piston_model = 1

Thanks a lot for your help

Raphaël

I have a similar problem. Did you find a solution?

also having a similar issue - aed2 v 1.1.0 seems to have an empty stub for carbonate solver (aed2_equilibrate_carbon)… aed2 v 1.3.0 fixes this, but I am having compilation issues. Will create a new post.

Hi [name removed],

I ran into the same issue. Here’s what I’ve found after a bit of digging:

The diagnostic variables (CAR_pco2, CAR_atm_co2_flux) are registered by the carbon module, so the slots exist in CC_DIAG, but they’re never populated because aed2_equilibrate_carbon is an empty stub in the [group removed] library that ships with TELEMAC. The equilibrate function is where pH would be updated and pCOâ‚‚/flux diagnostics would be written, but in v1.1.0 it does nothing.

The parameters you tried (co2_model, alk_code, co2_piston_model) belong to v1.3.0 of libaed2, which does have the working solver. Unfortunately, building TELEMAC against libaed2 v1.3.0 produces a segfault in the WAQTEL coupling code. I’ve attempted to report this forum (have yet to have the post approved) and GitLab (still waiting for accesses. However, after reaching out to the AED2 developers on GitHub, they confirmed that libaed2 is essentially retired in favor of libaed-water + libaed-api, which are not yet integrated with TELEMAC.

One thing worth knowing: even in v1.1.0, the surface carbon routine (aed2_calculate_surface_carbon) IS computing [group removed] and applying it as a DIC flux. It reads pH, computes pCOâ‚‚ via [name removed]'s law, and calculates the air-water COâ‚‚ flux using a piston velocity model. The problem is that pH is frozen at its initial value (7.5) because the equilibrate stub never updates it, so the flux exists but is wrong in magnitude.

I’m currently implementing a standalone carbonate equilibrium solver (putting it in user_fortran folder) that updates pH from DIC and total alkalinity before CALCULATE_FLUXES is called. This lets AED2’s existing surface routine compute the correct [group removed] with the right pH. Happy to share the code once it’s tested if you’re interested.

Ceci