-
Notifications
You must be signed in to change notification settings - Fork 24
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
Consistency in defining Laplacian operators #24
Comments
@ElizabethYankovsky, I think you are essentially using the same flux approach as me in #23 - the first half of your Laplacian would be the "uflux" (sum of fluxes across western and eastern cell edge), and the second half of your Laplacian would be the "vflux" (sum of fluxes across northern and southern cell edge). With the following minor modifications, your code would satisfy conservation properties, too (and could easily handle a no-flux boundary condition at the continental boundaries):
|
I agree with @ElizabethYankovsky: I think it should be clearly stated (somewhere obvious in this repo) which properties the Laplacian implementations should satisfy. As per my understanding, our design method crucially uses the property
if you take the integral over the full oceanic domain. This property is guaranteed for finite volume implementations of the Laplacian with no-flux boundary condition at the continental boundaries. @iangrooms, please correct me if I'm wrong. |
Thanks @NoraLoose! I'll modify the Laplacian to be in the form you showed above. When you perform the filtering on the vorticity (rather than velocity) do you use a separate Laplacian specifically for t-cell fields? It appears that vorticity is defined at t-cell centers rather than u-cell centers in a B-grid model. |
Yes, filtering a field defined on t-cells (rather than u-cells) requires a different Laplacian: one with updated (staggered) grid information. However, the underlying Laplacian operation is always the same, equal to the generic Laplacian
This Laplacian applies, no matter if one uses a B- or C-grid, or if one filters a field defined on t-cells or u-cells or v-cells. The only difference lies in the specification of the grid information, i.e.,
and similarly for This is why in #23 (comment), I started advocating for using one generic Laplacian (e.g.,
Of course this is just an idea, and I am very happy to hear and discuss alternative suggestions. |
@NoraLoose, I'm rewriting the Laplacian as you have here and just wanted to check with you on a detail. I think that the negative signs shouldn't be there: This is coming from the fact that in the basic version we have: (dyu[i,j]*fx[i,j]-dyu[i-1,j]*fx[i-1,j]) |
Hello everyone,
I and @arthurBarthe have been working on the kernel for MOM5, and after speaking with @NoraLoose want to make sure that the Laplacian operators we implement are consistent across the various kernels.
In MOM5 (B-grid, uses a northeast convention), the grid variables that we use to construct the Laplacian are:
Please see Figure 9.7 for details on the MOM5 grid: https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf
Our Laplacian operator on a field
a
defined at velocity points is constructed by first computing first derivativesfx
andfy
:fx(i,j) = (a(i+1,j)-a(i,j))*1/(dxt(i+1,j)); fy(i,j) = (a(i,j+1)-a(i,j))*1/(dyt(i,j+1))
We then compute LAP_U (Laplacian at u points) as:
LAP_U(i,j) = (dyu(i,j)*fx(i,j) - dyu(i-1,j)*fx(i-1,j))*1/(dau(i,j) + (dxu(i,j)*fy(i,j) - dxu(i,j-1)*fy(i,j-1))*1/(dau(i,j)
Is this in line with what others are implementing? We based our definition on the LAP_T operator defined in the MOM5 https://github.com/mom-ocean/MOM5/blob/master/src/mom5/ocean_core/ocean_operators.F90, but are open to discussing other forms. In particular, @NoraLoose is using a flux approach in order to maintain conservation properties.
The text was updated successfully, but these errors were encountered: