Skip to content

Modifications to tracer advection mono #739

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

Draft
wants to merge 2 commits into
base: ocean/develop
Choose a base branch
from

Conversation

vanroekel
Copy link
Contributor

This PR does two things

  1. adds hProv weighting to the high order vertical fluxes (3rd/4th)
  2. adds commenting of fluxes to reduce confusion in interpretation

@vanroekel
Copy link
Contributor Author

@mark-petersen and @ambrad I've pulled together a draft PR to add thickness weighting to the high order fluxes. I've also included more commenting of 3rd/4th order fluxes to avoid confusion. I have not tested this beyond building it, but wanted to post for your comments. In particular can you verify my implementation of SG equation (11) with the full derivatives? I've included my derivation.

File_001

I will report back after testing.

(0.5_RKIND*hProv(k-1,iCell)*(hProv(k-1,iCell) + hProv(k,iCell)))
dzEdge = 0.5*(hProv(k-1,iCell) + hProv(k,iCell))

highOrderFlx(k, iCell) = w(k,iCell)*(0.5_RKIND*(tracerCur(k,iCell) + tracerCur(k-1,iCell)) - &
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the primary spot where using hProv weighting will benefit the flux is in the 2nd-order part. Here, you've kept this as 1/2 (q(k) + q(k-1)) and used hProv only in the second-derivative estimates. The vertOrder2 code uses the hProv-weighted version based on a linear interpolant; I think you should bring this into this expression.

That aside, I think we should be cautious about making changes to this code without a vertical-direction convergence test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ambrad you're right, I didn't even think about that. It is of course obvious that part is fixed grid too.

I also agree we should have a vertical advection convergence test. I started implementing that test with a postbac but didn't get it fully cleaned up.

adds non uniform grid weighting to 2nd order component of the high order
vertical flux
deriv2Km1 = (tracerCur(k-2,iCell) - tracerCur(k-1,iCell))/(0.5_RKIND*hProv(k-1,iCell)* &
(hProv(k-2,iCell) + hProv(k-1,iCell))) - (tracerCur(k-1,iCell) - tracerCur(k,iCell)) / &
(0.5_RKIND*hProv(k-1,iCell)*(hProv(k-1,iCell) + hProv(k,iCell)))
dzEdge = 0.5*(hProv(k-1,iCell) + hProv(k,iCell))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.5_RKIND rather than 0.5.

These formulas look fine, but again, it's best to verify them with a convergence test.

The arithmetic could be decreased a bit in the deriv2(m1)* and highOrderFlx lines with some algebra.

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

Successfully merging this pull request may close these issues.

3 participants