Skip to content

Add Pressure Gradient design document #226

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sbrus89
Copy link

@sbrus89 sbrus89 commented Apr 22, 2025

This PR adds the design document for the pressure gradient module for Omega-1. Compiled version here.

Checklist

  • Documentation:
    • Design document has been generated and added to the docs
    • Documentation has been built locally and changes look as expected

Copy link

@vanroekel vanroekel left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple tiny questions from me.

Copy link

@philipwjones philipwjones left a comment

Choose a reason for hiding this comment

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

Just a couple of questions...

@mark-petersen
Copy link

Test compiled and posted here.

Copy link

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@sbrus89, a few things to chat about at our Wednesday meeting (or sooner if you prefer). Nothing that should hold up moving forward on this.

$$

$\widetilde{H}$ is the prognositc variable in the barotropic continuity equation.
The vertical integral of the pressure gradient is
Copy link

Choose a reason for hiding this comment

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

This is the vertical average, not the vertical integral, right?

Suggested change
The vertical integral of the pressure gradient is
The vertical average of the pressure gradient is

Therefore, the barotorpic pressure gradient term is discretized as:

$$
\overline{T}_e^p = g\left[ \frac{H_i}{\widetilde{H}_i} \right]_e\sum_{i \in CE(e)} n_{e,i}\widetilde{H}_e
Copy link

Choose a reason for hiding this comment

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

How will we know $H_i$ in this equation? This seems pretty unknowable in the barotropic equation to me.

Comment on lines +83 to +85
$$
p(z) = p_b - g \int^z_{-h} \rho dz^\prime,
$$
Copy link

Choose a reason for hiding this comment

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

Why is $z$ and not $\tilde{z}$ the coordinate of integration in this whole section? And is it worth retaining this section or should we address it when we address the barotropic equation as a whole?

private:
std::unique_ptr<PressureGrad> OmegaPressureGrad;
PressureGradCentered CenteredPGrad;
PressureGradHighOrder HighOrderPGrad; // To be implemented later
Copy link

Choose a reason for hiding this comment

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

I'm not confident that we will have one and only one higher-order pressure gradient. We have several in MPAS-Ocean. Assuming that this is just a placeholder for one or more future classes, can we state that explicitly in the text?

## Verification and Testing

### Test: Spatial convergence to exact solution
For a given analytical $v$, $h$, and $b$, the spatial convergence of the pressure gradient can be assessed by computing errors on progressively finer meshes.
Copy link

Choose a reason for hiding this comment

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

What is $b$ in this case?

Copy link

Choose a reason for hiding this comment

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

I think maybe this should be fleshed out a bit more. What analytic test would we use?

### 2.1 Requirement: Support for tilted pressure coordinates for the non-Boussinesq primitive equations

The pressure gradient will compute the horizontal gradients of both the pressure and geopotential to support tilted pressure coordinates in the non-Boussinesq model.
This will allow for the use of a $p^\star$ coordinate, which functions similarly to the $z^\star$ in the Boussinesq MPAS-Ocean model.

Choose a reason for hiding this comment

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

will this be updated to the \tilde{z} coordinate instead of $p^\star$? I guess psuedo height could be thought of as $p^\star$ like so maybe no need to change anything

Copy link

Choose a reason for hiding this comment

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

$\tilde{z}*$? 😝

Copy link
Author

Choose a reason for hiding this comment

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

I was hoping we could continue calling it p* since \tilde{z}^* seems confusing.

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

Successfully merging this pull request may close these issues.

6 participants