# aed2\_carbon

**URL:** <https://opentelemac.org/forum/t/aed2-carbon/7797>\
**Category:** WAQTEL / AED2\
**Created:** [September 11, 2024, 12:34pm UTC](https://opentelemac.org/forum/t/aed2-carbon/7797 "2024-09-11T12:34:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_17573](https://opentelemac.org/forum/letter_avatar_proxy/v4/letter/u/3bc359/32.png) [@user\_17573](https://opentelemac.org/forum/u/user_17573)\
**Post date:** [September 11, 2024, 12:34pm UTC](https://opentelemac.org/forum/t/aed2-carbon/7797/1 "2024-09-11T12:34:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![user\_18865](https://opentelemac.org/forum/letter_avatar_proxy/v4/letter/u/7993a0/32.png) [@user\_18865](https://opentelemac.org/forum/u/user_18865)\
**Post date:** [May 10, 2025, 8:49am UTC](https://opentelemac.org/forum/t/aed2-carbon/7797/2 "2025-05-10T08:49:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![user\_18916](https://opentelemac.org/forum/letter_avatar_proxy/v4/letter/u/57b2e6/32.png) [@user\_18916](https://opentelemac.org/forum/u/user_18916)\
**Post date:** [June 25, 2026, 11:24pm UTC](https://opentelemac.org/forum/t/aed2-carbon/7797/3 "2026-06-25T23:24:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![user\_18916](https://opentelemac.org/forum/letter_avatar_proxy/v4/letter/u/57b2e6/32.png) [@user\_18916](https://opentelemac.org/forum/u/user_18916)\
**Post date:** [June 29, 2026, 11:00pm UTC](https://opentelemac.org/forum/t/aed2-carbon/7797/4 "2026-06-29T23:00:43Z")

</div>

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
