# Help with units

**URL:** https://forum.access-hive.org.au/t/help-with-units/3640
**Category:** Biogeochemistry
**Created:** [5 September 2024 04:21 UTC](https://forum.access-hive.org.au/t/help-with-units/3640 "2024-09-05T04:21:07Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)
#### Post date: [5 September 2024 04:21 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/1 "2024-09-05T04:21:07Z")

</div>

I am interested in looking at the partition between physical and biological processes in influencing oxygen concentrations. From Oke et al. 2013, if I interpret correctly, the change in oxygen is given by:

\partial\_t O\_2 = ADV + DIFF + BIO

where the BIO part is -\frac{177}{16} \partial\_t N and N is nitrate concentration.

I can see that we have the following diagnostics:

- `o2` in mmol/m3
- `no3` in mmol/m3
- `o2_flux_adv` in kg/s

If I can convert the flux to mmol/m3, I could then get the diffusion part as a residual (away from surface and boundaries I’m expecting it to be small anyways) - but I’m not sure how to do the unit conversion for the advection term.

Metadata says `o2_flux_adv` is `rho*A*u*tracer`, where `A` is the x or y area of the gridcell. So dividing by 1035 reference density I’d obtain a volume flux in m3/s, but that is as far as I got.

Would any BGC wizs out there be able to tell me if (a) my logic is correct re processes governing `o2` and (b) how to manage the unit conversion?

Very much appreciated.

---

<div class="post-metadata">

### Author: ![Benoit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/benoit/32/3115_2.png) [@Benoit](https://forum.access-hive.org.au/u/Benoit)
#### Post date: [5 September 2024 05:03 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/2 "2024-09-05T05:03:11Z")

</div>

I wouldn’t call myself a BGC wiz so take these 2 cents with a grain of salt:

a. Yes, I think your understanding is sound. O2 below the surface is essentially biologically produced by photosynthesis (along with some organic N) or respired by bacteria (along with remineralization of N). The reality is of course more complicated, e.g., you can get some decoupling between O2 and N when denitrification/N-fixation occurs.

b. I think you just have to divide `o2_flux_adv` by the _mass_ of water in the grid cell, i.e., `rho * volcello`. Assuming `rho*A*u*tracer` is in (kg m−3) (m2) (m s−1) (mmol m−3) = kg mmol m−3 s−1, dividing by `rho * volcello` (unit: kg) would give you the advective flux convergence/divergence (depending on the orientation of `u`) in mmol m−3 s−1. Not sure if that’s the unit of your `o2_flux_adv` though…

---

<div class="post-metadata">

### Author: ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)
#### Post date: [5 September 2024 22:58 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/3 "2024-09-05T22:58:06Z")

</div>

Thanks a lot Benoit! I’ve interpreted a. from Oke et al. 2013 appendix B.

Regarding the units, `rho*A*u*tracer` is in units of kg/s, i.e. the tracer is unitless. I would like to convert the unitless concentration to mmol/m3, which is the part I’m unsure about?

Maybe @aekiss or @pearseb know about these units?

---

<div class="post-metadata">

### Author: ![Benoit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/benoit/32/3115_2.png) [@Benoit](https://forum.access-hive.org.au/u/Benoit)
#### Post date: [5 September 2024 23:51 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/4 "2024-09-05T23:51:01Z")

</div>

> [@JuliaN](#):
>
> Thanks a lot Benoit! I’ve interpreted a. from Oke et al. 2013 appendix B.

Yes, that’s it, they avoid the complexities of the N cycle altogether:

> We assume a Redfield ratio of 1 : 16 : 106 : −172 (P : N : C : O2) with phosphate, nitrate, carbon and oxygen. The choice of phosphate as our macro-nutrient rather than nitrate allows us to neglect nitrification, denitrification and atmosphere deposition, which add and remove nitrate from the ocean and make the nitrogen cycle more complicated than the phosphate cycle, which is conserved in the ocean

* * *

I am now also confused regarding the units. I don’t really understand how `o2_flux_adv` or `rho*A*u*tracer` could be in units of kg/s. Could that be a mistake in the metadata? Surely the variable representing some flux of O2 must incude a unit for O2 somehow, right? Maybe this kg/s is actually in kg of O2? (In which case you’d have to divide by the volume of the cell and convert the kg of O2 to mmolO2)

---

<div class="post-metadata">

### Author: ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)
#### Post date: [5 September 2024 23:59 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/5 "2024-09-05T23:59:46Z")

</div>

Well, I’ve been discussing this with @Lizzie and she pointed out to this post [Incorrect units for tracer flux and tendency diagnostics · Issue #363](https://github.com/mom-ocean/MOM5/issues/363)) where they do talk about incorrect units, but that post is from +2yrs ago so I’m not sure it is still an issue.

I’ve also seen this post in the hive [Particular detritus comparison in PI and LIG - COSIMA / Biogeochemistry - ACCESS Hive Community Forum (access-hive.org.au)](https://forum.access-hive.org.au/t/particular-detritus-comparison-in-pi-and-lig/2277) but again I’m not sure if it is applicable to these diagnostics or not.

And like I said, I’ve got next to none experience in bgc 😅

---

<div class="post-metadata">

### Author: ![Benoit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/benoit/32/3115_2.png) [@Benoit](https://forum.access-hive.org.au/u/Benoit)
#### Post date: [6 September 2024 00:08 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/6 "2024-09-06T00:08:04Z")

</div>

Yes, you’re better off waiting for @aekiss or @pearseb to for a definitive answer, but my guess is that this issue you linked is the one you are facing.

If they just omitted the mmol m−3 unit for O2, dividing `o2_flux_adv` by the water mass in the cell seems to be the way to go.

You could try it and see if the values you get makes sense in terms of order of magnitude?

---

<div class="post-metadata">

### Author: ![Benoit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/benoit/32/3115_2.png) [@Benoit](https://forum.access-hive.org.au/u/Benoit)
#### Post date: [6 September 2024 00:17 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/7 "2024-09-06T00:17:14Z")

</div>

> [@JuliaN](#):
>
> Well, I’ve been discussing this with @Lizzie and she pointed out to this post [Incorrect units for tracer flux and tendency diagnostics · Issue #363](https://github.com/mom-ocean/MOM5/issues/363)) where they do talk about incorrect units, but that post is from +2yrs ago so I’m not sure it is still an issue.

BTW although the issue is 2 years old, the corresponding code file has not been touched in 6 years on the master branch, so unless the output you are using was produced by code from another repository/branch, that issue has not been fixed in your case.

---

<div class="post-metadata">

### Author: ![aekiss](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aekiss/32/46_2.png) [@aekiss](https://forum.access-hive.org.au/u/aekiss)
#### Post date: [6 September 2024 02:56 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/8 "2024-09-06T02:56:53Z")

</div>

> [@JuliaN](#):
>
> From Oke et al. 2013, if I interpret correctly, the change in oxygen is given by:
> 
> \partial\_t O\_2 = ADV + DIFF + BIO ∂tO2=ADV+DIFF+BIO\partial\_t O\_2 = ADV + DIFF + BIO

Hi @JuliaN, you also need to include atmospheric fluxes at the surface (see p 611)

---

<div class="post-metadata">

### Author: ![aekiss](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aekiss/32/46_2.png) [@aekiss](https://forum.access-hive.org.au/u/aekiss)
#### Post date: [6 September 2024 02:58 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/9 "2024-09-06T02:58:29Z")

</div>

> [@JuliaN](#):
>
> where the BIO part is -\frac{177}{16} \partial\_t N−17716∂tN-\frac{177}{16} \partial\_t N and N is nitrate concentration.

Oke et al eq B12 actually has 172 in the numerator, not 177. This is due to the assumed Redfield ratio of 1:16:106:−172 (P:N:C:O2). I could be wrong, but it seems that sometimes N is nutrient (in phosphate units), and sometimes it’s nitrate. But the 16 in B12 indicates that in this case N is nitrate, i.e. this is just the time derivative of the assumed Redfield ratio.

---

<div class="post-metadata">

### Author: ![aekiss](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aekiss/32/46_2.png) [@aekiss](https://forum.access-hive.org.au/u/aekiss)
#### Post date: [6 September 2024 03:25 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/10 "2024-09-06T03:25:30Z")

</div>

> [@JuliaN](#):
>
> Metadata says `o2_flux_adv` is `rho*A*u*tracer`, where `A` is the x or y area of the gridcell.

I guess you mean `o2_*flux_adv` (\*=x,y,z)?

[This](https://github.com/mom-ocean/MOM5/issues/363) issue [hasn’t been fixed](https://github.com/mom-ocean/MOM5/blob/master/src/mom5/ocean_tracers/ocean_tracer_advect.F90#L870-L929), so the units metadata is incorrect for all BGC tracer flux outputs.

I think the actual units for `o2_*flux_adv` are `(tracer units)*kg/sec`. I guess in this case tracer units are `mmol/m^3`, as the metadata for o2 says. So units for `o2_*flux_adv` are `(mmol kg)/(m^3 sec)`. Does that work?

---

<div class="post-metadata">

### Author: ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)
#### Post date: [6 September 2024 03:35 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/11 "2024-09-06T03:35:58Z")

</div>

Awesome this is everything I needed! Thank you very much Andrew and Benoit!

---

<div class="post-metadata">

### Author: ![Benoit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/benoit/32/3115_2.png) [@Benoit](https://forum.access-hive.org.au/u/Benoit)
#### Post date: [7 September 2024 03:32 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/12 "2024-09-07T03:32:53Z")

</div>

> [@JuliaN](#):
>
> I am interested in looking at the partition between physical and biological processes in influencing oxygen concentrations.

FWIW, we have a paper fresh out of the press on almost exactly this topic ([Pasquier et al. 2024](https://doi.org/10.1029/2024JC021043)), albeit in an idealised context… Maybe it’s useful to you?

---

<div class="post-metadata">

### Author: ![pearseb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/pearseb/32/1033_2.png) [@pearseb](https://forum.access-hive.org.au/u/pearseb)
#### Post date: [8 September 2024 03:13 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/13 "2024-09-08T03:13:53Z")

</div>

Looks like this was all figured out. Thanks @Benoit and @aekiss for helping.

---

<div class="post-metadata">

### Author: ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)
#### Post date: [9 September 2024 01:22 UTC](https://forum.access-hive.org.au/t/help-with-units/3640/14 "2024-09-09T01:22:15Z")

</div>

Thanks for sharing Benoit! This is very useful 🙂
