Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in MEKE advection? #1036

Closed
MFJansen opened this issue Nov 25, 2019 · 2 comments
Closed

Bug in MEKE advection? #1036

MFJansen opened this issue Nov 25, 2019 · 2 comments

Comments

@MFJansen
Copy link
Contributor

I think there may still be an issue with MEKE advection.
The comments with the definition of the advective flux say “Here the units of the quantities added to MEKE_uflux and MEKE_vflux are [m L4 T-3]” (l. 474 in MOM_MEKE.F90)
but in l. 486 where the convergence of these fluxes is applied it says “This expression is correct if the units of MEKE_uflux and MEKE_vflux are [kg m-2 L4 T-3]".
According to this, the advective fluxes are too small by a factor of rho (~10^3). From what I can see, it looks to me like the comments are right, and there is indeed a bug.

I also ran a few test simulations in the Neverworld setup, and I don't really see a significant effect of MEKE advection until I turn up MEKE_ADVECTION_FACTOR to 10^4, which is at least qualitatively consistent with the notion that the advective fluxes are much smaller than they should be. (It seems at least plausible that we need an advective velocity of up to 10 times the barotropic velocity before advection plays a significant role, but it doesn't seem plausible that we need 10^4 times the barotopic velocity.)

@adcroft
Copy link
Collaborator

adcroft commented Nov 26, 2019

The column integrated mass variable mass is in units of kg m-2 (or R Z).
The depth integrated mass flux baroHv is currently in units of m3 (or H L2).

Multiplying baroHv by GV%H_to_RZ, as is done for h(i,j,k) when calculating mass, would remove the need for any unit conversions in the divergence of advective fluxes. This would simplify the proposed expression (currently commented out) for advFac at L461 to simply

    advFac = CS%MEKE_advection_factor / dt

@MFJansen
Copy link
Contributor Author

Just to clarify: We agree that the current code is not correct, right?

The commented L461 looks fine to me. I don't really understand the conventions for dimensions here, so it's not clear to me whether it's better to multiply by GV%H_to_RZ in the definition of baroHv or in the definition of advFac (the dimensions of baroHv are in either case not what I would have naively expected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants