Ammonia load in calc2d_O2 and calc3d_O2

Summary

The impact of ammonia on dissolved oxygen is not correctly calculated in calc2d_o2 and calc3d_o2. The code assumes that 1 mg/l of ammonia will consume 1 mg/l of oxygen(O2). The correct calculation is that 1 mole of ammonia will consume 1 mole of oxygen . Converting this to mass concentrations , means that 4.57 mg/l of oxygen(O2)is required to consume 1 mg/l of ammonia

Environment

  • Operating System: Windows/Linux
  • TELEMAC version: V9P0R0

Steps to reproduce

telemac2d.py my_case.cas --ncsize 4
...

What is the current bug behaviour?

The code assumes that 1 mg/l of ammonia will consume 1 mg/l of oxygen(O2).

What is the expected correct behaviour?

The correct calculation is that 1 mole of ammonia will consume 1 mole of oxygen . Converting this to mass concentrations , means that 4.57 mg/l of oxygen(O2) is required to consume 1 mg/l of ammonia.

Relevant logs and/or screenshots

The current code is shown below 

image.png

Possible fixes

This is handled in calc2d_eutro and calc3d_eutro by the use of the variable O2NITR , set by the keyword CONSUMED OXYGEN BY NITRIFICATION. The default value is 5.2. The bug reported can be fixed using this variable in calc2d_o2 and calc3d_o2. It's unclear why the default is 5.2 and not 4.57 (64/14 based on molar masses of O2 and N).

It's possible that in the original formulation of calc2d_o2 , the tracer (IND_NH4 and labelled as 'NH4 LOAD on the output files) actually represents the the oxygen demand due to ammonia , so then the equation equation is correct. If that is the case then the documentation should be revised to reflect this, and the units used in the outputs (mg NH4/l ) should be changed to mg O2/l. However , this would not be consistent with the way the same tracer IND_NH4 is used in the 'eutro' routines.