From f4dc6523ca49b39db17455179724795d41c45b66 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 15:38:28 +0000 Subject: [PATCH 01/11] Move tendendcy names to perturb out of MPAS code and into MPAS stochastic physics module --- .gitmodules | 2 +- .../dynamics/mpas_atm_time_integration.F | 15 ++++----------- src/core_atmosphere/stochastic_physics | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.gitmodules b/.gitmodules index f19f95960e..c76c86c8f4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -24,4 +24,4 @@ url = https://github.com/NCAR/MMM-physics.git [submodule "src/core_atmosphere/stochastic_physics"] path = src/core_atmosphere/stochastic_physics - url = https://github.com/dtcenter/stochastic_physics.git + url = https://github.com/dustinswales/stochastic_physics.git diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index d49d58d1ea..1e41756ece 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -881,7 +881,6 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) #endif real (kind=RKIND) :: time_dyn_step - character(len=32) :: tend_names(4) integer :: ierr logical, parameter :: debug = .false. @@ -1081,13 +1080,9 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) rk_step = 1 dynamics_substep = 1 -! apply random perturbation pattern to the tendency - tend_names(1) = "rucuten" - tend_names(2) = "rvcuten" - tend_names(3) = "rublten" - tend_names(4) = "rvblten" +! apply random perturbation pattern to physics process (moist) tendencies if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, 4, tend_names, ierr) + call stochastic_physics_pattern_apply(domain, 'phys', ierr) endif call physics_get_tend( block, mesh, state, diag, tend, tend_physics, & @@ -1096,11 +1091,9 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) exchange_halo_group ) call mpas_timer_stop('physics_get_tend') -! apply random perturbation pattern to the tendency - tend_names(1) = "tend_rtheta_physics" -! tend_names(2) = "tend_rho_physics" +! apply random perturbation pattern to the accumulated (dry) physics tendencies if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, 1, tend_names, ierr) + call stochastic_physics_pattern_apply(domain, 'prog', ierr) endif #else #ifndef MPAS_CAM_DYCORE diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 2f6eace83f..0e36dce76b 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 2f6eace83f662db2ee16cad8f831c012e7be92f5 +Subproject commit 0e36dce76b4d55f5a7b79bfccd48c316695c01a7 From 6b1378d858c401014631c989916a2c05d1a49e9e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 15:55:24 +0000 Subject: [PATCH 02/11] Update stochastic physics hash --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 0e36dce76b..ceb6cce1f9 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0e36dce76b4d55f5a7b79bfccd48c316695c01a7 +Subproject commit ceb6cce1f9fe3859a75e012da4ec97f7ce8da211 From bb5165992928a1a7ff6053f8f506788ad819ee23 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 15:57:03 +0000 Subject: [PATCH 03/11] Turn off baseline build/run in CI scipt, for now --- .github/workflows/run_mpas_stoch.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 5909270b46..6180722675 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -172,11 +172,11 @@ jobs: cd ${SRCDIR_BL}/src/core_atmosphere/physics ./checkout_data_files.sh - - name: Build MPAS -- baseline branch - if: steps.cache-bl.outputs.cache-hit != 'true' - run: | - cd ${SRCDIR_BL} - make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} + #- name: Build MPAS -- baseline branch + # if: steps.cache-bl.outputs.cache-hit != 'true' + # run: | + # cd ${SRCDIR_BL} + # make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## # Clone and build the MPAS feature branch. @@ -321,12 +321,12 @@ jobs: ########################################################################################## # Run MPAS with both baseline and feature branches. ########################################################################################## - - name: Run MPAS -- baseline branch - run: | - cd ${RUNDIR_BL} - pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model - pwd && ls -l + #- name: Run MPAS -- baseline branch + # run: | + # cd ${RUNDIR_BL} + # pwd && ls -l + # mpiexec --allow-run-as-root -np 1 ./atmosphere_model + # pwd && ls -l - name: Run MPAS -- feature branch run: | From 33f520a2f166dc9bf58c397c1e0e81a4697f462e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 16:08:16 +0000 Subject: [PATCH 04/11] WIP --- .github/workflows/run_mpas.yml | 2 +- .github/workflows/run_mpas_hrrr.yml | 2 +- src/core_atmosphere/stochastic_physics | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index a069feb107..968a7cacc7 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,6 +1,6 @@ name: Run MPAS Standalone (NOAA GSL tests) -on: [push, pull_request, workflow_dispatch] +on: [pull_request, workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 3cc679ad75..5450d26882 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,6 +1,6 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -on: [push, pull_request, workflow_dispatch] +on: [pull_request, workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index ceb6cce1f9..c3d8cae652 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit ceb6cce1f9fe3859a75e012da4ec97f7ce8da211 +Subproject commit c3d8cae652dca909ac179fc2c5ea357b28a80d00 From 65aa4115a7b62e067259f2e2c9b1a6077fe6d53e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 16:26:25 +0000 Subject: [PATCH 05/11] WIP --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index c3d8cae652..389d3c6d90 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit c3d8cae652dca909ac179fc2c5ea357b28a80d00 +Subproject commit 389d3c6d904a03198bfc1de4578637a461a73d8b From 5a8649739378e038f5ba0a53bb217e108ce7b7c3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 16:36:03 +0000 Subject: [PATCH 06/11] WIP --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 389d3c6d90..ce6deffd32 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 389d3c6d904a03198bfc1de4578637a461a73d8b +Subproject commit ce6deffd32e48d3ea5b8fc58db454dd472a26cc8 From f0279478fb4600f1c548438aeedae40583ff786d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 16:49:55 +0000 Subject: [PATCH 07/11] WIP --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index ce6deffd32..0f339d7166 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit ce6deffd32e48d3ea5b8fc58db454dd472a26cc8 +Subproject commit 0f339d71665815466669dab658012c3d6e7f07f6 From 097b551020b659f1aa79233945e8330651fae431 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 18:37:45 +0000 Subject: [PATCH 08/11] WIP --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 0f339d7166..2489abcd9d 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0f339d71665815466669dab658012c3d6e7f07f6 +Subproject commit 2489abcd9d2d4d720ddca221d7d631d1f5fd1a77 From 5e55ff049c06b8e33f050540a9d4303c0216b05b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 18:48:48 +0000 Subject: [PATCH 09/11] WIP --- src/core_atmosphere/stochastic_physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 2489abcd9d..3319f139a0 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 2489abcd9d2d4d720ddca221d7d631d1f5fd1a77 +Subproject commit 3319f139a0fc0b1c72ae8e8f64c0acbb23fd510e From a9749914ba8e68bb58166c42aab3037250ed1948 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 19:08:29 +0000 Subject: [PATCH 10/11] Revert turning off CI tests --- .github/workflows/run_mpas.yml | 2 +- .github/workflows/run_mpas_hrrr.yml | 2 +- .github/workflows/run_mpas_stoch.yml | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index 968a7cacc7..a069feb107 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,6 +1,6 @@ name: Run MPAS Standalone (NOAA GSL tests) -on: [pull_request, workflow_dispatch] +on: [push, pull_request, workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 5450d26882..3cc679ad75 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,6 +1,6 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -on: [pull_request, workflow_dispatch] +on: [push, pull_request, workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 6180722675..5909270b46 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -172,11 +172,11 @@ jobs: cd ${SRCDIR_BL}/src/core_atmosphere/physics ./checkout_data_files.sh - #- name: Build MPAS -- baseline branch - # if: steps.cache-bl.outputs.cache-hit != 'true' - # run: | - # cd ${SRCDIR_BL} - # make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} + - name: Build MPAS -- baseline branch + if: steps.cache-bl.outputs.cache-hit != 'true' + run: | + cd ${SRCDIR_BL} + make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## # Clone and build the MPAS feature branch. @@ -321,12 +321,12 @@ jobs: ########################################################################################## # Run MPAS with both baseline and feature branches. ########################################################################################## - #- name: Run MPAS -- baseline branch - # run: | - # cd ${RUNDIR_BL} - # pwd && ls -l - # mpiexec --allow-run-as-root -np 1 ./atmosphere_model - # pwd && ls -l + - name: Run MPAS -- baseline branch + run: | + cd ${RUNDIR_BL} + pwd && ls -l + mpiexec --allow-run-as-root -np 1 ./atmosphere_model + pwd && ls -l - name: Run MPAS -- feature branch run: | From d20b8ef95cf5cbf2b7ef4260eb16dc0a364577e2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 19:43:21 +0000 Subject: [PATCH 11/11] Address reviewer comments --- src/core_atmosphere/dynamics/mpas_atm_time_integration.F | 4 ++-- src/core_atmosphere/stochastic_physics | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index 1e41756ece..64ce42708b 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -1080,7 +1080,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) rk_step = 1 dynamics_substep = 1 -! apply random perturbation pattern to physics process (moist) tendencies +! apply random perturbation pattern to physics process (hydrostatic) tendencies if (dosppt(domain)) then call stochastic_physics_pattern_apply(domain, 'phys', ierr) endif @@ -1091,7 +1091,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) exchange_halo_group ) call mpas_timer_stop('physics_get_tend') -! apply random perturbation pattern to the accumulated (dry) physics tendencies +! apply random perturbation pattern to the accumulated (non-hydrostatic) physics tendencies if (dosppt(domain)) then call stochastic_physics_pattern_apply(domain, 'prog', ierr) endif diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics index 3319f139a0..9533f11ed4 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 3319f139a0fc0b1c72ae8e8f64c0acbb23fd510e +Subproject commit 9533f11ed4d93cecb0cdf5e71b9cc9de3375a8b7