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

Major MMF2/PAM updates #6354

Merged
merged 53 commits into from
Aug 22, 2024
Merged

Major MMF2/PAM updates #6354

merged 53 commits into from
Aug 22, 2024

Conversation

whannah1
Copy link
Contributor

@whannah1 whannah1 commented Apr 17, 2024

This brings in several updates and fixes for the PAM CRM used in the MMF2 compsets to improve stability and throughput. Some of these required updates to the PAM submodule, but the most important change was the addition of adaptive sub-cycling in the PAM driver. This change allowed the CRM time step to be increased to 10 seconds, which dramatically improved the throughput while also making the model much more resilient to numerically unstable conditions due to unrealistically strong velocities (still not sure why these occur in the first place).

List of notable changes for PAM and/or the driver:

  • adaptive subcycling in PAM driver
  • enable variance transport by default
  • disable mean-state acceleration for dry density
  • use crm_nx=45 with exact interpolation for PAM dycor (requires odd CRM columns)
  • increase PAM hyperdiffusion timescale to 60 seconds to reduce over-smoothing

Fixes #6363

[non-BFB] only for MMF2

@whannah1
Copy link
Contributor Author

The latest commit should address issue #6363

components/eam/src/physics/crm/pam/pam_driver.cpp Outdated Show resolved Hide resolved
components/eam/src/physics/crm/pam/pam_driver.cpp Outdated Show resolved Hide resolved
components/eam/src/physics/crm/pam/pam_driver.cpp Outdated Show resolved Hide resolved
//------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------

// set number of CRM steps
int nstop = int(gcm_dt/crm_dt);
int nstop = int(gcm_dt/crm_dt_fixed);
Copy link
Contributor

Choose a reason for hiding this comment

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

This has an implied floor operation. Is that what you intend if they aren't evenly divisible? Another way to handle non-evenly divisible could be:

int nstop = std::ceil(gcm_dt / crm_dt_fixed);
crm_dt_fixed = gcm_dt / nstop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm actually not sure which is better or if it even matters.... so I'm just gonna leave the implied floor in there.

components/eam/src/physics/crm/pam/pam_state.h Outdated Show resolved Hide resolved
@rljacob
Copy link
Member

rljacob commented May 30, 2024

@whannah1 anything else to do here?

@whannah1
Copy link
Contributor Author

whannah1 commented Jun 6, 2024

@rljacob looks like there's a new problem that's been created by other updates - which I think will all be fixed when the eamxx code in this repo is updated. Not sure how to navigate this, so I might just leave this in a holding pattern for a bit.

@rljacob
Copy link
Member

rljacob commented Jun 27, 2024

Waiting for SCREAM update #6489 and a few more changes.

@rljacob
Copy link
Member

rljacob commented Aug 15, 2024

@whannah1 is this ready?

@whannah1
Copy link
Contributor Author

@rljacob @brhillman This PR is ready to go.

brhillman added a commit that referenced this pull request Aug 21, 2024
This brings in several updates and fixes for the PAM CRM used in the MMF2 compsets to improve stability and throughput. Some of these required updates to the PAM submodule, but the most important change was the addition of adaptive sub-cycling in the PAM driver. This change allowed the CRM time step to be increased to 10 seconds, which dramatically improved the throughput while also making the model much more resilient to numerically unstable conditions due to unrealistically strong velocities (still not sure why these occur in the first place).

List of notable changes for PAM and/or the driver:

adaptive subcycling in PAM driver
enable variance transport by default
disable mean-state acceleration for dry density
use crm_nx=45 with exact interpolation for PAM dycor (requires odd CRM columns)
increase PAM hyperdiffusion timescale to 60 seconds to reduce over-smoothing
Fixes #6363

[non-BFB] only for MMF2
@brhillman
Copy link
Contributor

Merged to next.

@brhillman brhillman merged commit 69f24bf into master Aug 22, 2024
21 checks passed
@brhillman brhillman deleted the whannah/mmf/pam-updates branch August 22, 2024 19:58
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.

build fails with SMS_Ln3.ne4pg2_ne4pg2.F2010-MMF2
4 participants