-
Notifications
You must be signed in to change notification settings - Fork 7
/
12-nitrogen.Rmd
616 lines (456 loc) · 30.7 KB
/
12-nitrogen.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
---
nocite: |
@bruce2015
---
# Inorganic Nitrogen
## Contributors
Daniel Paraska, Louise Bruce, Peisheng Huang, and Matthew R. Hipsey
## Overview
Nitrogen is fundamental to shaping water quality in aquatic ecosystems. Nitrogen is of particular interest in that exists in many redox states and there are a myriad of organic and inorganic reactions that make up the nitrogen biogeochemical system. NO~3~^-^ and NH~4~^+^ are the primary inorganic nutrients that are taken up by aquatic plants (phytoplankton, macroalgae and macrophytes) to build biomass as organic nitrogen. As nitrogen is a core building block of an aquatic ecosystem, `aed_nitrogen` ($\mathrm{NIT}$) is designed as a low-level module for managing the inorganic nitrogen pools, and is able to be linked to by higher order modules associated with primary production, organic matter breakdown, and other ecosystem processes.
The general nitrogen redox processes specifically resolved in this module are NH~4~^+^ oxidation to NO~3~^-^ by O~2~, and NO~3~^-^ reduction to N~2~ with organic matter. Advanced options are available, in which the end result is generation of the nitrogen species N~2~O. Producing N~2~O uses more variables and reaction pathways and is not necessary for most nutrient cycling studies. The module also supports processes associated with the dissolved sediment flux and atmospheric deposition.
Importantly, nitrogen species react with organic matter. The description of organic matter involvement in nitrogen reactions and interactions can be found in Section (OGM). The uptake and use of these variables by phytoplankton and macroalgae are described in Section (PHY) and (MAG).
When configuring the $\mathrm{NIT}$ module, users must first identify the level of complexity they wish to adopt in their nitrogen module configuration. Whilst the module is highly configurable, users generally adopt the default model, and if N2O or more granuallr resolution of nitrogen redox interactions are required then they can choose these more advanced options via the switch `simN2O`.
## Model Description - Default Model
### Process Descriptions
In the default nitrogen module configuration, the variables NO~3~ and NH~4~ are included as state variables and able to be modified by nitrification, denitrification, sediment release and atmospheric deposition; to use this basic functionality, ensure the parameter `simN2O` is set to 0. The main balance equations for these two simulated variables are summarised as:
```{=tex}
\begin{eqnarray}
\frac{D}{Dt}NO_3 = \color{darkgray}{ \mathbb{M} + \mathcal{S} } \quad
&+& \overbrace{f_{nitrf}^{NH_4} - f_{denit}^{NO_3} + \check{f}_{atmdep}^{NO_3}+\hat{f}_{sed}^{NO_3}}^\text{aed_nitrogen} \\ (\#eq:nit1)
&-& \color{brown}{ f_{nup}^{PHY} - f_{nup}^{MAG} } \\ \nonumber
\end{eqnarray}
```
```{=tex}
\begin{eqnarray}
\frac{D}{Dt}NH_4 = \color{darkgray}{ \mathbb{M} + \mathcal{S} } \quad
&-& \overbrace{ f_{nitrf}^{NH_4} + \check{f}_{atmdep}^{NH_4}+\hat{f}_{sed}^{NH_4}}^\text{aed_nitrogen} \\ (\#eq:nit2)
&+& \color{brown}{ f_{min}^{DON} - f_{nup}^{PHY} - f_{nup}^{MAG} } \\ \nonumber
\end{eqnarray}
```
where $\mathbb{M}$ and $\mathcal{S}$ refer to water mixing and boundary source terms, respectively, and the coloured $\color{brown}{f}$ terms reflect the optionally configurable contributions from other modules; these include the mineralisation of $DON$ and $N$ cycling terms associated with photosynthesis and respiration by various biotic groups.
If users wish to include NO~2~ or N~2~O as state variables in a simulation, then refer to Section X.4
#### Nitrification and denitrification reactions
In an environment of high O~2~, NH~4~^+^ is oxidized by oxygen to NO~3~^-^ via nitrification. In an environment of low O~2~, NO~3~^-^ is reduced to N~2~ via the process denitrification. O~2~ limitation on the rate of the reaction is not included in the default setup, but can be chosen by the user, as described in the section below.
#### Nitrification
The rate of nitrification is assumed to vary primarily due to temperature, and also due to variation in O~2~ and pH, according to:
```{=tex}
\begin{equation}
f_{nitrf}^{NH_4} =R_{nitrf} \; \theta_{nitrif}^{T-20} \; {\underbrace{\Phi_{O2}^{nitrf}\left[O_2\right] \Phi_{pH}^{nitrf}\left[pH\right]}_{\text{Optional limitations}}} \; NH_4
(\#eq:nitrogen3)
\end{equation}
```
where $\theta_{nitrif}$ is a Arrhenius temperature parameter specific to nitrification, and $T$ is the temperature produced by the host model. O~2~ limitation on this rate will not be included in the setup unless a link to the oxygen module is made, as described in the section below.
**Oxygen limitation on nitrification:** An extra option is to allow low O~2~ concentration to limit the nitrification rate, $\Phi_{O_{2}}^{nitrf}\left[O_2\right]$. If the [aed_oxygen module](#DO_1) is linked to the nitrogen module, then this setting will switch on automatically. The limitation effect is calculated according to:
```{=tex}
\begin{equation}
\Phi_{O_{2}}^{nitrf}\left[O_2\right]=\frac{O_2}{O_2+K_{nitrif}}
(\#eq:nitrogen4)
\end{equation}
```
where $K_{nitrif}$ is a half saturation constant concentration of oxygen. The purpose of this factor is to reduce the rate of nitrification as oxygen moves below a critical concentration.
**pH limitation on nitrification:** The rate of nitrification can be decreased at very high and low pH values, if pH is being simulated (see [Carbon](#Carbon_1) and Geochemistry). To use this function, the parameter `simNitrfpH` is set to `.TRUE.`. Around neutral pH, between the upper and lower optimum parameters, the reaction proceeds at the normal rate. Below a lower tolerance, and above an upper tolerance, the reaction is stopped entirely. Between the optimum and tolerance values, the rate is limited, in proportion to pH.
<!-- The piecewise function is described as: -->
<!-- ```{=tex} -->
<!-- \begin{equation} -->
<!-- \Phi_{pH}^{nitrf}[pH]= -->
<!-- \left\{\begin{array}{ll} -->
<!-- 0, \ \ \ \ pH < 0\\ -->
<!-- 0, \ \ \ \ x \geq 0\\ -->
<!-- 1, \ \ \ \ x \geq 0\\ -->
<!-- 0, \ \ \ \ x \geq 0\\ -->
<!-- 0, \ \ \ \ pH \geq 0\\ -->
<!-- \end{array} -->
<!-- \right. -->
<!-- (\#eq:nitrogen5) -->
<!-- \end{equation} -->
<!-- ``` -->
<!-- The function is shown schematically in Figure \@ref(fig:nitrogen-2). -->
<!-- <center> -->
<!-- ```{r nitrogen-2, echo=FALSE, message=FALSE, warning=FALSE, fig.cap="pH limitation on nitrification.", out.width = '70%'} -->
<!-- library(ggplot2) -->
<!-- library(plotly) -->
<!-- library(knitr) -->
<!-- pH <- c(5,6,7,7.1,7.9,8,9) -->
<!-- Rate <- c(0,0,0,1,1,0,0) -->
<!-- plot_data <- data.frame(pH, Rate) -->
<!-- plot <- ggplot(data = plot_data, aes(pH, Rate)) + -->
<!-- geom_line(colour = "red", lwd = 1.2, lineend = "round") + -->
<!-- scale_x_continuous(limits = c(4,10), breaks = c(4,5,6,7,8,9,10))+ -->
<!-- labs(x="pH", y = "Rate factor")+ -->
<!-- theme_classic() + -->
<!-- theme(axis.title.x=element_text(colour = "black", size = 13), -->
<!-- axis.title.y=element_text(colour = "black", size = 13), -->
<!-- axis.text.y = element_text(colour = "black", size = 11), -->
<!-- axis.text.x = element_text(colour = "black", size = 11), -->
<!-- text = element_text(size=20)) -->
<!-- ggplotly(p = plot) -->
<!-- ``` -->
</center>
**Light limitation on nitrification:** This process is not currently included and is an open area for contributions.
#### Denitrification
Denitrification is a heterotrophic process occurring in low oxygen environments such as anoxic bottom waters and sediments. In addition to oxygen, the rate of denitrification depends on temperature and nitrate availability. It is calculated according to:
```{=tex}
\begin{equation}
f_{denit}^{NO_3} = R_{denit}\; \theta_{denit}^{T-20}\; \frac{NO_3}{NO_3+K_{NO3}} \; \Phi_{O2}^{denit}\left[O_2\right] NO_3 (\#eq:nitrogen6)
\end{equation}
```
where $R_{denit}$ is the kinetic rate constant for denitrification and $\theta_{denit}$ is a temperature parameter specific to denitrification. The Monod term in Equation \@ref(eq:nitrogen6) slows the rate at low NO~3~^-^ concentrations, and allows it to proceed at the maximum rate `R_denit` at high NO~3~^-^ concentrations. The parameter `KNO3` is the half-saturation parameter for limiting the reaction rate and is set by the user to slow the rate at low NO~3~^-^ concentrations. This parameter should not be confused with the O~2~ limitation factor `K_denit`, mentioned below; O~2~ limitation on the rate of the reaction is not included in the default setup, but can be chosen by the user, as described in the section below.
**Oxygen mediation of denitrification:** For denitrification, oxygen slows the reaction through inclusion of an inhibition function as:
```{=tex}
\begin{equation}
\Phi_{O2}^{denit}\left[O_2\right]=
\left\{\begin{array}{ll} \frac{K_{denit}}{O_{2}+K_{denit}},\ \ \ \ \ \ \ \Theta^{denit}_{oxylim} = 1\\
e^{(-O_{2}/K_{denit})},\ \ \ \Theta^{denit}_{oxylim} = 2\\
\end{array}
\right.
(\#eq:nitrogen7)
\end{equation}
```
Such that the denitrification rate is inhibited by high O~2~ concentrations, using the parameter `K_denit`. This parameter is an O~2~ concentration, and should not be confused with the parameter `KNO3` which is a NO~3~^-^ concentration. To use the process shown in Equation \@ref(eq:nitrogen7), the switch `oxy_lim`, $\Theta_{oxylim}^{denit}$, set to the number 1.
Alternatively, the rate of denitrification can be set to decreases exponentially at high O~2~ concentrations, also using the parameter `Kdenit`. This is the same parameter as for the inhibition function described above, but applied differently.
#### Atmospheric deposition
Nitrogen can be added to the surface cells of an aquatic system through two kinds of atmospheric deposition: wet and dry. These functions can be turned on by setting the parameters `simDryDeposition` and `simWetDeposition` to `.TRUE.`.
\begin{equation}
f_{atmdep}^{NOx}=\left[{\underbrace{F_{atm}^{DIN}}_{\text{Dry flux}}}+{\underbrace{R_n\left[t\right] {DIN}_{atm}}_{\text{Wet flux}}}\right] \frac{{k}_{DINdepNO_x}}{\Delta z_{surf}}
(\#eq:nitrogen8)
\end{equation} \begin{equation}
f_{atmdep}^{NH_4}=\left[{\underbrace{F_{atm}^{DIN}}_{\text{Dry flux}}} + {\underbrace{R_n\left[t\right] {DIN}_{atm}}_{\text{Wet flux}}}\right]\frac{\left({1-k}_{DINdepNO_x}\right)}{\Delta z_{surf}}
(\#eq:nitrogen9)
\end{equation}
where $\Delta z_{surf}$ is the surface layer thickness. Wet deposition adds nitrogen as a result of rain, $R_n$ (m/day), which is a variable or a boundary condition provided as an environment variable from the host model. The deposition from rain is proportional to the atmospheric nitrogen concentration `atm_din_conc`. As with dry deposition, the proportion that is assigned to NO~x~ and NH~4~^+^ is given by the same parameter `f_dindep_nox`.
#### Sediment flux
NO~3~^-^ and NH~4~^+^ can flux into the water column from the sediment, using the parameters $F_{sed}^{nit}$ and $F_{sed}^{amm}$, which set the maximum flux rate. The maximum flux rate is limited by temperature, using the parameters `theta_sed_nit` and `theta_sed_amm`, according to
\begin{equation}
f_{sed}^{NOx}=F_{sed}^{nit} \theta_{sednit}^{T-20}\Phi_{O2}^{nit}\left[O_2\right]
(\#eq:nitrogen10)
\end{equation} \begin{equation}
f_{sed}^{NH4}=F_{sed}^{amm} \theta_{sedamm}^{T-20}\Phi_{O2}^{amm}\left[O_2\right]
(\#eq:nitrogen11)
\end{equation}
This assumes that there is a higher flux at higher temperatures; set $\theta_{sed}=1.0$ to remove any temperature dependance.
**Oxygen mediation of the sediment nitrogen fluxes:** As with the nitrification reaction, the sediment flux can be changed by bottom water O~2~ concentration. If the [aed2_oxygen module](#DO_1) is correctly linked to the nitrogen module then this setting will switch on automatically. At low O~2~ concentrations, the amount of NO~3~^-^ fluxing out of the sediment is decreased and at high O~2~ concentrations, it is set close to the `F_sed_nit`, as shown in Equation \@ref(eq:nitrogen12). This is a convenient simplification that can be tuned within this module, rather than a more complicated full set of biogeochemical reactions. The parameter `K_sed_nit` can be used to tune the NO~3~^-^ flux dependence on bottom water O~2~. A similar function can be used to tune the NH~4~^+^ flux using the parameter `K_sed_amm`, as shown in Equation 13. At high O~2~ concentrations, NH~4~^+^ flux decreases, and at low O~2~ concentrations, the flux is close to the parameter `F_{sed}^{amm}`.
```{=tex}
\begin{equation}
\Phi_{O2}^{nit}\left[O_2\right]=\frac{O_2}{K_{sednit}+O_2}
(\#eq:nitrogen12)
\end{equation}
```
```{=tex}
\begin{equation}
\Phi_{O2}^{amm}\left[O_2\right]=\frac{K_{sedamm}}{K_{sedamm}+O_2}
(\#eq:nitrogen13)
\end{equation}
```
**Advanced options:** The approach described here is the most simple and default method for capturing DIN fluxes from the sediment, and is sometimes referred to the static model. This approach can be extended to allow for spatial variability in $F_{sed}^{nit}$ and $F_{sed}^{amm}$, by engaging the link to the aed_sedflux module, where the host models support multiple benthic cells or zones. In this case, users input spatially discrete values of $F_{sed}^{nit}$ and $F_{sed}^{amm}$.
Where dynamic rates of DIN species are required to flux to/from the sediment (e.g. in response to episodic loading of organic material to the sediment, or for assessment of long-term changes in N loading), then the above expressions (Eq \@ref(eq:nitrogen10)-\@ref(eq:nitrogen13)) are replaced instead with dynamically calculated variables in aed_seddiagenesis, via a link created with the aed_sedflux module.
### Variable Summary
The default variables created by this module, and the optionally required linked variables needed for full functionality of this module are summarised in Table X.
### Parameter Summary
The default parameters and settings used by this module are summarised in Table \@ref(tab:nitrogen_tab1).
```{r nitrogen_tab1, fig.cap="Default parameters/settings for the Nitrogen module.", echo=FALSE, message=FALSE, warning=FALSE}
library(gt)
library(tidyverse)
library(kableExtra)
library(rmarkdown)
aed <- read.csv("tables/12-nitrogen/table1.csv", check.names=FALSE)
aed %>%
gt() %>%
tab_row_group(
group = "Sediment Flux",
rows = 17:22
) %>%
tab_row_group(
group = "Atmospheric Deposition",
rows = 12:16
) %>%
tab_row_group(
group = "Nitrification/Denitrification",
rows = 1:11
) %>%
tab_options(container.height = px(1000),
container.overflow.y = TRUE,
container.overflow.x = TRUE,
table.font.size = 12,
column_labels.background.color = "#14759e",
row_group.background.color = "lightgrey",
column_labels.font.weight = "bold",
column_labels.font.size = 14) %>%
fmt_markdown(columns = everything())
```
### Optional Module Links
Other nitrogen sources/sinks are indicated in Eq \@ref(eq:nit1)-\@ref(eq:nit2). These include:
- Ammonium release during bacterial mineralisation of DON in the organic matter module - aed_organic_matter;
- Nitrate consumption during denitrification of DON in the organic matter module - done in aed_organic_matter if simDenitrification == 1;
- Oxygen consumption during nitrification is done in the nitrogen module - [aed_nitrogen][Inorganic Nutrients: C/N/P/Si];
- Ammonium and nitrate uptake by phytoplankton phtosynthesis is done in the phytoplankton module - [aed_phytoplankton][Phytoplankton];
- Ammonium and nitrate uptake by macroalgae phtosynthesis is done in the macroalgae module - [aed_phytoplankton][Phytoplankton];
- Ammonium and nitrate release and/or consumption from the sediment can be managed via the sediment flux module - aed_sedflux;
- Ammonium and nitrate release and/or consumption from the sediment can be computed dynamically using the sediment diagnenesis module - aed_seddiagnesis;
### Feedbacks to the Host Model
The nitrogen module has no feedbacks to the host hydrodynamic model.
## Model Description - Adding N~2~O Reactions
The basic function of the nitrogen model is described above, when the parameter `simN2O` is set to the number 0. Users may extend their model to simulate the N cycle in more detail, including resolution of intermediate N pools. Using these advanced options, there are extra reaction pathways that are not critical for resolving basic nutrient cycling processes, but are needed for calculating the concentration of the greenhouse gas N~2~O.
Here, these advanced module options are outlined, for when the user sets the parameter `simN2O` to the number 1 or 2. Simulation option 1 includes N~2~O, using a relatively simplistic assumption that N~2~O passively "leaks out" as a by-product or is consumed during the traditional nitrification-denitrification reactions. Simulation option 2 is a more comprehensive biogeochemical depiction of N cycling between its different redox states and considering the full diversity of autotrophic and heterotrophic pathways.
In addition to different N reaction pathways in these sub-models, the inclusion of additional inorganic N components is also accompanied by new process pathways for atmospheric exchange and sediment interaction.
### Process Descriptions (`simN20` = 1)
The `simN2O` 1 option is based on the conceptual model from Babbin et al. or Nevison. If the parameter `simN2O` is set to the number 1, N~2~O is both created and consumed through the denitrification reaction, and produced during nitrification; these rates are oxygen dependent.
The main balance equation for the additional N~2~O is summarised as:
```{=tex}
\begin{equation}
\frac{\partial N_{2}O}{\partial t} = {f_{nitp}^{N_{2}O}} + {f_{denp}^{N_{2}O}} - {f_{denc}^{N_{2}O}} + \color{#394E73}{f_{atm}^{N_{2}O}} + \color{#8B701F}{f_{sed}^{N2O}}
(\#eq:nitrogen14)
\end{equation}
```
#### Denitrification production of N~2~O
All of the NO~3~^-^ consumed by denitrification is assumed to first produces N~2~O. The rate of production of N~2~O is multiplied by half because there is one mole of N~2~O produced for every two moles of NO~3~^-^ consumed. The rate of denitrification is calculated as described here, and can have different O~2~ limitations, using the parameter `use_oxy`.
```{=tex}
\begin{equation}
f^{N_{2}O}_{denp} = \frac{1}{2}f^{NO_{x}}_{denit}
(\#eq:nitrogen15)
\end{equation}
```
#### Denitrification consumption of N~2~O
Denitrification can also consume N~2~O, when the N~2~O acts as a high energy yielding oxidant that reacts with organic matter. The organic matter reaction is described in the organic matter model page here. The rate of N~2~O consumption is calculated as shown in Equation \@ref(eq:nitrogen16). `Rn2o` is a kinetic rate constant that sets the speed of the reaction and `Kn2oc` is the parameter for the exponential O~2~ inhibition of the reaction.
```{=tex}
\begin{equation}
f_{denc}^{N2O}=R_{N_{2}O} e^{(-O_2/{K_{N_2Oc}})} N_{2}O
(\#eq:nitrogen16)
\end{equation}
```
#### Nitrification production of N~2~O
N~2~O is also produced by the O~2~ oxidation of NH~4~^+^ as:
#### Atmospheric N~2~O Flux
N~2~O fluxes from the atmosphere are calculated from the difference between water and atmospheric concentration:
\\begin{equation} f\_{atm}\^{N\_{2}O}=k\_{N\_{2}O}(N\_{2}O-N\_{2}O\_{atm}) \\end{equation}
Where $N_{2}O_{atm}$ is the user defined atmospheric value, and $k_{N_{2}O}$ is the piston velocity; refer to generic utility Section X for more detail using `aed2_gas_piston_velocity`, and the `n2o_piston_model` options.
#### Sediment N~2~O Flux
N~2~O flux from the sediment is calculated in a similar way to the fluxes of NO~3~^-^ and NH~4~^+^(Equation 22).
\\begin{equation} $f_{sed}^{N2O}=F_{sed}^{n2o} \theta_{sedamm}^{T-20}\Phi_{O2}^{n2o}\left[O_2\right]$ \\end{equation}
$$
f_{sed}^{N_{2}O}=F_{sed}^{N_{2}O}\theta_{sedamm}^{T-20}\Phi_{O_{2}}^{N_{2}O}[O_2]
$$ {\#eq:label}
### Process Descriptions (`simN2O = 2`)
The `simN2O` 2 option uses the terminology from Weissbach et al. (2017) for the names of the reaction processes, in order to avoid the ambiguity found across publications. The model processes are described as being part of either the oxidation pathway or reduction pathway.
The main balance equations for the additional simulated variables are summarised as:
\begin{equation}
\frac{\partial{NO}_3}{\partial t}=f_{Nitratation}-f_{Denitratation}+f_{atmdep}^{NOx}+f_{sed}^{NO3}
\end{equation} \begin{equation}
\frac{\partial{NO}_2}{\partial t}={f_{Nitritation}+f}_{Denitratation}-f_{Denitritation}+f_{sed}^{NO2}
\end{equation} \begin{equation}
\frac{\partial N_2O}{\partial t}=f_{Nitrousation}+f_{nitrous\ denitritation}-f_{denitrousation}+f_{atm}^{N2O}+f_{sed}^{N2O}
\end{equation} \begin{equation}
\frac{\partial{NH}_4}{\partial t}=f_{DNRA}+f_{NH4\ release}-f_{NH4\ \ oxidation}+f_{atmdep}^{NH4}+f_{sed}^{NH4}
\end{equation}
<br>
#### Nitrogen Oxidation Pathways
In the oxidation pathway, reduced N in the form of ammonium is first oxidised to NO~2~ and N~2~O before NO~3~, as seen in Figure 1. These processes are described next.
<center>
```{r nitrogen-3, echo=FALSE, fig.cap="Nitrogen oxidation pathways resolved when simN2O=2.", out.width = '70%'}
knitr::include_graphics("images/12-nitrogen/picture2.png")
```
</center>
#### Nitratation
Nitratation is the production of NO~3~\^- (nitr*ate*) from NO~2~^-^ by O~2~ oxidation. The rate is calculated as a second-order reaction proportional to both NO~2~^-^ and O~2~ concentrations (Equation 14). The parameter `Rno2o2` is the kinetic rate constant for the reaction.
```{=tex}
\begin{equation}
f_{Nitratation}=R_{{NO}_2O_2}\times{NO}_2^-\times O_2
\end{equation}
```
#### Ammonium oxidation
NH~4~^+^ is oxidized by O~2~ to both N~2~O and NO~2~^-^. The rate of NH~4~^+^ consumption is the second-order reaction proportional to both O~2~ and NH~4~^+^ concentrations (Equation 15). The parameter `Rnh4o2` is the kinetic rate constant for the reaction.
```{=tex}
\begin{equation}
f_{Ammonium\ oxidation}=R_{{NH}_4O_2}\times{NH}_4^+\times O_2
\end{equation}
```
#### Nitritation
Nitritation is the production of NO~2~^-^ (nitr*ite*) under conditions of high O~2~ concentration, from ammonium oxidation. It is limited by a partitioning function, in which the constant `Kpart_ammox` is the same as that for nitrousation, described below. Above a critical O~2~ concentration, this reaction pathway is favoured (Equation 16). The term R\~Ammonium oxidation\~ refers to the rate equation described above, rather than a kinetic constant.
```{=tex}
\begin{equation}
f_{Nitritation}=f_{Ammonium\ oxidation}\frac{O_2}{K_{part\ ammox}^ +O_2}
\end{equation}
```
#### Nitrousation
Nitrousation is one of two pathways that produce N~2~O using `simN2O` set to the number 2 (the other pathway is the reduction of NO~2~^-^ via nitrous denitritation). This process occurs under conditions of low O~2~ concentration, and it is inhibited by oxygen, using an inhibition function (Equation 18). The constant`Kpart_ammox` is the same as that in the nitritation process, which means that below a critical O~2~ concentration, this reaction pathway is favoured over nitritation. The reaction is multiplied by half, because for each mole of NH~4~^+^ oxidized, one mole of N~2~O is produced. The term R\~Ammonium oxidation\~ refers to the rate equation described above, rather than a kinetic constant.
```{=tex}
\begin{equation}
f_{Nitrousation}=\frac{1}{2}f_{Ammonium\ oxidation}\frac{K_{part\ ammox}}{K_{part\ ammox} +O_2}
\end{equation}
```
#### Organic matter oxidation - nitrogen reduction reactions
When the `simN2O` switch is set to 2, the complex set of N~2~O reactions is used. The details of the organic matter processes are explained on the organic matter model page here. The five nitrogen processes are explained here.
#### Deammonification (anammox) pathway
<center>
```{r nitrogen-4, echo=FALSE, fig.cap="Anammox pathways.", out.width = '50%'}
knitr::include_graphics("images/12-nitrogen/picture3.png")
```
</center>
The deammonification pathway is the oxidation of NH~4~^+^ by NO~2~^-^ to produce N~2~. It uses neither organic matter nor O~2~, although it is inhibited by the presence of O~2~. This process is sometimes referred to as anammox (anaerobic ammonium oxidation), however, Weissbach et al (2017) use the term deammonification to distinguish it from the anammox commercial bioreactor. The parameter `Rnh4no2` is the kinetic rate constant for this reaction. The parameter `Kin_deamm` is the O~2~ concentration parameter for O~2~ inhibition of this reaction.
```{=tex}
\begin{equation}
f_{deammonification}=R_{{NH}_4{NO}_2}\times{NO}_2^-\times{NH}_4^+\times\frac{K_{in\ deamm}}{K_{in\ deamm} +O_2}
\end{equation}
```
### Variable Summary
#### State variables
The following state variables are relevant to the nitrogen module, and dependent variables from other modules (Table x).
```{r echo=FALSE, message=FALSE, warning=FALSE}
library(gt)
library(tidyverse)
library(kableExtra)
library(rmarkdown)
aed <- read.csv("tables/12-nitrogen/table2.csv", check.names=FALSE)
aed %>%
gt() %>%
tab_row_group(
group = "Dependent variables",
rows = 6:7
) %>%
tab_row_group(
group = "aed_nitrogen",
rows = 1:5
) %>%
tab_options(
container.width = pct(100),
table.width = pct(100),
container.overflow.y = TRUE,
container.overflow.x = TRUE,
table.font.size = 12,
column_labels.background.color = "#14759e",
row_group.background.color = "lightgrey",
column_labels.font.weight = "bold",
column_labels.font.size = 14) %>%
fmt_markdown(columns = everything())
```
#### Diagnostics variables
The following diagnostic variables are able to be output, based on the setting of `diag_level`\>0 (Table x).
### Parameter summary
An overview of the parameters used in the nitrogen module for users selecting simN2O 1 or 2, are summarised in Table X.
```{r echo=FALSE, message=FALSE, warning=FALSE}
library(gt)
library(tidyverse)
library(kableExtra)
library(rmarkdown)
aed <- read.csv("tables/12-nitrogen/table3.csv", check.names=FALSE)
aed %>%
gt() %>%
tab_options(container.height = px(500),
container.width = pct(100),
container.overflow.y = TRUE,
container.overflow.x = TRUE,
table.font.size = 12,
column_labels.background.color = "#14759e",
row_group.background.color = "lightgrey",
column_labels.font.weight = "bold",
column_labels.font.size = 14) %>%
fmt_markdown(columns = everything())
```
### Optional Module Links
As with the default model, other nitrogen sources/sinks are indicated in Eq s... . These include:
- Ammonium release during bacterial mineralisation of DON in the organic matter module - aed_organic_matter;
- Nitrate consumption during denitrification of DON in the organic matter module - done in aed_organic_matter if simDenitrification == 1;
- Oxygen consumption during nitrification is done in the nitrogen module - [aed_nitrogen][Inorganic Nutrients: C/N/P/Si];
- Ammonium and nitrate uptake by phytoplankton phtosynthesis is done in the phytoplankton module - [aed_phytoplankton][Phytoplankton];
- Ammonium and nitrate uptake by macroalgae phtosynthesis is done in the macroalgae module - [aed_phytoplankton][Phytoplankton];
- Ammonium and nitrate release and/or consumption from the sediment can be managed via the sediment flux module - aed_sedflux;
- Ammonium and nitrate release and/or consumption from the sediment can be computed dynamically using the sediment diagnenesis module - aed_seddiagnesis;
### Feedbacks to the Host Model
This nitrogen module configuration also contains no feedbacks to the host hydrodynamic model.
## Setup & Configuration
An example `aed.nml` parameter specification block for the `aed_nitrogen` module is shown below:
<br>
```{fortran, eval = FALSE}
&aed_nitrogen
!-- Initial values
amm_initial = 2.6
nit_initial = 0.1
n2o_initial = 0.1
!-- Nitrification
Rnitrif = 0.01358676
Knitrif = 62.02209
theta_nitrif = 1.08
nitrif_reactant_variable = 'OXY_oxy'
nitrif_ph_variable = ''
simNitrfpH = .false.
Rnh4o2 = 1.0
Rno2o2 = 1.0
!-- N2O reactions
simN2O = 0
Rn2o = 0.05
Kpart_ammox = 1.0
Kin_deamm = 1.0
atm_n2o = 3.2e-07
n2o_piston_model = 4
!-- Annamox
Rnh4no2 = 0.001
kanammox = 0.001
Kanmx_nit = 1.320344
Kanmx_amm = 0.8666655
!-- De-nitrification
Rdenit = 9.968717
Kdenit = 29.86566
theta_denit = 1.062862
Rdnra = 0.01123021
Kdnra_oxy = 0.360534
!-- Atmospheric deposition
simDryDeposition = .true.
atm_din_dd = 0.5
simWetDeposition = .true.
atm_din_conc = 0.5
!-- Sediment fluxes
Ksed_amm = 41.25
Ksed_nit = 73.26015
Fsed_n2o = 0
Ksed_n2o = 100
theta_sed_amm = 1.068994
theta_sed_nit = 1.068994
Fsed_amm = 1.0
Fsed_nit = -0.05
! Fsed_amm_variable = 'SDF_Fsed_amm'
! Fsed_nit_variable = 'SDF_Fsed_nit'
/
```
<br>
## Case Studies & Examples
### Case Study: Yarra River Estuary
Bruce et al. (2015) demonstrate the base nitrogen setup in a 3D model of Yarra River estuary, an urban riverine estuary in Melbourne, Australia, that experiences dynamic movement of a hypoxic salt-wedge based on river flow and tidal interactions.
<br>
<center>
```{r echo=FALSE, message=FALSE, warning=FALSE, width = 501, height = 385}
library(leaflet)
leaflet(height=385, width=500) %>%
setView(lng = 144.9083, lat = -37.8525, zoom = 12) %>%
addTiles() %>%
addMarkers(lng = 144.9083, lat = -37.8525, popup = "Yarra River")
```
</center>
<br>
The results of the simulation are shown in Figure X, highlighting the change in surface and bottom NH4, NO3 and organic nitrogen pools along the estuary length.
<center>
```{r nitrogen-5, echo=FALSE, fig.cap="Time series data for surface (blue) and bottom (red) ammonium, nitrate, dissolved and particulate organic nitrogen for (a) Morell Bridge, (b) Scotch College, (c) Bridge Road. Crosses and asterisks represent observed data for surface and bottom concentrations respectively and solid lines simulated data.", out.width = '100%'}
knitr::include_graphics("images/12-nitrogen/picture4.png")
```
</center>
<!-- ### Case Study: Swan River Estuary -->
<!-- @huang2019 demonstrate the base model in a 3D model of Swan River estuary. A transect of the model results are shown in Figure X. -->
### Publications
```{r echo=FALSE, message=FALSE, warning=FALSE}
library(gt)
library(tidyverse)
library(kableExtra)
library(rmarkdown)
aed <- read.csv("tables/12-nitrogen/table4.csv", check.names=FALSE)
aed %>%
gt() %>%
tab_options(container.height = px(500),
container.width = pct(100),
table.width = pct(100),
container.overflow.y = TRUE,
container.overflow.x = TRUE,
table.font.size = 12,
column_labels.background.color = "#14759e",
row_group.background.color = "lightgrey",
column_labels.font.weight = "bold",
column_labels.font.size = 14) %>%
fmt_markdown(columns = everything())
```