Oceananigans.jl: Support for a full equation of state for seawater (TEOS-10?)

Created on 9 Mar 2020  Â·  8Comments  Â·  Source: CliMA/Oceananigans.jl

@johncmarshall54 has suggested we switch to a full equation of state for seawater for LESbrary simulations as temperature and salinity profiles from state estimates may not be statically stable in Oceananigans when using a linear equation of state. The Roquet et al. (2015a) idealized nonlinear equation of state should be better. Ideally we would use the same equation of state as ECCO/SOSE I think, but TEOS-10 should be what we aim for I suppose.

I think we have a couple of options:

  1. There's a Julia wrapper for the TEOS-10 C library but this probably won't work on the GPU: https://github.com/ax1ine/GSW.jl
  2. A 6+52-term polynomial approximation to TEOS-10, accurate to ~0.1% and suitable for Boussinesq models, from Roquet et al. (2015b). We can code up a pure Julia version as there already exist Python, MATLAB, and Fortran implementations here: https://github.com/fabien-roquet/polyTEOS (Thank you @fabien-roquet!)

In implementing a pure Julia TEOS-10 equation of state we should make sure it can be shared between Oceananigans and CliMA Ocean (cc @blallen).

cc @jm-c @christophernhill @glwagner @rafferrari who might have suggestions or comments.

@leios Do you think evaluating a 52-term polynomial at every grid point will be problematic on the GPU? I imagine GPUs should be fast at evaluating polynomials but maybe we have to be smart about storing the coefficients in memory?

References:

  1. Roquet et al. (2015a), "Defining a Simplified Yet “Realistic” Equation of State for Seawater", DOI: https://doi.org/10.1175/JPO-D-15-0080.1
  2. Roquet et al. (2015b), "Accurate polynomial expressions for the density and specific volume of seawater using the TEOS-10 standard", DOI: https://doi.org/10.1016/j.ocemod.2015.04.002
feature 🌟 science 🌊

All 8 comments

I also think it’s a good idea to use a full equation of state for all simulations sooner rather than later. It’s simpler: we won’t have to report constants of linearization everywhere. And setting up simulations will be easier.

I’ll defer to the modelers for whether Roquet’s approximation is an acceptable model for TEOS-10.

This package is relevant and we should consider contributing to it rather than implementing an equation of state somewhere in the Clima ecosystem:

https://github.com/gher-ulg/PhysOcean.jl

In implementing a pure Julia TEOS-10 equation of state we should make sure it can be shared between Oceananigans and CliMA Ocean (cc @blallen).

:100: :100: :100: :100: :100: :100: :100: :100: :100: :100: :100: :100: :100:

This package is relevant and we should consider contributing to it rather than implementing an equation of state somewhere in the Clima ecosystem:

https://github.com/gher-ulg/PhysOcean.jl

:sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses: :sunglasses:

Whatever we do should be shared between Oceananigans and Clima. Either a custom implementation or using the PhysOcean.jl package is fine by me.

The Roquet’s approximation is perfectly sufficient for Oceananigans, because it will never be used for global calculations where local approximations are an issue. However I agree with everybody else that it would be best to use the same EOS in Ocenanigans and Climate_Ocean. in that case we should adopt TEOS-10. Be warned that it is quite inefficient through. So we may be hit performance-wise. Hard to tell without trying.

Raffaele

On Mar 9, 2020, at 11:48 AM, Gregory L. Wagner notifications@github.com wrote:

I also think it’s a good idea to use a full equation of state for all simulations sooner rather than later. It’s simpler: we won’t have to report constants of linearization everywhere. And setting up simulations will be easier.

I’ll defer to the modelers for whether Roquet’s approximation is an acceptable model for TEOS-10.

This package is relevant and we should consider contributing to it rather than implementing an equation of state somewhere in the Clima ecosystem:

