Skip to content

Update MPAS dynamical core to version 8.4.0#495

Open
kuanchihwang wants to merge 7 commits into
ESCOMP:developmentfrom
kuanchihwang:staging/mpas-dycore-8.4.0
Open

Update MPAS dynamical core to version 8.4.0#495
kuanchihwang wants to merge 7 commits into
ESCOMP:developmentfrom
kuanchihwang:staging/mpas-dycore-8.4.0

Conversation

@kuanchihwang
Copy link
Copy Markdown
Collaborator

Tag name (required for release branches)

TBD

Originator(s)

kuanchihwang

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number)

This PR updates MPAS dynamical core from version 8.3.1 to 8.4.0. See the release notes for details.

Notably, the new Large Eddy Simulation (LES) capability in MPAS is experimentally supported under CAM-SIMA, at the price of increased complexity in constituent handling. However, due to the object-oriented design of MPAS subdriver, this complexity is entirely contained within the subdriver layer and does not affect other parts of CAM-SIMA. This capability is disabled by default, and can be enabled manually through namelist options.

A future PR is planned to refactor the dyn_mpas_define_scalar subroutine in MPAS subdriver to keep its complexity and scope in check.

Describe any changes made to the build system

src/dynamics/mpas/assets/Makefile.in.CESM has been modified to suppress harmless but potentially confusing errors in build logs.

Describe any changes made to the namelist

  • mpas_epssm

This namelist option has been deprecated and set to 0.0. Setting it to any values other than 0.0 triggers a compatibility warning.

  • mpas_epssm_maximum, mpas_epssm_minimum, mpas_epssm_transition_bottom_z, mpas_epssm_transition_top_z

These new namelist options provide more fine-grained control on the off-centering parameter for the vertically implicit acoustic integration.

  • mpas_gpu_aware_mpi

Whether to use GPU-aware MPI for halo exchanges.

  • mpas_les_model, mpas_les_surface, mpas_mix_scalars, mpas_surface_drag_coefficient, mpas_surface_heat_flux, mpas_surface_moisture_flux

These new namelist options control the new LES capability in MPAS.

List any changes to the defaults for the input datasets (e.g., boundary datasets)

None

List all files eliminated and why

None

List all files added and what they do

A       src/dynamics/mpas/assets/0001-Fix-Fortran-standard-violation.patch
A       src/dynamics/mpas/assets/0002-Add-missing-argument-intent.patch
A       src/dynamics/mpas/assets/0003-Avoid-implicit-save-attribute.patch
  * Add patches to fix crash in MPAS 8.4.0

List all existing files that have been modified, and describe the changes

M       .gitmodules
M       src/dynamics/mpas/dycore
  * Update MPAS dynamical core to version 8.4.0
M       src/dynamics/mpas/assets/generate_namelist_definition.py
M       src/dynamics/mpas/namelist_definition_mpas_dycore.xml
  * Update namelist definition file and script for MPAS dynamical core
M       src/dynamics/mpas/assets/Makefile.in.CESM
  * Suppress harmless errors in build logs
M       src/dynamics/mpas/driver/dyn_mpas_subdriver.F90
  * Remove deprecated variables that no longer exist
  * Rework constituent handling in MPAS subdriver to support new LES capability

Regression tests

  • derecho/aux_sima_gnu
SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 (Overall: DIFF) details:
  FAIL SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 NLCOMP
  FAIL SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF
SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 (Overall: DIFF) details:
  FAIL SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 NLCOMP
  FAIL SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF
SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details:
  FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho NLCOMP
  FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF

Expected answer changes due to MPAS version update.

SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: FAIL) details:
  FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam RUN time=15

Known failing test.

  • derecho/aux_sima_intel
SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 (Overall: DIFF) details:
  FAIL SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 NLCOMP
  FAIL SMS_D_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 (Overall: DIFF) details:
  FAIL SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 NLCOMP
  FAIL SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details:
  FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho NLCOMP
  FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF

Expected answer changes due to MPAS version update.

SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details:
  FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape NLCOMP

Known failing test.

  • derecho/aux_sima_nvhpc

Pass.

@kuanchihwang kuanchihwang temporarily deployed to CI-tests-on-CIRRUS April 24, 2026 19:09 — with GitHub Actions Inactive
@kuanchihwang kuanchihwang marked this pull request as ready for review April 24, 2026 19:17
@kuanchihwang kuanchihwang requested review from mgduda and nusbaume April 24, 2026 19:19
@kuanchihwang kuanchihwang temporarily deployed to CI-tests-on-CIRRUS May 1, 2026 20:01 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for bringing in the latest version of MPAS @kuanchihwang! I have a question, an optional clean-up request, and some requests to eventually provide some unit labels for MPAS namelist entries, but nothing that is strictly required for this particular PR.

Of course if you have any questions or concerns with any of my requests then just let me know. Thanks again!

@@ -0,0 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just double-checking that these three patch files won't be needed once MPAS PR MPAS-Dev/MPAS-Model#1448 has been merged?

character(strkind), pointer :: config_les_model
integer :: mesh_format
integer, pointer :: num_scalars
logical :: mpas_without_les
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this logical be promoted to a variable within mpas_dynamical_core_type? That way we only need to query the config_les_model variable pointer once.

Comment on lines +921 to +925
call self % get_variable_pointer(config_les_model, 'cfg', 'config_les_model')

mpas_without_les = (trim(adjustl(config_les_model)) == 'none')

nullify(config_les_model)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we promote mpas_without_les to an mpas_dynamical_core_type variable then these lines are no longer needed.

<entry id="mpas_epssm_transition_bottom_z">
<category>mpas</category>
<desc>
Height MSL of bottom of transition zone for epssm
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this say "above" here?

Suggested change
Height MSL of bottom of transition zone for epssm
Height above MSL of bottom of transition zone for epssm

Comment on lines +141 to +143
<values>
<value>30000.0</value>
</values>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we add a units tag here to indicate what the units are for the height number (I am guessing meters)?

Suggested change
<values>
<value>30000.0</value>
</values>
<units>m</units>
<values>
<value>30000.0</value>
</values>

I realize this file is created with a script, so if it is too difficult to add this at the moment then I am happy to open an issue and figure out a better, script-driven method later.

Comment on lines +148 to +154
Height MSL of top of transition zone for epssm
</desc>
<group>mpas_damping</group>
<type>real</type>
<values>
<value>50000.0</value>
</values>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Update description and add units element here as well (if doable)?

Suggested change
Height MSL of top of transition zone for epssm
</desc>
<group>mpas_damping</group>
<type>real</type>
<values>
<value>50000.0</value>
</values>
Height above MSL of top of transition zone for epssm
</desc>
<group>mpas_damping</group>
<type>real</type>
<units>m</units>
<values>
<value>50000.0</value>
</values>

<value>0.0</value>
</values>
</entry>
<entry id="mpas_surface_heat_flux">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Eventually can we add a units element for this entry as well? I am guessing it is something like m K s-1 but could be wrong. Again I am happy to push this off to future work given that there is a script involved.

<value>0.0</value>
</values>
</entry>
<entry id="mpas_surface_moisture_flux">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Eventually can we add a units element for this entry as well? I am guessing it is something like m kg kg-1 s-1 but could be wrong. Again I am happy to push this off to future work given that there is a script involved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants