-
Notifications
You must be signed in to change notification settings - Fork 3
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
Calculate higher-order flux across grounding line #94
Calculate higher-order flux across grounding line #94
Conversation
Add higher order thickness flux on edges to Registry. Previously, this was an allocatable variable called activeTracerHorizontalAdvectionEdgeFlux that was nTracers * nVertLevels * nEdges. This is now a variable in Registry called layerThicknessEdgeFlux. Preliminary testing seems to indicate that this greatly speeds up fct advection, which is great!
Use layerThicknessEdgeFlux to calculate fluxAcrossGroundingLine when using higher order thickness advection.
Regarding "FCT grounded mass budget closes" comment, I assume then that it did not close without this change? |
Okay, it looks like it's more complicated than this. The budget actually doesn't quite close with this change. It also doesn't close before this change, and it doesn't even close completely when using fo advection. So I think this goes back to the issue that we've been having with budgets in general. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trhille , thanks for taking care of this addition. I made two minor comments that you can take or leave. I marked this as 'request changes' but I'm happy to proceed as-is if you prefer not to make either change.
enddo | ||
else | ||
do k = 1, nVertLevels | ||
thicknessFluxEdge = layerNormalVelocity(k,iEdge) * dvEdge(iEdge) * layerThicknessEdge(k,iEdge) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using the new variable here so that if we ever want to use it in output we have that field available regardless of advection scheme?
thicknessFluxEdge = layerNormalVelocity(k,iEdge) * dvEdge(iEdge) * layerThicknessEdge(k,iEdge) | |
layerThicknessEdgeFlux(k,iEdge) = layerNormalVelocity(k,iEdge) * dvEdge(iEdge) * layerThicknessEdge(k,iEdge) |
(and corresponding adjustment to 652)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 8be7fbb
@@ -1433,6 +1433,9 @@ is the value of that variable from the *previous* time level! | |||
<var name="layerNormalVelocity" type="real" dimensions="nVertLevels nEdges Time" units="m s^{-1}" | |||
description="horizonal velocity, normal component to an edge, layer midpoint" | |||
/> | |||
<var name="layerThicknessEdgeFlux" type="real" dimensions="nVertLevels nEdges Time" units="m^2 s^{-1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicky question - could/should this be called just layerEdgeFlux
? I don't feel strongly about this and it's not important enough to change everywhere unless you like the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MPAS-Ocean calls it normalThicknessFlux
, so I left "thickness" in the name. I could go either way.
Generalize layerThicknessEdgeFlux for all thickness advection, rather than just using it for FCT.
All |
All |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trhille , thanks for generalizing the calculation. I'm happy to proceed with merging this.
When using higher-order thickness advection, calculate higher-order flux across grounding line.