Oceananigans.jl: Equations in documentation are not dimensionally consistent

Created on 21 May 2019  Â·  4Comments  Â·  Source: CliMA/Oceananigans.jl

First confusion:

Equation (1) contains the gradient of kinematic pressure, while equation (7) is written in terms of the dynamic pressure:

https://climate-machine.github.io/Oceananigans.jl/latest/algorithm/

But then, equation (12) adds the two pressures together as if they have the same units.

Second confusion:

Equation (13) implies that the hydrostatic pressure is a kinematic pressure.

Yet its calculation in the code (see also here) suggests that it is defined as a dynamic pressure in the code.

which is it?

Note that the value of rho0 should not affect dynamics in the code.

documentation 📜

Most helpful comment

Rho factors were a big reason why bugs were difficult to track down as
oceananigans was built!

On Tue, May 21, 2019, 2:58 PM Gregory L. Wagner notifications@github.com
wrote:

Found it: the 'buoyancy' is multiplied by rho0 here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/equation_of_state.jl#L36
and then rho0 is divided away here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/time_steppers.jl#L153
and here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/time_steppers.jl#L160
.

If we want to continue multiplying and dividing by rho0 in the code, we
should update the documentation accordingly (or vice versa --- which I
would prefer).

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/climate-machine/Oceananigans.jl/issues/222?email_source=notifications&email_token=AKXUEQXSNXDGEYTMFBMD26DPWRA67A5CNFSM4HONXOH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV43NYQ#issuecomment-494515938,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKXUEQUYXZSLFX4FI4A4RETPWRA67ANCNFSM4HONXOHQ
.

All 4 comments

Found it: the 'buoyancy' is multiplied by rho0 here and then rho0 is divided away here and here.

If we want to continue multiplying and dividing by rho0 in the code, we should update the documentation accordingly (or vice versa --- which I would prefer).

We decided to go with kinematic pressure \phi.

Rho factors were a big reason why bugs were difficult to track down as
oceananigans was built!

On Tue, May 21, 2019, 2:58 PM Gregory L. Wagner notifications@github.com
wrote:

Found it: the 'buoyancy' is multiplied by rho0 here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/equation_of_state.jl#L36
and then rho0 is divided away here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/time_steppers.jl#L153
and here
https://github.com/climate-machine/Oceananigans.jl/blob/7e29af402d6535a25f649520350efcaca7c417d6/src/time_steppers.jl#L160
.

If we want to continue multiplying and dividing by rho0 in the code, we
should update the documentation accordingly (or vice versa --- which I
would prefer).

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/climate-machine/Oceananigans.jl/issues/222?email_source=notifications&email_token=AKXUEQXSNXDGEYTMFBMD26DPWRA67A5CNFSM4HONXOH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV43NYQ#issuecomment-494515938,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKXUEQUYXZSLFX4FI4A4RETPWRA67ANCNFSM4HONXOHQ
.

@johncmarshall54 I think you might've meant as MITgcm was built. Here we are, building (attempting to build) Oceananigans!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ali-ramadhan picture ali-ramadhan  Â·  8Comments

ali-ramadhan picture ali-ramadhan  Â·  5Comments

ali-ramadhan picture ali-ramadhan  Â·  8Comments

ali-ramadhan picture ali-ramadhan  Â·  3Comments

glwagner picture glwagner  Â·  6Comments