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

MPAS physics-dynamics coupling issue #1268

Open
PeterHjortLauritzen opened this issue Mar 4, 2025 · 1 comment
Open

MPAS physics-dynamics coupling issue #1268

PeterHjortLauritzen opened this issue Mar 4, 2025 · 1 comment
Assignees
Labels
bug Something isn't working correctly CoupledEval3 mpas

Comments

@PeterHjortLauritzen
Copy link
Collaborator

What happened?

CAM physics uses a mass coordinate (hydrostatic pressure), while MPAS employs a constant height formulation, where pressure is non-hydrostatic and treated as a diagnostic variable. Therefore, pressure must be computed from the MPAS prognostic state and passed to CAM physics.

In the current coupling approach, hydrostatic interface pressure is computed from density, water variables, and heights. This calculation is unambiguous. However, mid-level pressure can be determined in multiple ways. The chosen method ensures that mid-level pressure remains consistent with MPAS mid-level heights when diagnosed in CAM physics (see write-up by Lauritzen available on request).

However, this mid-level pressure is not hydrostatic and is not guaranteed to be bounded by the hydrostatic interface pressures. At high horizontal resolutions (~3.75 km), this discrepancy can result in pmid exceeding pint, causing CAM-MPAS to crash during the computation in CAM physics:

src/chemistry/mozart/mo_drydep.F90:

       !-------------------------------------------------------------------------------------
       ! height of 1st level
       !-------------------------------------------------------------------------------------
       z(i) = - r/grav * air_temp(i) * (1._r8 + .61_r8*spec_hum(i)) * log(p/pg)

For the lowest model level (i=pver) it can happen that p > pg, and then log(p/pg) is positive, which will make z(i) negative. Setting:

pmid(1, iCell) = 0.5*(pint(1,iCell)+pint(2,iCell))

in dp_coupling.F90 solves the problem for this particular "instability" in CAM physics.

This is likely the issue seen in #442

What are the steps to reproduce the bug?

Run ~3.75 L58 CAM-MPAS

What CAM tag were you using?

Any

What machine were you running CAM on?

CISL machine (e.g. cheyenne)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Yes

Extra info

Tagging users familiar with this issue

@briandobbins @adamrher @skamroc @kuanchihwang

@PeterHjortLauritzen PeterHjortLauritzen added the bug Something isn't working correctly label Mar 4, 2025
@PeterHjortLauritzen PeterHjortLauritzen self-assigned this Mar 4, 2025
@adamrher
Copy link

adamrher commented Mar 4, 2025

What are the steps to reproduce the bug?
Run ~3.75 L58 CAM-MPAS

Lol, easy enough!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly CoupledEval3 mpas
Projects
Status: To Do
Development

No branches or pull requests

3 participants