https://github.com/gher-ulg/PhysOcean.jl https://github.com/gher-ulg/PhysOcean.jl
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/climate-machine/Oceananigans.jl/issues/692?email_source=notifications&email_token=AK24ROIBMZMYD77AGEZNM3DRGUMURA5CNFSM4LEKJAAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOHZCYQ#issuecomment-596611426, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK24ROONT4RO4YCCF6BTIIDRGUMURANCNFSM4LEKJAAA.

What does J-M think?
John

On Mon, Mar 9, 2020, 3:07 PM rafferrari notifications@github.com wrote:

The Roquet’s approximation is perfectly sufficient for Oceananigans,
because it will never be used for global calculations where local
approximations are an issue. However I agree with everybody else that it
would be best to use the same EOS in Ocenanigans and Climate_Ocean. in that
case we should adopt TEOS-10. Be warned that it is quite inefficient
through. So we may be hit performance-wise. Hard to tell without trying.

Raffaele

On Mar 9, 2020, at 11:48 AM, Gregory L. Wagner notifications@github.com
wrote:

I also think it’s a good idea to use a full equation of state for all
simulations sooner rather than later. It’s simpler: we won’t have to report
constants of linearization everywhere. And setting up simulations will be
easier.

I’ll defer to the modelers for whether Roquet’s approximation is an
acceptable model for TEOS-10.

This package is relevant and we should consider contributing to it
rather than implementing an equation of state somewhere in the Clima
ecosystem:

https://github.com/gher-ulg/PhysOcean.jl <
https://github.com/gher-ulg/PhysOcean.jl>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/climate-machine/Oceananigans.jl/issues/692?email_source=notifications&email_token=AK24ROIBMZMYD77AGEZNM3DRGUMURA5CNFSM4LEKJAAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOHZCYQ#issuecomment-596611426>,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AK24ROONT4RO4YCCF6BTIIDRGUMURANCNFSM4LEKJAAA
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/climate-machine/Oceananigans.jl/issues/692?email_source=notifications&email_token=AKXUEQUJLIMSIC2HXXYDQG3RGU47RA5CNFSM4LEKJAAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOIVI3Y#issuecomment-596726895,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKXUEQV7RCQMEU6MW3UZPZTRGU47RANCNFSM4LEKJAAA
.

What does J-M think?

Talked to @jm-c earlier today who agreed that the Roquet et al. (2015b) 52-term polynomial approximation to TEOS-10 is a good choice.

Although he did point out that ECCO and SOSE are probably using an older pre-TEOS-10 equation of state (from 1995 or 2003 based on the EOS-80 but for potential temperature I think?).

The Roquet’s approximation is perfectly sufficient for Oceananigans, because it will never be used for global calculations where local approximations are an issue. However I agree with everybody else that it would be best to use the same EOS in Ocenanigans and Climate_Ocean. in that case we should adopt TEOS-10. Be warned that it is quite inefficient through. So we may be hit performance-wise. Hard to tell without trying.

Thanks for the feedback @rafferrari. I talked to @leios earlier today and we think it shouldn't be a problem on the GPU. It's just straight up number crunching so it might benefit from being run on a GPU. But we can make sure by doing a quick benchmark.

Ali,

This is a correct transcript of what I said earlier.

Cheers,
Jean-Michel

On Mon, Mar 09, 2020 at 07:21:21PM -0700, Ali Ramadhan wrote:

What does J-M think?

Talked to @jm-c earlier today who agreed that the Roquet et al. (2015b) 52-term polynomial approximation to TEOS-10 is a good choice.

Although he did point out that ECCO and SOSE are probably using an older pre-TEOS-10 equation of state (from 1995 or 2003 based on the EOS-80 but for potential temperature I think?).

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/climate-machine/Oceananigans.jl/issues/692#issuecomment-596867518

This is resolved as of v0.30.0!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

truedichotomy picture truedichotomy  Â·  8Comments

glwagner picture glwagner  Â·  7Comments

ali-ramadhan picture ali-ramadhan  Â·  8Comments

francispoulin picture francispoulin  Â·  6Comments

ali-ramadhan picture ali-ramadhan  Â·  6Comments