From 6f687eaa0414ea9f8a4cbb04125db09176bb8fce Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 12 Sep 2025 12:36:21 -0600 Subject: [PATCH 001/198] Add changes to MPAS-Model code necessary to run stochastic physics. The stochastic_physics submodule itself will be added in a separate commit. --- src/Makefile | 3 ++- src/core_atmosphere/Makefile | 10 +++++++--- src/core_atmosphere/Registry.xml | 6 ++++++ src/core_atmosphere/dynamics/Makefile | 3 ++- .../dynamics/mpas_atm_time_integration.F | 16 ++++++++++++++++ src/core_atmosphere/mpas_atm_core.F | 6 ++++++ 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index b9c037c8cc..88947030fa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,8 @@ else all: mpas mpas: $(AUTOCLEAN_DEPS) externals frame ops dycore drver - $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time +# $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time + $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f91 -L./external/esmf_time_f90 -lesmf_time -lmkl_intel_lp64 -lmkl_core -lmkl_sequential externals: $(AUTOCLEAN_DEPS) ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" all ) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index 966027bc77..7116f46449 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -42,7 +42,8 @@ post_build: physcore: mpas_atm_dimensions.o ( cd physics; $(MAKE) all ) - ( mkdir libphys; cd libphys; ar -x ../physics/libphys.a ) + ( cd stochastic_physics; $(MAKE) -f Makefile all ) + ( mkdir libphys; cd libphys; ar -x ../physics/libphys.a; ar -x ../stochastic_physics/libstochphys.a ) ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*TBL .) ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*DATA* .) ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_noahmp/parameters/*TBL .) @@ -68,6 +69,7 @@ mpas_atm_dimensions.o: clean: ( cd physics; $(MAKE) clean ) ( cd dynamics; $(MAKE) clean ) + ( cd stochastic_physics; $(MAKE) clean ) ( cd diagnostics; $(MAKE) clean ) ( cd utils; $(MAKE) clean ) ( cd ../..; rm -f *TBL ) @@ -84,7 +86,9 @@ clean: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(PHYSICS) $(CPPINCLUDES) -I./inc $< > $*.f90 - $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 +# $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 + $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 else - $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 +# $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 + $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 endif diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 1e867129f3..b15a61261f 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -32,6 +32,10 @@ description="The number of atmospheric layers"/> + + #ifdef DO_PHYSICS + + diff --git a/src/core_atmosphere/dynamics/Makefile b/src/core_atmosphere/dynamics/Makefile index 6892633c68..bb7d95a6ed 100644 --- a/src/core_atmosphere/dynamics/Makefile +++ b/src/core_atmosphere/dynamics/Makefile @@ -22,5 +22,6 @@ ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(PHYSICS) $(CPPINCLUDES) $< > $*.f90 $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../../external/esmf_time_f90 else - $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../../external/esmf_time_f90 +# $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../../external/esmf_time_f90 + $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../stochastic_physics -I../../external/esmf_time_f90 endif diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index 0601020cde..4d3588e296 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -31,6 +31,7 @@ module atm_time_integration use mpas_atmphys_driver_microphysics use mpas_atmphys_todynamics use mpas_atmphys_utilities + use mpas_stochastic_physics, only : stochastic_physics_pattern_apply #endif use mpas_atm_boundaries, only : nSpecZone, nRelaxZone, nBdyZone, mpas_atm_get_bdy_state, mpas_atm_get_bdy_tend ! regional_MPAS addition @@ -880,6 +881,8 @@ 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. @@ -1077,11 +1080,24 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) call mpas_timer_start('physics_get_tend') 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" + call stochastic_physics_pattern_apply(domain, 4, tend_names, ierr) + call physics_get_tend( block, mesh, state, diag, tend, tend_physics, & block % configs, rk_step, dynamics_substep, & tend_ru_physics, tend_rtheta_physics, tend_rho_physics, & 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" + call stochastic_physics_pattern_apply(domain, 1, tend_names, ierr) #else #ifndef MPAS_CAM_DYCORE ! diff --git a/src/core_atmosphere/mpas_atm_core.F b/src/core_atmosphere/mpas_atm_core.F index a490c807d5..682cc8a752 100644 --- a/src/core_atmosphere/mpas_atm_core.F +++ b/src/core_atmosphere/mpas_atm_core.F @@ -48,6 +48,7 @@ function atm_core_init(domain, startTimeStamp) result(ierr) use mpas_attlist, only : mpas_modify_att use mpas_string_utils, only : mpas_string_replace use mpas_atm_halos, only: atm_build_halo_groups, exchange_halo_group + use mpas_stochastic_physics, only : stochastic_physics_pattern_init implicit none @@ -301,6 +302,9 @@ function atm_core_init(domain, startTimeStamp) result(ierr) ! Prepare the dynamics for integration ! call mpas_atm_dynamics_init(domain) + ! + ! init stochastic pattern generation + call stochastic_physics_pattern_init (domain, ierr) end function atm_core_init @@ -1013,6 +1017,7 @@ subroutine atm_do_timestep(domain, dt, itimestep) use mpas_atmphys_update #endif use mpas_atm_halos, only: exchange_halo_group + use mpas_stochastic_physics, only : stochastic_physics_pattern_adv implicit none @@ -1045,6 +1050,7 @@ subroutine atm_do_timestep(domain, dt, itimestep) endif #endif + call stochastic_physics_pattern_adv(domain, itimestep, ierr) call atm_timestep(domain, dt, currTime, itimestep, exchange_halo_group) end subroutine atm_do_timestep From bb262cd24ca7365eab4534b0d7ee5714c041546c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 12 Sep 2025 12:53:03 -0600 Subject: [PATCH 002/198] Add stochastic physics as a submodule. --- .gitmodules | 3 +++ src/core_atmosphere/stochastic_physics | 1 + 2 files changed, 4 insertions(+) create mode 160000 src/core_atmosphere/stochastic_physics diff --git a/.gitmodules b/.gitmodules index 2a5c453488..1b90c4c28b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "src/core_atmosphere/physics/physics_noaa/GFL"] path = src/core_atmosphere/physics/physics_noaa/GFL url = https://github.com/NOAA-GSL/GFL.git +[submodule "src/core_atmosphere/stochastic_physics"] + path = src/core_atmosphere/stochastic_physics + url = https://github.com/dtcenter/stochastic_physics.git diff --git a/src/core_atmosphere/stochastic_physics b/src/core_atmosphere/stochastic_physics new file mode 160000 index 0000000000..fad2fe9f42 --- /dev/null +++ b/src/core_atmosphere/stochastic_physics @@ -0,0 +1 @@ +Subproject commit fad2fe9f42f6b7f744b128b4a2a9433f91e4296f From e5bde4d84849baff01961f907cd7b981a3c4ec86 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 16 Sep 2025 11:49:37 -0600 Subject: [PATCH 003/198] Bug fix: Add missing lines for stochastic physics to Registry.xml. --- src/core_atmosphere/Registry.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index b15a61261f..429bc41497 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -4214,6 +4214,11 @@ description="Total cell-centered meridional wind tendency from physics" persistence="scratch" /> + + + #ifdef DO_PHYSICS @@ -4722,5 +4727,6 @@ #ifdef DO_PHYSICS #include "physics/Registry_noahmp.xml" +#include "stochastic_physics/Registry_stoch_physics.xml" #endif From 293e081a917bb0ee74973574af3dcf192ebac344 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 16 Sep 2025 11:51:52 -0600 Subject: [PATCH 004/198] Change hash of stochastic_physics. --- 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 fad2fe9f42..4cbae6bdff 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit fad2fe9f42f6b7f744b128b4a2a9433f91e4296f +Subproject commit 4cbae6bdff80a8ce23e6f80375b7954da4490699 From cee787ed7e0ba85300d04f3b2f7d9bb690f1c6aa Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 14 Nov 2025 17:09:56 -0700 Subject: [PATCH 005/198] Update hashes of GFL and MYNN-EDMF submodules. Not sure why this wasn't updated during latest merge of gsl/develop. --- src/core_atmosphere/physics/physics_noaa/GFL | 2 +- src/core_atmosphere/physics/physics_noaa/MYNN-EDMF | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/physics/physics_noaa/GFL b/src/core_atmosphere/physics/physics_noaa/GFL index bb85663877..9f55b90145 160000 --- a/src/core_atmosphere/physics/physics_noaa/GFL +++ b/src/core_atmosphere/physics/physics_noaa/GFL @@ -1 +1 @@ -Subproject commit bb8566387728d1e1e1e15e82d9837d75997557ec +Subproject commit 9f55b9014506619083b6b8ccacb26bceafbacad6 diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF index c1ba7d97e1..7c14493e29 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF @@ -1 +1 @@ -Subproject commit c1ba7d97e1553519c82b11ca9fbca91ead21a9c9 +Subproject commit 7c14493e294c18f0318dd859b6fe328439cc7e3b From c93caca873073d3be1f7107fc75e2426ecd03f4d Mon Sep 17 00:00:00 2001 From: ning wang Date: Mon, 24 Nov 2025 10:26:53 -0700 Subject: [PATCH 006/198] A new version of SPPT merged into the latest gsl/MPAS_stoch_physics. --- .../dynamics/mpas_atm_time_integration.F | 10 +++++++--- src/core_atmosphere/mpas_atm_core.F | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index 4d3588e296..d49d58d1ea 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -31,7 +31,7 @@ module atm_time_integration use mpas_atmphys_driver_microphysics use mpas_atmphys_todynamics use mpas_atmphys_utilities - use mpas_stochastic_physics, only : stochastic_physics_pattern_apply + use mpas_stochastic_physics, only : stochastic_physics_pattern_apply, dosppt #endif use mpas_atm_boundaries, only : nSpecZone, nRelaxZone, nBdyZone, mpas_atm_get_bdy_state, mpas_atm_get_bdy_tend ! regional_MPAS addition @@ -1086,7 +1086,9 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) tend_names(2) = "rvcuten" tend_names(3) = "rublten" tend_names(4) = "rvblten" - call stochastic_physics_pattern_apply(domain, 4, tend_names, ierr) + if (dosppt(domain)) then + call stochastic_physics_pattern_apply(domain, 4, tend_names, ierr) + endif call physics_get_tend( block, mesh, state, diag, tend, tend_physics, & block % configs, rk_step, dynamics_substep, & @@ -1097,7 +1099,9 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) ! apply random perturbation pattern to the tendency tend_names(1) = "tend_rtheta_physics" ! tend_names(2) = "tend_rho_physics" - call stochastic_physics_pattern_apply(domain, 1, tend_names, ierr) + if (dosppt(domain)) then + call stochastic_physics_pattern_apply(domain, 1, tend_names, ierr) + endif #else #ifndef MPAS_CAM_DYCORE ! diff --git a/src/core_atmosphere/mpas_atm_core.F b/src/core_atmosphere/mpas_atm_core.F index 13ae398deb..7420c9767e 100644 --- a/src/core_atmosphere/mpas_atm_core.F +++ b/src/core_atmosphere/mpas_atm_core.F @@ -48,7 +48,7 @@ function atm_core_init(domain, startTimeStamp) result(ierr) use mpas_attlist, only : mpas_modify_att use mpas_string_utils, only : mpas_string_replace use mpas_atm_halos, only: atm_build_halo_groups, exchange_halo_group - use mpas_stochastic_physics, only : stochastic_physics_pattern_init + use mpas_stochastic_physics, only : stochastic_physics_pattern_init, dosppt implicit none @@ -304,7 +304,9 @@ function atm_core_init(domain, startTimeStamp) result(ierr) call mpas_atm_dynamics_init(domain) ! ! init stochastic pattern generation - call stochastic_physics_pattern_init (domain, ierr) + if (dosppt(domain)) then + call stochastic_physics_pattern_init (domain, ierr) + endif end function atm_core_init @@ -1019,7 +1021,7 @@ subroutine atm_do_timestep(domain, dt, itimestep) use mpas_atmphys_update #endif use mpas_atm_halos, only: exchange_halo_group - use mpas_stochastic_physics, only : stochastic_physics_pattern_adv + use mpas_stochastic_physics, only : stochastic_physics_pattern_adv, dosppt implicit none @@ -1052,7 +1054,9 @@ subroutine atm_do_timestep(domain, dt, itimestep) endif #endif - call stochastic_physics_pattern_adv(domain, itimestep, ierr) + if (dosppt(domain)) then + call stochastic_physics_pattern_adv(domain, itimestep, ierr) + endif call atm_timestep(domain, dt, currTime, itimestep, exchange_halo_group) end subroutine atm_do_timestep From 845ff87d76dd44e984999481157c64a6e7baad1c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 18 Dec 2025 17:03:47 -0700 Subject: [PATCH 007/198] Update hash of stochastic_physics submodule to point to the head of the gsl/MPAS_stoch_physics in the stochastic_physics repo. --- 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 4cbae6bdff..0b8abcd291 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 4cbae6bdff80a8ce23e6f80375b7954da4490699 +Subproject commit 0b8abcd291644d670280e72b63e765fdbfef06b5 From 995a0cfc19a37095f6c5ff8fbafee5ebbb295e02 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 2 Feb 2026 13:27:36 -0700 Subject: [PATCH 008/198] Update hash of stochastic_physics to the hash from Ning for 8-byte integer seed workaround. --- 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 0b8abcd291..0fa4f15ea6 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0b8abcd291644d670280e72b63e765fdbfef06b5 +Subproject commit 0fa4f15ea67e87c1ae248e4197cd1b6f0f30dbe5 From 5cf356a6cd95405ad5dc71a4e67ec9467ece19be Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 4 Feb 2026 16:36:24 -0700 Subject: [PATCH 009/198] Change name of and file for output stream for chemistry (and dust and smoke) from "output" to "output_smoke" (and file from "history..." to "history_smoke...". This is necessary because the stream name "output" is already taken by the main output stream, and having the same name for two different output streams apparently causes SMIOL I/O errors during the forecast (and incorrect/corrupted history*.nc files). --- src/core_atmosphere/physics/registry.chemistry.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/physics/registry.chemistry.xml b/src/core_atmosphere/physics/registry.chemistry.xml index 92581393a4..4ce4f2c1f2 100644 --- a/src/core_atmosphere/physics/registry.chemistry.xml +++ b/src/core_atmosphere/physics/registry.chemistry.xml @@ -171,9 +171,9 @@ - From d63788d6d97f0fef2ba9254c62c22dcc5d803d91 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 25 Feb 2026 02:12:28 -0700 Subject: [PATCH 010/198] Modifications to Makefile to make sure that after make is invoked, (1) no stale stream_list.atmosphere files exist in the two default_inputs directories (one under core_atmosphere and the other immediately under the MPAS-Model top-level directory), and (2) for the atmosphere core, all files (stream-related as well as namelist) in the top-level directory are backed up before new such files are copied from the default_inputs directory back up a level into the top-level directory. Previously, existing (and thus possibly outdated) stream_list.atmosphere.* files in the top-level directory were not being replaced by newer ones in default_inputs, and that was causing unexpected (and wrong) behavior. Probably a similar fix is needed for the init_atmsophere core and maybe even other ones. --- src/core_atmosphere/Makefile | 82 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index 966027bc77..eebad79d3d 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -28,6 +28,13 @@ core_reg: core_input_gen: if [ ! -e default_inputs ]; then mkdir default_inputs; fi + @# Since both the streams.atmosphere file and new stream_list.atmoshpere + @# files are regenerated on every make invocation, delete all such existing + @# files in default_inputs in order ensure that any stale stream_list.atmosphere. + @# files are removed. Removal of streams.atmosphere is not necessary since + @# it will always be overwritten, but we do so to maintain the same behavior + @# for all stream-related files. + rm -f default_inputs/streams.atmosphere default_inputs/stream_list.atmosphere.* ( cd default_inputs; $(NL_GEN) ../Registry_processed.xml namelist.atmosphere in_defaults=true ) ( cd default_inputs; $(ST_GEN) ../Registry_processed.xml streams.atmosphere stream_list.atmosphere. listed in_defaults=true) @@ -36,9 +43,82 @@ gen_includes: core_reg (cd inc; $(REG_PARSE) ../Registry_processed.xml $(CPPFLAGS) ) post_build: + @# + @# In the following line, ROOT_DIR is the path to the top-level MPAS-Model + @# directory. This if-statement creates a default_inputs directory under + @# this root directory if it doesn't already exist, e.g. + @# + @# /path/to/my/MPAS-Model/default_inputs + @# + @# Call this the "main" default_inputs directory. + @# if [ ! -e $(ROOT_DIR)/default_inputs ]; then mkdir $(ROOT_DIR)/default_inputs; fi + @# + @# Remove streams.atmosphere and any stream_list.atmosphere. files from + @# ROOT_DIR/default_inputs before copying into this directory the newly- + @# generated files from the current core's default_inputs directory. This + @# ensures that stale streams.atmosphere files from previous make invocations + @# are removed from ROOT_DIR/default_inputs. + @# + rm -f $(ROOT_DIR)/default_inputs/streams.$(CORE) $(ROOT_DIR)/default_inputs/stream_list.$(CORE).* + @# + @# The following line copies everything from the default_inputs subidirectory + @# under the current core's source directory into the main default_inputs + @# directory. Since there is a Makefile like this under each core, we call + @# the former the (current) core's default_inputs directory. For example, if + @# this Makefile is for the atmosphere core, it will be located under + @# + @# /path/to/my/MPAS-Model/src/core_atmosphere + @# + @# Then the following command will copy everything from + @# + @# /path/to/my/MPAS-Model/src/core_atmosphere/default_inputs + @# + @# into + @# + @# /path/to/my/MPAS-Model/default_inputs + @# + @# Note that the core's default_inputs directory is guaranteed to not + @# contain any stale stream_list.atmosphere. files from previous make + @# invocations (see the rm command in the core_input_gen target). + @# cp default_inputs/* $(ROOT_DIR)/default_inputs/. - ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do if [ ! -e ../$$FILE ]; then cp $$FILE ../.; fi; done ) + @# + @################################################################ + @# The following line will copy each file in the main default_inputs + @# directory one level up into the top-level MPAS-Model directory, i.e. + @# ROOT_DIR, but ONLY IF that file doesn't already exist in ROOT_DIR. + @# + @# CAUTION: + @# If files from an old build are already present in ROOT_DIR and a + @# new build causes them to be updated in ROOT_DIR/default_inputs, + @# the following line WILL NOT update those files in ROOT_DIR. + @# + @# This seems to be intentional behavior, but it's not clear why. + @# + @#( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do if [ ! -e ../$$FILE ]; then cp $$FILE ../.; fi; done ) + @# + @################################################################ + @# + @# Update line so it ALWAYS copies over all files from ROOT_DIR/default_inputs + @# into ROOT_DIR. + @# + @#( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do cp $$FILE ../.; done ) + @# + @################################################################ + @# + @# Even better is to make backups of any existing files in ROOT_DIR + @# (by renaming them as .old001, .old002, etc) and then copying the + @# file in ROOT_DIR/default_inputs over to ROOT_DIR. + @# + ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do \ + if [ -e ../$$FILE ]; then \ + N=1; \ + while [ -e "../$$FILE.old$$(printf '%03d' $$N)" ]; do N=$$((N+1)); done; \ + mv "../$$FILE" "../$$FILE.old$$(printf '%03d' $$N)"; \ + fi; \ + cp $$FILE ../.; \ + done ) physcore: mpas_atm_dimensions.o ( cd physics; $(MAKE) all ) From cea828b9c53cd3b76b32c069b449807cd4500459 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 25 Feb 2026 02:19:05 -0700 Subject: [PATCH 011/198] Change the name of the output stream in registry.chemistry.xml (as well as its output file) so it doesn't conflict with the default output stream. --- src/core_atmosphere/physics/registry.chemistry.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/physics/registry.chemistry.xml b/src/core_atmosphere/physics/registry.chemistry.xml index 92581393a4..4ce4f2c1f2 100644 --- a/src/core_atmosphere/physics/registry.chemistry.xml +++ b/src/core_atmosphere/physics/registry.chemistry.xml @@ -171,9 +171,9 @@ - From 8428af88227c2b8e4649bedb51d2997c34a768ee Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 11 Mar 2026 13:16:01 -0600 Subject: [PATCH 012/198] Switch hash of stochastic_physics to branch in which the merge with stochastic_physics's master branh will gradually happen. --- 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 4cbae6bdff..4e0f56160f 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 4cbae6bdff80a8ce23e6f80375b7954da4490699 +Subproject commit 4e0f56160f0794eca34e993c208b9a89eccd3cc1 From f8fea43c497ed7fce7493a00962670d7a5b1219c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 11 Mar 2026 16:50:55 -0600 Subject: [PATCH 013/198] Fix hash of stochastic_physics. --- 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 0fa4f15ea6..4e0f56160f 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0fa4f15ea67e87c1ae248e4197cd1b6f0f30dbe5 +Subproject commit 4e0f56160f0794eca34e993c208b9a89eccd3cc1 From 40603530e71a5443118a604d18b11cd53ff7eced Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 14 Mar 2026 12:30:42 -0600 Subject: [PATCH 014/198] In the top-level Makefile, add a flag to CPPFLAGS that will let the stochastic_physics code know that the dycore being used is MPAS. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 9b12a88df6..0eedb9704b 100644 --- a/Makefile +++ b/Makefile @@ -1583,6 +1583,10 @@ IO_MESSAGE = "Using the SMIOL library." override CPPFLAGS += "-DMPAS_SMIOL_SUPPORT" endif +# Add flag to CPPFLAGS that will let the stochastic_physics code know that +# the dycore being used is MPAS. +override CPPFLAGS += "-DMPAS_STOCH" + mpas_main: $(MAIN_DEPS) cd src; $(MAKE) FC="$(FC)" \ CC="$(CC)" \ From 9bdd0deb794321d98b92d3b9872d939695effcb9 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 14 Mar 2026 12:32:15 -0600 Subject: [PATCH 015/198] Update hash of stochastic_physics. --- 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 4e0f56160f..1ba37570b1 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 4e0f56160f0794eca34e993c208b9a89eccd3cc1 +Subproject commit 1ba37570b1147342486786e8adcb0b4285ce4714 From 57f2ccf5e7d13a5a03ee8a2bd8ac9ee93337a59a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 14 Mar 2026 13:37:21 -0600 Subject: [PATCH 016/198] Update hash of stochastic_physics. --- 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 1ba37570b1..dbd7393af4 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 1ba37570b1147342486786e8adcb0b4285ce4714 +Subproject commit dbd7393af41944bb110ddfbad00132fbb993a357 From 6f5de0ae2be8357778d34b77114b44ed23c19e56 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 24 Mar 2026 13:24:59 -0600 Subject: [PATCH 017/198] Remove definition of macro MPAS_STOCH from main MPAS Makefile. This will instead be defined in the Makefile for stochastic_physics only (in a separate commit into the stochastic_physics repo) since it is only needed by the stochastic_physics submodule. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0eedb9704b..bdccb05d1e 100644 --- a/Makefile +++ b/Makefile @@ -1583,9 +1583,9 @@ IO_MESSAGE = "Using the SMIOL library." override CPPFLAGS += "-DMPAS_SMIOL_SUPPORT" endif -# Add flag to CPPFLAGS that will let the stochastic_physics code know that -# the dycore being used is MPAS. -override CPPFLAGS += "-DMPAS_STOCH" +## Add flag to CPPFLAGS that will let the stochastic_physics code know that +## the dycore being used is MPAS. +#override CPPFLAGS += "-DMPAS_STOCH" mpas_main: $(MAIN_DEPS) cd src; $(MAKE) FC="$(FC)" \ From 662e9c272af81222062af9ec08945705b055bac2 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 24 Mar 2026 13:28:01 -0600 Subject: [PATCH 018/198] Update hash of stochastic_physics. --- 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 dbd7393af4..a92756d4cb 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit dbd7393af41944bb110ddfbad00132fbb993a357 +Subproject commit a92756d4cba920f1d444ea4ffe0754c8882c1b44 From b4c22a18e89a1904e9783dfc37364e5aa4d9512e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 24 Mar 2026 17:25:23 -0600 Subject: [PATCH 019/198] Remove commented-out lines in Makefile that refer to MPAS_STOCH (since that is now added in the Makefile in stochastic_physics). --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index bdccb05d1e..9b12a88df6 100644 --- a/Makefile +++ b/Makefile @@ -1583,10 +1583,6 @@ IO_MESSAGE = "Using the SMIOL library." override CPPFLAGS += "-DMPAS_SMIOL_SUPPORT" endif -## Add flag to CPPFLAGS that will let the stochastic_physics code know that -## the dycore being used is MPAS. -#override CPPFLAGS += "-DMPAS_STOCH" - mpas_main: $(MAIN_DEPS) cd src; $(MAKE) FC="$(FC)" \ CC="$(CC)" \ From d2708cf8df3cc4955b4bb7dde307060e3f343756 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 24 Mar 2026 17:35:59 -0600 Subject: [PATCH 020/198] Update hash of stochastic_physics. --- 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 a92756d4cb..15f9e24633 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit a92756d4cba920f1d444ea4ffe0754c8882c1b44 +Subproject commit 15f9e24633b3ca5622ee199da3c719fe28e031f1 From ec08395b294a51436e00382a65bc517bb91a3518 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 27 Mar 2026 12:41:46 -0600 Subject: [PATCH 021/198] Update hash of stochastic_physics. --- 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 15f9e24633..60a0c171c0 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 15f9e24633b3ca5622ee199da3c719fe28e031f1 +Subproject commit 60a0c171c03ec886a462a611924ae6e92844ac45 From a11e46faf7f4cf8cfb375aa369ef67442c1e9ba9 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 28 Mar 2026 21:09:22 -0600 Subject: [PATCH 022/198] Add lines to physics Makefile to also build the executable that builds the TEMPO tables. --- src/core_atmosphere/physics/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index dfe7ea1e8c..f3e1dd8dd6 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -66,6 +66,7 @@ core_physics_mmm: core_physics_init core_microphysics: core_physics_init core_physics_mmm (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas) + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel run_build_tables ; cp run_build_tables ../../../../../) core_SMOKE: core_physics_init (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) @@ -290,6 +291,7 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) + ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel clean; fi ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) From d5a21078fe393b20293ae1dab7a4a1b8ba46fd69 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 30 Mar 2026 09:13:10 -0600 Subject: [PATCH 023/198] Remove commented-out lines in Makefiles. --- src/Makefile | 1 - src/core_atmosphere/Makefile | 2 -- src/core_atmosphere/dynamics/Makefile | 1 - 3 files changed, 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 88947030fa..305047d837 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,6 @@ else all: mpas mpas: $(AUTOCLEAN_DEPS) externals frame ops dycore drver -# $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f91 -L./external/esmf_time_f90 -lesmf_time -lmkl_intel_lp64 -lmkl_core -lmkl_sequential externals: $(AUTOCLEAN_DEPS) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index 433b9b1362..0508ad1504 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -166,9 +166,7 @@ clean: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(PHYSICS) $(CPPINCLUDES) -I./inc $< > $*.f90 -# $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 else -# $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 endif diff --git a/src/core_atmosphere/dynamics/Makefile b/src/core_atmosphere/dynamics/Makefile index bb7d95a6ed..62d595c90a 100644 --- a/src/core_atmosphere/dynamics/Makefile +++ b/src/core_atmosphere/dynamics/Makefile @@ -22,6 +22,5 @@ ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(PHYSICS) $(CPPINCLUDES) $< > $*.f90 $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../../external/esmf_time_f90 else -# $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../../external/esmf_time_f90 $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I.. -I../../framework -I../../operators -I../physics -I../physics/physics_wrf -I../physics/physics_mmm -I../stochastic_physics -I../../external/esmf_time_f90 endif From 365959c76d4a844bb74be30e40458ee2e7634ba8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 30 Mar 2026 09:32:05 -0600 Subject: [PATCH 024/198] Clean up comments. --- src/core_atmosphere/Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index 0508ad1504..8110d41e0e 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -28,12 +28,12 @@ core_reg: core_input_gen: if [ ! -e default_inputs ]; then mkdir default_inputs; fi - @# Since both the streams.atmosphere file and new stream_list.atmoshpere + @# Since both the streams.atmosphere file and new stream_list.atmoshpere.* @# files are regenerated on every make invocation, delete all such existing - @# files in default_inputs in order ensure that any stale stream_list.atmosphere. - @# files are removed. Removal of streams.atmosphere is not necessary since - @# it will always be overwritten, but we do so to maintain the same behavior - @# for all stream-related files. + @# files in default_inputs in order ensure that any stale stream_list.atmosphere.* + @# files are removed. Note that removal of streams.atmosphere is not necessary + @# here since it will always be overwritten, but we do so to maintain the + @# same behavior for all stream-related files. rm -f default_inputs/streams.atmosphere default_inputs/stream_list.atmosphere.* ( cd default_inputs; $(NL_GEN) ../Registry_processed.xml namelist.atmosphere in_defaults=true ) ( cd default_inputs; $(ST_GEN) ../Registry_processed.xml streams.atmosphere stream_list.atmosphere. listed in_defaults=true) @@ -54,10 +54,10 @@ post_build: @# if [ ! -e $(ROOT_DIR)/default_inputs ]; then mkdir $(ROOT_DIR)/default_inputs; fi @# - @# Remove streams.atmosphere and any stream_list.atmosphere. files from - @# ROOT_DIR/default_inputs before copying into this directory the newly- + @# Remove streams.atmosphere and any stream_list.atmosphere.* files from + @# ROOT_DIR/default_inputs before copying into this directory the newly @# generated files from the current core's default_inputs directory. This - @# ensures that stale streams.atmosphere files from previous make invocations + @# ensures that stale streams.atmosphere.* files from previous make invocations @# are removed from ROOT_DIR/default_inputs. @# rm -f $(ROOT_DIR)/default_inputs/streams.$(CORE) $(ROOT_DIR)/default_inputs/stream_list.$(CORE).* @@ -70,7 +70,7 @@ post_build: @# @# /path/to/my/MPAS-Model/src/core_atmosphere @# - @# Then the following command will copy everything from + @# Then the line below will copy everything from @# @# /path/to/my/MPAS-Model/src/core_atmosphere/default_inputs @# @@ -79,15 +79,16 @@ post_build: @# /path/to/my/MPAS-Model/default_inputs @# @# Note that the core's default_inputs directory is guaranteed to not - @# contain any stale stream_list.atmosphere. files from previous make - @# invocations (see the rm command in the core_input_gen target). + @# contain any stale stream_list.atmosphere.* files from previous make + @# invocations (see the rm command in the core_input_gen target above). @# cp default_inputs/* $(ROOT_DIR)/default_inputs/. @# @################################################################ @# The following line will copy each file in the main default_inputs - @# directory one level up into the top-level MPAS-Model directory, i.e. - @# ROOT_DIR, but ONLY IF that file doesn't already exist in ROOT_DIR. + @# directory (at ROOT_DIR/default_inputs) one level up into the top-level + @# MPAS-Model directory, i.e. ROOT_DIR, but ONLY IF that file doesn't + @# already exist in ROOT_DIR. @# @# CAUTION: @# If files from an old build are already present in ROOT_DIR and a From 795dd8cea5a099b40e3348d6946a9f6e848c06e5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 30 Mar 2026 09:39:27 -0600 Subject: [PATCH 025/198] Get rid of comments in Makefile for brevity. --- src/core_atmosphere/Makefile | 72 ------------------------------------ 1 file changed, 72 deletions(-) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index 8110d41e0e..d917ebfb30 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -28,12 +28,6 @@ core_reg: core_input_gen: if [ ! -e default_inputs ]; then mkdir default_inputs; fi - @# Since both the streams.atmosphere file and new stream_list.atmoshpere.* - @# files are regenerated on every make invocation, delete all such existing - @# files in default_inputs in order ensure that any stale stream_list.atmosphere.* - @# files are removed. Note that removal of streams.atmosphere is not necessary - @# here since it will always be overwritten, but we do so to maintain the - @# same behavior for all stream-related files. rm -f default_inputs/streams.atmosphere default_inputs/stream_list.atmosphere.* ( cd default_inputs; $(NL_GEN) ../Registry_processed.xml namelist.atmosphere in_defaults=true ) ( cd default_inputs; $(ST_GEN) ../Registry_processed.xml streams.atmosphere stream_list.atmosphere. listed in_defaults=true) @@ -43,75 +37,9 @@ gen_includes: core_reg (cd inc; $(REG_PARSE) ../Registry_processed.xml $(CPPFLAGS) ) post_build: - @# - @# In the following line, ROOT_DIR is the path to the top-level MPAS-Model - @# directory. This if-statement creates a default_inputs directory under - @# this root directory if it doesn't already exist, e.g. - @# - @# /path/to/my/MPAS-Model/default_inputs - @# - @# Call this the "main" default_inputs directory. - @# if [ ! -e $(ROOT_DIR)/default_inputs ]; then mkdir $(ROOT_DIR)/default_inputs; fi - @# - @# Remove streams.atmosphere and any stream_list.atmosphere.* files from - @# ROOT_DIR/default_inputs before copying into this directory the newly - @# generated files from the current core's default_inputs directory. This - @# ensures that stale streams.atmosphere.* files from previous make invocations - @# are removed from ROOT_DIR/default_inputs. - @# rm -f $(ROOT_DIR)/default_inputs/streams.$(CORE) $(ROOT_DIR)/default_inputs/stream_list.$(CORE).* - @# - @# The following line copies everything from the default_inputs subidirectory - @# under the current core's source directory into the main default_inputs - @# directory. Since there is a Makefile like this under each core, we call - @# the former the (current) core's default_inputs directory. For example, if - @# this Makefile is for the atmosphere core, it will be located under - @# - @# /path/to/my/MPAS-Model/src/core_atmosphere - @# - @# Then the line below will copy everything from - @# - @# /path/to/my/MPAS-Model/src/core_atmosphere/default_inputs - @# - @# into - @# - @# /path/to/my/MPAS-Model/default_inputs - @# - @# Note that the core's default_inputs directory is guaranteed to not - @# contain any stale stream_list.atmosphere.* files from previous make - @# invocations (see the rm command in the core_input_gen target above). - @# cp default_inputs/* $(ROOT_DIR)/default_inputs/. - @# - @################################################################ - @# The following line will copy each file in the main default_inputs - @# directory (at ROOT_DIR/default_inputs) one level up into the top-level - @# MPAS-Model directory, i.e. ROOT_DIR, but ONLY IF that file doesn't - @# already exist in ROOT_DIR. - @# - @# CAUTION: - @# If files from an old build are already present in ROOT_DIR and a - @# new build causes them to be updated in ROOT_DIR/default_inputs, - @# the following line WILL NOT update those files in ROOT_DIR. - @# - @# This seems to be intentional behavior, but it's not clear why. - @# - @#( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do if [ ! -e ../$$FILE ]; then cp $$FILE ../.; fi; done ) - @# - @################################################################ - @# - @# Update line so it ALWAYS copies over all files from ROOT_DIR/default_inputs - @# into ROOT_DIR. - @# - @#( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do cp $$FILE ../.; done ) - @# - @################################################################ - @# - @# Even better is to make backups of any existing files in ROOT_DIR - @# (by renaming them as .old001, .old002, etc) and then copying the - @# file in ROOT_DIR/default_inputs over to ROOT_DIR. - @# ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do \ if [ -e ../$$FILE ]; then \ N=1; \ From 722cac124a46b0eb4955453b8fa351bf53cd740a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 30 Mar 2026 10:01:45 -0600 Subject: [PATCH 026/198] Update hash of stochastic_physics. --- 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 60a0c171c0..17222a717c 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 60a0c171c03ec886a462a611924ae6e92844ac45 +Subproject commit 17222a717c4b6e202370202742d57fdd9e5344ad From aaf05d0b9efcd7cf887e42bdbc3dbdac17951f61 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 30 Mar 2026 14:22:22 -0600 Subject: [PATCH 027/198] Modify Makefile so that TEMPO's ccn_activate.bin file gets copied to the top level of MPAS-Model. --- src/core_atmosphere/physics/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index f3e1dd8dd6..9be0b7ba93 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -65,7 +65,7 @@ core_physics_mmm: core_physics_init (cd physics_mmm; $(MAKE) -f Makefile.mpas all) core_microphysics: core_physics_init core_physics_mmm - (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas) + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel run_build_tables ; cp run_build_tables ../../../../../) core_SMOKE: core_physics_init From b3a8e0c630ec95b484e086694e21bc065a5a41b3 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 31 Mar 2026 15:01:34 -0600 Subject: [PATCH 028/198] Update hash of stochastic_physics. --- 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 17222a717c..9a287feeac 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 17222a717c4b6e202370202742d57fdd9e5344ad +Subproject commit 9a287feeac496b587aaf26e2f46a70e5f6e65f2f From 462953d29d5b51370b81cf3b5454c971c4684ec5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 31 Mar 2026 16:54:32 -0600 Subject: [PATCH 029/198] Comment out lines that try to build the run_build_tables executable that generates the data tables for the TEMPO microphysics scheme. This is necessary because the makefile invoked (Makefile.intel) is only for the intel fortran compiler but the CI tests for the repo include build tests with gnu fortran (which are failing with these lines present). --- src/core_atmosphere/physics/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 9be0b7ba93..3e484ddcf8 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -66,7 +66,7 @@ core_physics_mmm: core_physics_init core_microphysics: core_physics_init core_physics_mmm (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) - (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel run_build_tables ; cp run_build_tables ../../../../../) + @#(cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel run_build_tables ; cp run_build_tables ../../../../../) core_SMOKE: core_physics_init (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) @@ -291,7 +291,7 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) - ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel clean; fi ) + @#( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel clean; fi ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) From e3dedb888c388344fa18b73d997173f766dfa1de Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 1 Apr 2026 14:08:17 -0600 Subject: [PATCH 030/198] Add code to choose between Makefile.gfortran and Makefile.intel when building TEMPO's executable for generating microphysics tables. --- src/core_atmosphere/physics/Makefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 3e484ddcf8..4f5e6023fa 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -18,6 +18,23 @@ OBJS_init = \ mpas_atmphys_functions.o \ mpas_atmphys_utilities.o +# Set MAKEFILE_SUFFIX needed to build TEMPO's executable for generating +# microphysics tables. +MAKEFILE_SUFFIX = none + +ifeq "$(FC_SERIAL)" "gfortran" +ifeq "$(FC_PARALLEL)" "mpif90" +MAKEFILE_SUFFIX = gfortran +endif +endif + +ifeq "$(FC_SERIAL)" "ifort" +ifeq "$(FC_PARALLEL)" "mpiifort" +MAKEFILE_SUFFIX = intel +endif +endif +$(info MAKEFILE_SUFFIX = $(MAKEFILE_SUFFIX)) + OBJS = \ mpas_atmphys_camrad_init.o \ mpas_atmphys_control.o \ @@ -66,7 +83,7 @@ core_physics_mmm: core_physics_init core_microphysics: core_physics_init core_physics_mmm (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) - @#(cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel run_build_tables ; cp run_build_tables ../../../../../) + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(MAKEFILE_SUFFIX) run_build_tables ; cp run_build_tables ../../../../../) core_SMOKE: core_physics_init (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) @@ -291,7 +308,7 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) - @#( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.intel clean; fi ) + ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(MAKEFILE_SUFFIX) clean; fi ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) From 91bcfba7c93452971382c017ecdcc1f970983042 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 14:29:50 -0600 Subject: [PATCH 031/198] Bug fixes and improvements to Makefiles. --- src/core_atmosphere/Makefile | 7 ++++++- src/core_atmosphere/physics/Makefile | 25 +++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/core_atmosphere/Makefile b/src/core_atmosphere/Makefile index d917ebfb30..92bb34cfa3 100644 --- a/src/core_atmosphere/Makefile +++ b/src/core_atmosphere/Makefile @@ -78,7 +78,12 @@ mpas_atm_dimensions.o: clean: ( cd physics; $(MAKE) clean ) ( cd dynamics; $(MAKE) clean ) - ( cd stochastic_physics; $(MAKE) clean ) + @# The stochastic_physics directory contains both a makefile (lower case + @# "m") and a Makefile (upper case "M"). The former is used for FV3 and + @# the latter for MPAS. The default for "make" is to use "makefile", but + @# here, we want to use the one for MPAS (with an upper case "M"). Indicate + @# that using the -f flag. + ( cd stochastic_physics; $(MAKE) -f Makefile clean ) ( cd diagnostics; $(MAKE) clean ) ( cd utils; $(MAKE) clean ) ( cd ../..; rm -f *TBL ) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 4f5e6023fa..6b81f38f01 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -18,22 +18,25 @@ OBJS_init = \ mpas_atmphys_functions.o \ mpas_atmphys_utilities.o -# Set MAKEFILE_SUFFIX needed to build TEMPO's executable for generating -# microphysics tables. -MAKEFILE_SUFFIX = none +# Set TEMPO_TBLS_MAKEFILE_SUFFIX needed to build TEMPO's executable for +# generating microphysics tables. Note that when the "clean" target is +# invoked by upstream Makefies, FC_SERIAL and FC_PARALLEL will not be set, +# in which case TEMPO_TBLS_MAKEFILE_SUFFIX will be set to its default +# value of "none". +TEMPO_TBLS_MAKEFILE_SUFFIX = none ifeq "$(FC_SERIAL)" "gfortran" ifeq "$(FC_PARALLEL)" "mpif90" -MAKEFILE_SUFFIX = gfortran +TEMPO_TBLS_MAKEFILE_SUFFIX = gfortran endif endif ifeq "$(FC_SERIAL)" "ifort" ifeq "$(FC_PARALLEL)" "mpiifort" -MAKEFILE_SUFFIX = intel +TEMPO_TBLS_MAKEFILE_SUFFIX = intel endif endif -$(info MAKEFILE_SUFFIX = $(MAKEFILE_SUFFIX)) +$(info TEMPO_TBLS_MAKEFILE_SUFFIX = $(TEMPO_TBLS_MAKEFILE_SUFFIX)) OBJS = \ mpas_atmphys_camrad_init.o \ @@ -83,7 +86,7 @@ core_physics_mmm: core_physics_init core_microphysics: core_physics_init core_physics_mmm (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) - (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(MAKEFILE_SUFFIX) run_build_tables ; cp run_build_tables ../../../../../) + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(TEMPO_TBLS_MAKEFILE_SUFFIX) run_build_tables ; cp run_build_tables ../../../../../) core_SMOKE: core_physics_init (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) @@ -308,7 +311,13 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) - ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(MAKEFILE_SUFFIX) clean; fi ) + @# For cleaning the TEMPO executable for generating microphysics tables, call both + @# the intel and the gfortran Makefiles. This is because when the "clean" target + @# is invoked in upstream Makefiles, a compiler is not specified, so it is not + @# clear which of the two Makefiles to use here. By calling both, we ensure that + @# the directory is properly cleaned regardless of which compiler was used to build + @# the executable. + ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.gfortran clean; $(MAKE) -f Makefile.intel clean; fi ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) From 7782ece84d3edd382fee74bbb4e35f26a0d5389a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 14:30:10 -0600 Subject: [PATCH 032/198] Update hash of stochastic_physics. --- 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 9a287feeac..16d9eca781 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 9a287feeac496b587aaf26e2f46a70e5f6e65f2f +Subproject commit 16d9eca781528eda6d4636436256a59ef6fa0e27 From 0c2d253c0e47e3110abcb11407ef4d4f7556d860 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 14:30:43 -0600 Subject: [PATCH 033/198] Add lines to GitHub Actions workflow file that will link in the Intel Math Kernel Library (MKL). --- .github/workflows/build_mpas_intel.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index f7e1a46c9d..1cbf826ccd 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -129,6 +129,9 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "MKLROOT=/opt/intel/oneapi/mkl/latest" >> $GITHUB_ENV + echo "LDFLAGS=-L/opt/intel/oneapi/mkl/latest/lib/intel64" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/latest/lib/intel64:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' @@ -144,4 +147,4 @@ jobs: mkdir build cd build cmake -DMPAS_DOUBLE_PRECISION=OFF -DMPAS_CORES="init_atmosphere;atmosphere" .. - make -j8 \ No newline at end of file + make -j8 From 2934e479bded7c3faff8e296a912927cc94e2985 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 16:32:40 -0600 Subject: [PATCH 034/198] Find location of MKL library on GitHub runner. --- .github/workflows/build_mpas_intel.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 1cbf826ccd..c5ed0bd639 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -42,6 +42,19 @@ jobs: install-oneapi: false mpi-wrapper-setup: classic + - name: Find MKL library location + run: | + echo "=== MKL root candidates ===" + ls /opt/intel/oneapi/mkl/ || echo "No mkl dir" + echo "=== lib dir contents ===" + ls /opt/intel/oneapi/mkl/latest/lib/ || echo "No lib dir" + echo "=== lib/intel64 dir ===" + ls /opt/intel/oneapi/mkl/latest/lib/intel64/ 2>/dev/null || echo "No intel64 subdir" + echo "=== find libmkl ===" + find /opt/intel/oneapi/mkl -name "libmkl_core*" 2>/dev/null | head -20 + echo "=== MKLROOT env var ===" + echo "${MKLROOT}" + - name: Cache Intel id: cache-INTEL uses: actions/cache@v4 From 97a98ec52aabe1aa967890bc16764f57acbc259c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 16:49:10 -0600 Subject: [PATCH 035/198] Second attempt to find MKL library. --- .github/workflows/build_mpas_intel.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index c5ed0bd639..947f8f2538 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -44,16 +44,15 @@ jobs: - name: Find MKL library location run: | - echo "=== MKL root candidates ===" - ls /opt/intel/oneapi/mkl/ || echo "No mkl dir" - echo "=== lib dir contents ===" - ls /opt/intel/oneapi/mkl/latest/lib/ || echo "No lib dir" - echo "=== lib/intel64 dir ===" - ls /opt/intel/oneapi/mkl/latest/lib/intel64/ 2>/dev/null || echo "No intel64 subdir" - echo "=== find libmkl ===" - find /opt/intel/oneapi/mkl -name "libmkl_core*" 2>/dev/null | head -20 - echo "=== MKLROOT env var ===" - echo "${MKLROOT}" + echo "=== /opt/intel/oneapi contents ===" + ls /opt/intel/oneapi/ 2>/dev/null || echo "No /opt/intel/oneapi dir" + echo "=== broad libmkl search ===" + find /opt/intel /usr -name "libmkl_core*" 2>/dev/null | head -20 || echo "libmkl_core not found" + echo "=== installed intel-oneapi packages ===" + dpkg -l | grep intel-oneapi || echo "No intel-oneapi packages found" + echo "=== MKLROOT / MKL_ROOT env ===" + echo "MKLROOT=${MKLROOT}" + echo "MKL_ROOT=${MKL_ROOT}" - name: Cache Intel id: cache-INTEL From fe3720c03bf042a1577df883bb5abac0f997e397 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 17:07:35 -0600 Subject: [PATCH 036/198] Install MKL library in Github Actions. --- .github/workflows/build_mpas_intel.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 947f8f2538..49755a16dc 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -42,6 +42,16 @@ jobs: install-oneapi: false mpi-wrapper-setup: classic + - name: Install MKL + run: | + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor \ + | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update -q + sudo apt-get install -y intel-oneapi-mkl-devel + - name: Find MKL library location run: | echo "=== /opt/intel/oneapi contents ===" From 0f4d720bcb0e7eeccee685352e94d2902454c311 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 17:22:28 -0600 Subject: [PATCH 037/198] Fix MKL locations in Github Actions runner. --- .github/workflows/build_mpas_intel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 49755a16dc..07762192ed 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -151,9 +151,9 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "MKLROOT=/opt/intel/oneapi/mkl/latest" >> $GITHUB_ENV - echo "LDFLAGS=-L/opt/intel/oneapi/mkl/latest/lib/intel64" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/latest/lib/intel64:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "MKLROOT=/opt/intel/oneapi/mkl/2025.3" >> $GITHUB_ENV + echo "LDFLAGS=-L/opt/intel/oneapi/mkl/2025.3/lib" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' From 1b05207dae59d4337e10a9c31b941fa9ba92ef61 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 2 Apr 2026 17:42:41 -0600 Subject: [PATCH 038/198] Bug fixes to Github Actions workflow file. --- .github/workflows/build_mpas_intel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 07762192ed..7c173fe547 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -152,15 +152,15 @@ jobs: echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "MKLROOT=/opt/intel/oneapi/mkl/2025.3" >> $GITHUB_ENV - echo "LDFLAGS=-L/opt/intel/oneapi/mkl/2025.3/lib" >> $GITHUB_ENV + echo "MKL_LIBDIR=/opt/intel/oneapi/mkl/2025.3/lib" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' run: | cd ${driver_ROOT}/MPAS-Model/MPAS-Model - make intel-mpi CORE=init_atmosphere - make intel-mpi CORE=atmosphere + make intel-mpi CORE=init_atmosphere "LDFLAGS_OPT=-O3 -L${MKL_LIBDIR}" + make intel-mpi CORE=atmosphere "LDFLAGS_OPT=-O3 -L${MKL_LIBDIR}" - name: Build MPAS Standalone (cmake) if: matrix.build-system == 'cmake' From 18f58f393a3d9980da51e947d414995d6574074c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 3 Apr 2026 08:27:45 -0600 Subject: [PATCH 039/198] More debugging of GitHub Actions workflow file. --- .github/workflows/build_mpas_intel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 7c173fe547..e73eba2f86 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -153,14 +153,15 @@ jobs: echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "MKLROOT=/opt/intel/oneapi/mkl/2025.3" >> $GITHUB_ENV echo "MKL_LIBDIR=/opt/intel/oneapi/mkl/2025.3/lib" >> $GITHUB_ENV + echo "LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LIBRARY_PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' run: | cd ${driver_ROOT}/MPAS-Model/MPAS-Model - make intel-mpi CORE=init_atmosphere "LDFLAGS_OPT=-O3 -L${MKL_LIBDIR}" - make intel-mpi CORE=atmosphere "LDFLAGS_OPT=-O3 -L${MKL_LIBDIR}" + make intel-mpi CORE=init_atmosphere + make intel-mpi CORE=atmosphere - name: Build MPAS Standalone (cmake) if: matrix.build-system == 'cmake' From 82c99cdfae63164883cdb931595bda55093caee0 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 3 Apr 2026 08:43:31 -0600 Subject: [PATCH 040/198] More debugging. --- .github/workflows/build_mpas_intel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index e73eba2f86..80a45e8ea9 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -63,6 +63,7 @@ jobs: echo "=== MKLROOT / MKL_ROOT env ===" echo "MKLROOT=${MKLROOT}" echo "MKL_ROOT=${MKL_ROOT}" + echo "Bye" - name: Cache Intel id: cache-INTEL From 9c61e2bac43475a351c1804edb9f99d322ba7eb8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 13 Apr 2026 13:13:03 -0600 Subject: [PATCH 041/198] Revert changes to the GitHub Actions workflow for building with intel to the original (as it was in gsl/develop). --- .github/workflows/build_mpas_intel.yml | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 80a45e8ea9..32200ce96e 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -42,29 +42,6 @@ jobs: install-oneapi: false mpi-wrapper-setup: classic - - name: Install MKL - run: | - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor \ - | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ - | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update -q - sudo apt-get install -y intel-oneapi-mkl-devel - - - name: Find MKL library location - run: | - echo "=== /opt/intel/oneapi contents ===" - ls /opt/intel/oneapi/ 2>/dev/null || echo "No /opt/intel/oneapi dir" - echo "=== broad libmkl search ===" - find /opt/intel /usr -name "libmkl_core*" 2>/dev/null | head -20 || echo "libmkl_core not found" - echo "=== installed intel-oneapi packages ===" - dpkg -l | grep intel-oneapi || echo "No intel-oneapi packages found" - echo "=== MKLROOT / MKL_ROOT env ===" - echo "MKLROOT=${MKLROOT}" - echo "MKL_ROOT=${MKL_ROOT}" - echo "Bye" - - name: Cache Intel id: cache-INTEL uses: actions/cache@v4 @@ -152,10 +129,6 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "MKLROOT=/opt/intel/oneapi/mkl/2025.3" >> $GITHUB_ENV - echo "MKL_LIBDIR=/opt/intel/oneapi/mkl/2025.3/lib" >> $GITHUB_ENV - echo "LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LIBRARY_PATH" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2025.3/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' From 0fa1e18521cb24f40c292dcb6405de30a748679e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 13 Apr 2026 13:15:24 -0600 Subject: [PATCH 042/198] Update hash of stochastic_physics. --- 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 16d9eca781..466b58da99 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 16d9eca781528eda6d4636436256a59ef6fa0e27 +Subproject commit 466b58da990bb10750fad2c9c3fcdfede2970413 From 3df060f8bef974e164f5e41919a58c5799714602 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 13 Apr 2026 13:31:10 -0600 Subject: [PATCH 043/198] Change end-of-file to that of original version. --- .github/workflows/build_mpas_intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 32200ce96e..f7e1a46c9d 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -144,4 +144,4 @@ jobs: mkdir build cd build cmake -DMPAS_DOUBLE_PRECISION=OFF -DMPAS_CORES="init_atmosphere;atmosphere" .. - make -j8 + make -j8 \ No newline at end of file From f7bbe9659d9c5e13e5166b6ad4cfca231bdf444a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 13 Apr 2026 13:55:41 -0600 Subject: [PATCH 044/198] Revert changes to the physics Makefile (that enables the TEMPO table generation executable to be built) and the chemistry registry file (that gets around the SMIOL error) so the PR into MPAS-Model can move along. --- src/core_atmosphere/physics/Makefile | 30 +------------------ .../physics/registry.chemistry.xml | 4 +-- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 6b81f38f01..dfe7ea1e8c 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -18,26 +18,6 @@ OBJS_init = \ mpas_atmphys_functions.o \ mpas_atmphys_utilities.o -# Set TEMPO_TBLS_MAKEFILE_SUFFIX needed to build TEMPO's executable for -# generating microphysics tables. Note that when the "clean" target is -# invoked by upstream Makefies, FC_SERIAL and FC_PARALLEL will not be set, -# in which case TEMPO_TBLS_MAKEFILE_SUFFIX will be set to its default -# value of "none". -TEMPO_TBLS_MAKEFILE_SUFFIX = none - -ifeq "$(FC_SERIAL)" "gfortran" -ifeq "$(FC_PARALLEL)" "mpif90" -TEMPO_TBLS_MAKEFILE_SUFFIX = gfortran -endif -endif - -ifeq "$(FC_SERIAL)" "ifort" -ifeq "$(FC_PARALLEL)" "mpiifort" -TEMPO_TBLS_MAKEFILE_SUFFIX = intel -endif -endif -$(info TEMPO_TBLS_MAKEFILE_SUFFIX = $(TEMPO_TBLS_MAKEFILE_SUFFIX)) - OBJS = \ mpas_atmphys_camrad_init.o \ mpas_atmphys_control.o \ @@ -85,8 +65,7 @@ core_physics_mmm: core_physics_init (cd physics_mmm; $(MAKE) -f Makefile.mpas all) core_microphysics: core_physics_init core_physics_mmm - (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) - (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(TEMPO_TBLS_MAKEFILE_SUFFIX) run_build_tables ; cp run_build_tables ../../../../../) + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas) core_SMOKE: core_physics_init (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) @@ -311,13 +290,6 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) - @# For cleaning the TEMPO executable for generating microphysics tables, call both - @# the intel and the gfortran Makefiles. This is because when the "clean" target - @# is invoked in upstream Makefiles, a compiler is not specified, so it is not - @# clear which of the two Makefiles to use here. By calling both, we ensure that - @# the directory is properly cleaned regardless of which compiler was used to build - @# the executable. - ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.gfortran clean; $(MAKE) -f Makefile.intel clean; fi ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) diff --git a/src/core_atmosphere/physics/registry.chemistry.xml b/src/core_atmosphere/physics/registry.chemistry.xml index 760577afaf..6b5141613f 100644 --- a/src/core_atmosphere/physics/registry.chemistry.xml +++ b/src/core_atmosphere/physics/registry.chemistry.xml @@ -199,9 +199,9 @@ - From 7b16ef3263e88a770c22dbadb1ed338b6923d8e0 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 13 Apr 2026 14:19:18 -0600 Subject: [PATCH 045/198] Update hash of stochastic_physics. --- 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 466b58da99..92ba9fda53 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 466b58da990bb10750fad2c9c3fcdfede2970413 +Subproject commit 92ba9fda53559888cf7afef4bac2a88079c3310e From 0392599b3ef816bab6b32e7e19726ee26882858a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 13:34:30 -0600 Subject: [PATCH 046/198] Update hash of stochastic_physics. --- 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 92ba9fda53..7c1071de8d 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 92ba9fda53559888cf7afef4bac2a88079c3310e +Subproject commit 7c1071de8dbb1ab87b646168a0d4c6ada025c4e6 From 9ab0b286f6767ad2259c756c0d8bad6acdd5a45d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 13:35:10 -0600 Subject: [PATCH 047/198] Change settings to allow MKL library to be installed via the "github.com/NOAA-EMC/ci-install-intel-toolkit" repo's "ufs-community-mpas-ci-v2.0" tag (at https://github.com/NOAA-EMC/ci-install-intel-toolkit/releases/tag/ufs-community-mpas-ci-v2.0) --- .github/workflows/build_mpas_intel.yml | 33 +++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index f7e1a46c9d..254372e916 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -41,6 +41,34 @@ jobs: install-mpi: true install-oneapi: false mpi-wrapper-setup: classic + install-mkl: true +# mkl-version: '2025.3' + +# - name: Install MKL +# run: | +# wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ +# | gpg --dearmor \ +# | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null +# echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ +# | sudo tee /etc/apt/sources.list.d/oneAPI.list +# sudo apt-get update -q +# sudo apt-get install -y intel-oneapi-mkl-devel + +# - name: Find MKL library location +# run: | +# echo "=== /opt/intel/oneapi contents ===" +# ls /opt/intel/oneapi/ 2>/dev/null || echo "The directory /opt/intel/oneapi does not exist." +# echo "=== broad libmkl search ===" +# find /opt/intel /usr -name "libmkl_core*" 2>/dev/null | head -20 || echo "libmkl_core not found." +# echo "=== installed intel-oneapi packages ===" +# dpkg -l | grep intel-oneapi || echo "No intel-oneapi packages found." +# echo "=== MKLROOT / MKL_ROOT env ===" +# echo "MKLROOT=${MKLROOT}" +# echo "MKL_ROOT=${MKL_ROOT}" +# echo "Done finding MKL library location." +# MKLROOT=$(ls -d /opt/intel/oneapi/mkl/[0-9]* 2>/dev/null | tail -1) +# echo "Detected MKLROOT=${MKLROOT}" +# echo "MKLROOT=${MKLROOT}" >> $GITHUB_ENV - name: Cache Intel id: cache-INTEL @@ -129,6 +157,9 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV +# echo "MKL_LIBDIR=${MKLROOT}/lib" >> $GITHUB_ENV +# echo "LIBRARY_PATH=${MKLROOT}/lib:$LIBRARY_PATH" >> $GITHUB_ENV +# echo "LD_LIBRARY_PATH=${MKLROOT}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' @@ -144,4 +175,4 @@ jobs: mkdir build cd build cmake -DMPAS_DOUBLE_PRECISION=OFF -DMPAS_CORES="init_atmosphere;atmosphere" .. - make -j8 \ No newline at end of file + make -j8 From bc505ea3b223e24f2b87eb09dfd714f302805aa2 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 14:30:45 -0600 Subject: [PATCH 048/198] Fixes to make "use netcdf" in stochastic_physics source code to work. --- .github/workflows/build_mpas_intel.yml | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 254372e916..d0c3eefeb3 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -77,10 +77,17 @@ jobs: path: /opt/intel/oneapi/mpi/2021.10.0 key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-key - - name: Install NetCDF library + - name: Install NetCDF-C library run: | sudo apt-get update - sudo apt-get install libnetcdff-dev + sudo apt-get install libnetcdf-dev + + - name: Cache NetCDF-Fortran + id: cache-netcdf-fortran + uses: actions/cache@v4 + with: + path: /home/runner/NetCDF + key: cache-NetCDF-Fortran-${{matrix.fortran-compiler}}-key - name: Cache GNU autotools id: cache-AUTOTOOLS @@ -160,6 +167,23 @@ jobs: # echo "MKL_LIBDIR=${MKLROOT}/lib" >> $GITHUB_ENV # echo "LIBRARY_PATH=${MKLROOT}/lib:$LIBRARY_PATH" >> $GITHUB_ENV # echo "LD_LIBRARY_PATH=${MKLROOT}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "NETCDF=/home/runner/NetCDF" >> $GITHUB_ENV + + - name: Build NetCDF-Fortran + if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' + run: | + NETCDF_F_VERSION=4.6.1 + wget -q https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v${NETCDF_F_VERSION}.tar.gz + tar -xf v${NETCDF_F_VERSION}.tar.gz + cd netcdf-fortran-${NETCDF_F_VERSION} + autoreconf -i + FC=mpiifort CC=mpiicc \ + CPPFLAGS="-I$(nc-config --includedir)" \ + LDFLAGS="-L$(nc-config --libdir)" \ + ./configure --prefix=/home/runner/NetCDF + make -j 8 install + NCLIBDIR=$(nc-config --libdir) + ln -sf ${NCLIBDIR}/libnetcdf.so /home/runner/NetCDF/lib/libnetcdf.so - name: Build MPAS Standalone (make) if: matrix.build-system == 'make' From d0e30815fe8e2b470dd7ebc99db7df5ffc7ceaae Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 14:36:24 -0600 Subject: [PATCH 049/198] Bug fix in GitHub Actions workflow file. --- .github/workflows/build_mpas_intel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index d0c3eefeb3..596d6721db 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -164,9 +164,9 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV -# echo "MKL_LIBDIR=${MKLROOT}/lib" >> $GITHUB_ENV -# echo "LIBRARY_PATH=${MKLROOT}/lib:$LIBRARY_PATH" >> $GITHUB_ENV -# echo "LD_LIBRARY_PATH=${MKLROOT}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + #echo "MKL_LIBDIR=${MKLROOT}/lib" >> $GITHUB_ENV + #echo "LIBRARY_PATH=${MKLROOT}/lib:$LIBRARY_PATH" >> $GITHUB_ENV + #echo "LD_LIBRARY_PATH=${MKLROOT}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "NETCDF=/home/runner/NetCDF" >> $GITHUB_ENV - name: Build NetCDF-Fortran From 854d03ad58c0d09036c4c8d8aaf3615e7fc7a513 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 15:02:34 -0600 Subject: [PATCH 050/198] Bug fix in name of workflow step. --- .github/workflows/build_mpas_intel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 596d6721db..5e24ccae5b 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -137,7 +137,7 @@ jobs: key: cache-PnetCDF-${{matrix.fortran-compiler}}-key - name: Install PnetCDF - if: steps.cache-PnetCDF.outputs.cache-hit != 'true' + if: steps.cache-pnetcdf.outputs.cache-hit != 'true' run: | set -x echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV From de13c514aa09277f601fe396bec82241b8daccd7 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 15:06:44 -0600 Subject: [PATCH 051/198] Remove commented-out lines. --- .github/workflows/build_mpas_intel.yml | 30 -------------------------- 1 file changed, 30 deletions(-) diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 5e24ccae5b..c43974b519 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -42,33 +42,6 @@ jobs: install-oneapi: false mpi-wrapper-setup: classic install-mkl: true -# mkl-version: '2025.3' - -# - name: Install MKL -# run: | -# wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ -# | gpg --dearmor \ -# | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null -# echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ -# | sudo tee /etc/apt/sources.list.d/oneAPI.list -# sudo apt-get update -q -# sudo apt-get install -y intel-oneapi-mkl-devel - -# - name: Find MKL library location -# run: | -# echo "=== /opt/intel/oneapi contents ===" -# ls /opt/intel/oneapi/ 2>/dev/null || echo "The directory /opt/intel/oneapi does not exist." -# echo "=== broad libmkl search ===" -# find /opt/intel /usr -name "libmkl_core*" 2>/dev/null | head -20 || echo "libmkl_core not found." -# echo "=== installed intel-oneapi packages ===" -# dpkg -l | grep intel-oneapi || echo "No intel-oneapi packages found." -# echo "=== MKLROOT / MKL_ROOT env ===" -# echo "MKLROOT=${MKLROOT}" -# echo "MKL_ROOT=${MKL_ROOT}" -# echo "Done finding MKL library location." -# MKLROOT=$(ls -d /opt/intel/oneapi/mkl/[0-9]* 2>/dev/null | tail -1) -# echo "Detected MKLROOT=${MKLROOT}" -# echo "MKLROOT=${MKLROOT}" >> $GITHUB_ENV - name: Cache Intel id: cache-INTEL @@ -164,9 +137,6 @@ jobs: echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - #echo "MKL_LIBDIR=${MKLROOT}/lib" >> $GITHUB_ENV - #echo "LIBRARY_PATH=${MKLROOT}/lib:$LIBRARY_PATH" >> $GITHUB_ENV - #echo "LD_LIBRARY_PATH=${MKLROOT}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "NETCDF=/home/runner/NetCDF" >> $GITHUB_ENV - name: Build NetCDF-Fortran From 4f70fc41f276be863cffc42c8636a27bef3ce1a0 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 15:19:18 -0600 Subject: [PATCH 052/198] Modify Makefiles to generalize linear algebra libraries, which are different for intel and gfortran. --- Makefile | 2 ++ src/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9b12a88df6..354fcef069 100644 --- a/Makefile +++ b/Makefile @@ -481,6 +481,7 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library "DEBUG = $(DEBUG)" \ "USE_PAPI = $(USE_PAPI)" \ "OPENMP = $(OPENMP)" \ + "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) intel-llvm-mpi: # BUILDTARGET Intel LLVM compiler suite with Intel MPI library @@ -565,6 +566,7 @@ gfortran: # BUILDTARGET GNU Fortran, C, and C++ compilers "USE_PAPI = $(USE_PAPI)" \ "OPENMP = $(OPENMP)" \ "OPENACC = $(OPENACC)" \ + "LAPACK_LIBS = -llapack -lblas" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) gfortran-clang: # BUILDTARGET GNU Fortran compiler with LLVM clang/clang++ compilers diff --git a/src/Makefile b/src/Makefile index 305047d837..cd133bd373 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,7 @@ else all: mpas mpas: $(AUTOCLEAN_DEPS) externals frame ops dycore drver - $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f91 -L./external/esmf_time_f90 -lesmf_time -lmkl_intel_lp64 -lmkl_core -lmkl_sequential + $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f91 -L./external/esmf_time_f90 -lesmf_time $(LAPACK_LIBS) externals: $(AUTOCLEAN_DEPS) ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" all ) From 418a721e02e193464dbf226374251f1b2a31beb5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 15:20:19 -0600 Subject: [PATCH 053/198] Modify CI build for gnu (gfortran) so that it also installs the GNU linear algebra packages. --- .github/workflows/build_mpas.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 4fb3150d19..b6bae0ac90 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -37,7 +37,7 @@ jobs: - name: Install NetCDF library run: | sudo apt-get update - sudo apt-get install libnetcdff-dev + sudo apt-get install libnetcdff-dev liblapack-dev libblas-dev - name: Cache openmpi id: cache-openmpi From feabe8ad3cb7a319dd0da2f21040b2fa49fff9dc Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 15:33:24 -0600 Subject: [PATCH 054/198] Add path to NETCDF includes for GNU CI build. --- .github/workflows/build_mpas.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index b6bae0ac90..2bbec53410 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -137,6 +137,7 @@ jobs: echo "PNETCDF=${PNETCDF}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV + echo "NETCDF=/usr" >> $GITHUB_ENV # - name: Setup environment # run: | From 6928c670f1be4d50bc2d5ddc0181efe3a8080b9f Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 20 Apr 2026 16:18:56 -0600 Subject: [PATCH 055/198] Add NetCDF libraries, includes, and mod files to paths. --- .github/workflows/build_mpas.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 2bbec53410..cd149d04ce 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -137,7 +137,17 @@ jobs: echo "PNETCDF=${PNETCDF}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${PNETCDF}/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV - echo "NETCDF=/usr" >> $GITHUB_ENV + + - name: Add (NETCDF) to paths. + run: | + NETCDF_DIR=/home/runner/NetCDF + mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include + ln -sf /usr/lib/x86_64-linux-gnu/libnetcdf.so ${NETCDF_DIR}/lib/ + ln -sf /usr/lib/x86_64-linux-gnu/libnetcdff.so ${NETCDF_DIR}/lib/ + for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true + done + echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV # - name: Setup environment # run: | From cd5d572b9aea2c5e7da1ee457f5c2b7a94daa748 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 21 Apr 2026 13:41:15 -0600 Subject: [PATCH 056/198] Changes suggested by Guoqing to get the build to work with cmake on Hera. --- modulefiles/mpas/hera.intel.lua | 5 +++++ src/core_atmosphere/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/modulefiles/mpas/hera.intel.lua b/modulefiles/mpas/hera.intel.lua index fd2aa48302..e0eaa3f180 100644 --- a/modulefiles/mpas/hera.intel.lua +++ b/modulefiles/mpas/hera.intel.lua @@ -7,15 +7,20 @@ prepend_path("MODULEPATH","/contrib/spack-stack/spack-stack-1.9.3/envs/ue-oneapi load("stack-oneapi/2024.2.1") load("stack-intel-oneapi-mpi/2021.13") +load("mkl/2024.2.1") load("cmake/3.27.9") load("parallel-netcdf/1.12.3") load("parallelio/2.6.2") if mode() == "load" then setenv("PNETCDF", os.getenv("parallel_netcdf_ROOT")) + setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT")) + setenv("NetCDF_FORTRAN_ROOT", os.getenv("netcdf_fortran_ROOT")) end if mode() == "unload" then unsetenv("PNETCDF") + unsetenv("NetCDF_C_ROOT") + unsetenv("NetCDF_FORTRAN_ROOT") end setenv("CMAKE_C_COMPILER", "mpiicc") diff --git a/src/core_atmosphere/CMakeLists.txt b/src/core_atmosphere/CMakeLists.txt index c8de66f3c7..91bae23da3 100644 --- a/src/core_atmosphere/CMakeLists.txt +++ b/src/core_atmosphere/CMakeLists.txt @@ -140,6 +140,39 @@ list(TRANSFORM ATMOSPHERE_CORE_PHYSICS_SMOKE_SOURCES PREPEND physics/physics_noa set(ATMOSPHERE_CORE_PHYSICS_MMM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/physics/physics_mmm) +# build stochastic_physics as a library +set(ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES + kinddef.F90 + mpi_wrapper.F90 + plumes.F90 + mersenne_twister.F90 + random_numbers.F90 + stochy_namelist_def.F90 + compns_stochy.F90 + stochy_internal_state_mod.F90 + spectral_transforms.F90 + stochastic_physics.F90 + stochy_patterngenerator.F90 + stochy_data_mod.F90 + stochy_nml_rec.F90 + get_stochy_pattern.F90 + lndp_apply_perts.F90 + mpas_stochastic_physics.F +) +list(TRANSFORM ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES PREPEND stochastic_physics/) +add_library(stochastic_physics ${ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES}) +mpas_fortran_target(stochastic_physics) +target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML) +if(NOT MPAS_DOUBLE_PRECISION) + target_compile_definitions(stochastic_physics PRIVATE CCPP_32BIT) +endif() +find_package(BLAS REQUIRED) +find_package(NetCDF REQUIRED COMPONENTS Fortran C) +target_link_libraries(stochastic_physics PUBLIC MPI::MPI_Fortran framework ${BLAS_LIBRARIES} NetCDF::NetCDF_Fortran NetCDF::NetCDF_C) +install(TARGETS stochastic_physics EXPORT ${PROJECT_NAME}ExportsCore + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(NOT EXISTS ${ATMOSPHERE_CORE_PHYSICS_MMM_DIR}) set(PHYSICS_MMM_REPO_URL "https://github.com/NCAR/MMM-physics") execute_process(COMMAND git clone ${PHYSICS_MMM_REPO_URL} ${ATMOSPHERE_CORE_PHYSICS_MMM_DIR} @@ -532,6 +565,7 @@ if (${DO_PHYSICS}) list(APPEND CORE_ATMOSPHERE_COMPILE_DEFINITIONS DO_PHYSICS) endif () target_compile_definitions(core_atmosphere PRIVATE ${CORE_ATMOSPHERE_COMPILE_DEFINITIONS}) +target_link_libraries(core_atmosphere PUBLIC stochastic_physics) set_MPAS_DEBUG_flag(core_atmosphere) mpas_core_target(CORE atmosphere TARGET core_atmosphere INCLUDES ${ATMOSPHERE_CORE_INCLUDES}) From 698c79ef847d5503f018aead1294550633854855 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 21 Apr 2026 13:42:28 -0600 Subject: [PATCH 057/198] Bug fixes to get cmake to work, as suggested by claude. --- CMakeLists.txt | 7 +++++++ cmake/Functions/MPAS_Functions.cmake | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7e010394d..864675f5eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,13 @@ foreach(_core IN LISTS MPAS_CORES) add_subdirectory(src/core_${_core}) # Target: MPAS::core:: endforeach() +# When both atmosphere and init_atmosphere cores are built, ifort transitively +# resolves atm_core_interface.mod while compiling mpas.F for mpas_init_atmosphere. +# Ensure core_atmosphere (which produces atm_core_interface.mod) is built first. +if("atmosphere" IN_LIST MPAS_CORES AND "init_atmosphere" IN_LIST MPAS_CORES) + add_dependencies(mpas_init_atmosphere core_atmosphere) +endif() + ### Package config include(CMakePackageConfigHelpers) diff --git a/cmake/Functions/MPAS_Functions.cmake b/cmake/Functions/MPAS_Functions.cmake index fe76556225..e0e63c7e90 100644 --- a/cmake/Functions/MPAS_Functions.cmake +++ b/cmake/Functions/MPAS_Functions.cmake @@ -214,24 +214,24 @@ function(mpas_core_target) set(CPP_EXTRA_FLAGS ${CPP_EXTRA_FLAGS} -DDO_PHYSICS) endif() -add_custom_command(OUTPUT Registry_processed.xml - COMMAND ${CPP_EXECUTABLE} -E -P ${CPP_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml > Registry_processed.xml +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml + COMMAND ${CPP_EXECUTABLE} -E -P ${CPP_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml > ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml COMMENT "CORE ${ARG_CORE}: Pre-Process Registry" - DEPENDS Registry.xml) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml) add_custom_command(OUTPUT ${ARG_INCLUDES} - COMMAND mpas_parse_${ARG_CORE} Registry_processed.xml ${CPP_EXTRA_FLAGS} + COMMAND mpas_parse_${ARG_CORE} ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml ${CPP_EXTRA_FLAGS} COMMENT "CORE ${ARG_CORE}: Parse Registry" - DEPENDS mpas_parse_${ARG_CORE} Registry_processed.xml) + DEPENDS mpas_parse_${ARG_CORE} ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml) add_custom_command(OUTPUT namelist.${ARG_CORE} WORKING_DIRECTORY ${CORE_DATADIR} COMMAND mpas_namelist_gen ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml namelist.${ARG_CORE} in_defaults=true COMMENT "CORE ${ARG_CORE}: Generate Namelist" - DEPENDS mpas_namelist_gen Registry_processed.xml) + DEPENDS mpas_namelist_gen ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml) add_custom_command(OUTPUT streams.${ARG_CORE} WORKING_DIRECTORY ${CORE_DATADIR} COMMAND mpas_streams_gen ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml streams.${ARG_CORE} stream_list.${ARG_CORE}. listed COMMENT "CORE ${ARG_CORE}: Generate Streams" - DEPENDS mpas_streams_gen Registry_processed.xml) + DEPENDS mpas_streams_gen ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml) add_custom_target(gen_${ARG_CORE} DEPENDS ${ARG_INCLUDES} namelist.${ARG_CORE} streams.${ARG_CORE}) add_dependencies(${ARG_TARGET} gen_${ARG_CORE}) From cac3749c451db4d7a757e747d67e045d79936de6 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 21 Apr 2026 17:31:36 -0600 Subject: [PATCH 058/198] Change name of stochastic_physics source file from stochastic_physics.F90 to stochastic_physics_m.F90 because the latter is the one to use specifically with MPAS (the former is for FV3). --- src/core_atmosphere/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/CMakeLists.txt b/src/core_atmosphere/CMakeLists.txt index 91bae23da3..e7151c5f41 100644 --- a/src/core_atmosphere/CMakeLists.txt +++ b/src/core_atmosphere/CMakeLists.txt @@ -151,7 +151,7 @@ set(ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES compns_stochy.F90 stochy_internal_state_mod.F90 spectral_transforms.F90 - stochastic_physics.F90 + stochastic_physics_m.F90 stochy_patterngenerator.F90 stochy_data_mod.F90 stochy_nml_rec.F90 @@ -162,7 +162,7 @@ set(ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES list(TRANSFORM ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES PREPEND stochastic_physics/) add_library(stochastic_physics ${ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES}) mpas_fortran_target(stochastic_physics) -target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML) +target_compile_definitions(stochastic_physics PRIVATE INTERNAL_FILE_NML MPAS) if(NOT MPAS_DOUBLE_PRECISION) target_compile_definitions(stochastic_physics PRIVATE CCPP_32BIT) endif() From 6dd333bd21020d28e7a0afc8f112016f3fba4003 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 21 Apr 2026 17:33:44 -0600 Subject: [PATCH 059/198] Update hash of stochastic_physics. --- 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 7c1071de8d..1244a13ef3 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 7c1071de8dbb1ab87b646168a0d4c6ada025c4e6 +Subproject commit 1244a13ef31aa65bb625bb50d6d25d6b66b59ddf From a25dfe661418656de2d3db3fd6f6f74b035cca42 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 10:52:27 -0600 Subject: [PATCH 060/198] Update hash of stochastic_physics. --- 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 1244a13ef3..0737888cdd 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 1244a13ef31aa65bb625bb50d6d25d6b66b59ddf +Subproject commit 0737888cddba9cf6901a8c2783b16121bb9eabd9 From 58a711c290691ae9827c1f164ccda9a352681b88 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 12:34:26 -0600 Subject: [PATCH 061/198] Add a step to the run_mpas_hrrr workflow to set up paths to NetCDF libraries. --- .github/workflows/run_mpas_hrrr.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 655c70b6ec..8b0d1ae28f 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -79,6 +79,18 @@ jobs: echo "CXX=mpicxx" >> $GITHUB_ENV echo "FC=mpif90" >> $GITHUB_ENV + - name: Setup NetCDF + run: | + NETCDF_DIR=/tmp/netcdf + mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include + for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true + done + for f in /usr/lib/x86_64-linux-gnu/libnetcdf*.so; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/lib/ || true + done + echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV + - name: Setup PnetCDF run: | echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV From e0b453d0971412c09d4a853c0de1310b7693ac32 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 12:50:43 -0600 Subject: [PATCH 062/198] Make the sections for linking with NetCDF in the two tests similar. --- .github/workflows/build_mpas.yml | 7 ++++--- .github/workflows/run_mpas_hrrr.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index cd149d04ce..496d97af7e 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -138,15 +138,16 @@ jobs: echo "LD_LIBRARY_PATH=${PNETCDF}/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV - - name: Add (NETCDF) to paths. + - name: Setup NetCDF run: | NETCDF_DIR=/home/runner/NetCDF mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include - ln -sf /usr/lib/x86_64-linux-gnu/libnetcdf.so ${NETCDF_DIR}/lib/ - ln -sf /usr/lib/x86_64-linux-gnu/libnetcdff.so ${NETCDF_DIR}/lib/ for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true done + for f in /usr/lib/x86_64-linux-gnu/libnetcdf*.so; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/lib/ || true + done echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV # - name: Setup environment diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 8b0d1ae28f..11a029454e 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -81,7 +81,7 @@ jobs: - name: Setup NetCDF run: | - NETCDF_DIR=/tmp/netcdf + NETCDF_DIR=/home/runner/NetCDF mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true From 2a6bc974e007136d89aee0797b3069fdc87e07c2 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 12:52:21 -0600 Subject: [PATCH 063/198] Add step to install linear algebra libraries into run_mpas_hrrr.yml. --- .github/workflows/run_mpas_hrrr.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 11a029454e..cdf2987f4f 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -79,6 +79,11 @@ jobs: echo "CXX=mpicxx" >> $GITHUB_ENV echo "FC=mpif90" >> $GITHUB_ENV + - name: Install LAPACK/BLAS + run: | + sudo apt-get update -y + sudo apt-get install -y liblapack-dev libblas-dev + - name: Setup NetCDF run: | NETCDF_DIR=/home/runner/NetCDF From d6e1f8fc925bdf9318c67cdd27b7359eb0bfecf5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 13:03:56 -0600 Subject: [PATCH 064/198] Bug fix to remove sudo, which is not needed. --- .github/workflows/run_mpas_hrrr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index cdf2987f4f..0c84d6a9b6 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -81,8 +81,8 @@ jobs: - name: Install LAPACK/BLAS run: | - sudo apt-get update -y - sudo apt-get install -y liblapack-dev libblas-dev + apt-get update -y + apt-get install -y liblapack-dev libblas-dev - name: Setup NetCDF run: | From f5da9c8c3cb18a5a65f879a6ebd6fadd36e008b2 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 13:22:35 -0600 Subject: [PATCH 065/198] Add to the NetCDF installation that of the NetCDF-Fortran library. --- .github/workflows/run_mpas_hrrr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_hrrr.yml b/.github/workflows/run_mpas_hrrr.yml index 0c84d6a9b6..3cc679ad75 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -82,7 +82,7 @@ jobs: - name: Install LAPACK/BLAS run: | apt-get update -y - apt-get install -y liblapack-dev libblas-dev + apt-get install -y liblapack-dev libblas-dev libnetcdff-dev - name: Setup NetCDF run: | From 54b4d6509359aefdfbed140a88c6a4289a36aef8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 22 Apr 2026 13:46:03 -0600 Subject: [PATCH 066/198] Add the LAPACK/BLAS and NetCDF installations as was done for run_mpas_hrrr.yml. --- .github/workflows/run_mpas.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index f4e911f4d8..a069feb107 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -98,6 +98,23 @@ jobs: echo "FC=mpiifx" >> $GITHUB_ENV echo "MPICC=/opt/intel/oneapi/mpi/latest/bin/mpiicx" >> $GITHUB_ENV + - name: Install LAPACK/BLAS + run: | + apt-get update -y + apt-get install -y liblapack-dev libblas-dev libnetcdff-dev + + - name: Setup NetCDF + run: | + NETCDF_DIR=/home/runner/NetCDF + mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include + for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true + done + for f in /usr/lib/x86_64-linux-gnu/libnetcdf*.so; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/lib/ || true + done + echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV + - name: Setup PnetCDF run: | echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV From 5531c08b54cc0d28610fc210907f135a6537c92d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 23 Apr 2026 18:34:04 -0600 Subject: [PATCH 067/198] Fix indentation. --- cmake/Functions/MPAS_Functions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Functions/MPAS_Functions.cmake b/cmake/Functions/MPAS_Functions.cmake index e0e63c7e90..0a802c67eb 100644 --- a/cmake/Functions/MPAS_Functions.cmake +++ b/cmake/Functions/MPAS_Functions.cmake @@ -214,7 +214,7 @@ function(mpas_core_target) set(CPP_EXTRA_FLAGS ${CPP_EXTRA_FLAGS} -DDO_PHYSICS) endif() -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml COMMAND ${CPP_EXECUTABLE} -E -P ${CPP_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml > ${CMAKE_CURRENT_BINARY_DIR}/Registry_processed.xml COMMENT "CORE ${ARG_CORE}: Pre-Process Registry" DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Registry.xml) From 82684203713b6553d16d1cd3e33a25bdd2b5f538 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 23 Apr 2026 19:07:47 -0600 Subject: [PATCH 068/198] Update hash of stochastic_physics. --- 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 0737888cdd..2f6eace83f 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0737888cddba9cf6901a8c2783b16121bb9eabd9 +Subproject commit 2f6eace83f662db2ee16cad8f831c012e7be92f5 From 344f18d17f800c2c14372ac91cce9c2d44722316 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 24 Apr 2026 12:22:47 -0600 Subject: [PATCH 069/198] Modifications to module files on derecho, gaeac6, orion, and ursa to load intel's Math Kernel Library (MKL), as suggested by Guoquing Guo. These module files have not been tested on their respective machines. --- modulefiles/mpas/derecho.intel.lua | 5 +++++ modulefiles/mpas/gaeac6.intel.lua | 5 +++++ modulefiles/mpas/orion.intel.lua | 5 +++++ modulefiles/mpas/ursa.intel.lua | 7 +++++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/modulefiles/mpas/derecho.intel.lua b/modulefiles/mpas/derecho.intel.lua index 228346b66f..d4c6d1b3e3 100644 --- a/modulefiles/mpas/derecho.intel.lua +++ b/modulefiles/mpas/derecho.intel.lua @@ -7,15 +7,20 @@ prepend_path("MODULEPATH", '/glade/work/epicufsrt/contrib/spack-stack/derecho/sp load("stack-oneapi/2024.2.1") load("stack-cray-mpich/8.1.29") +load("intel-oneapi-mkl/2024.2.2") load("cmake/3.27.9") load("parallel-netcdf/1.12.3") load("parallelio/2.6.2") if mode() == "load" then setenv("PNETCDF", os.getenv("parallel_netcdf_ROOT")) + setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT")) + setenv("NetCDF_FORTRAN_ROOT", os.getenv("netcdf_fortran_ROOT")) end if mode() == "unload" then unsetenv("PNETCDF") + unsetenv("NetCDF_C_ROOT") + unsetenv("NetCDF_FORTRAN_ROOT") end setenv("CMAKE_C_COMPILER", "mpicc") diff --git a/modulefiles/mpas/gaeac6.intel.lua b/modulefiles/mpas/gaeac6.intel.lua index dc187dc252..4a92ab937e 100644 --- a/modulefiles/mpas/gaeac6.intel.lua +++ b/modulefiles/mpas/gaeac6.intel.lua @@ -7,15 +7,20 @@ prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/c6/spack-stack-1.9.3/env load("stack-oneapi/2024.2.1") load("stack-cray-mpich/8.1.32") +load("intel-oneapi-mkl/2023.2.0") load("cmake/3.27.9") load("parallel-netcdf/1.12.3") load("parallelio/2.6.2") if mode() == "load" then setenv("PNETCDF", os.getenv("parallel_netcdf_ROOT")) + setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT")) + setenv("NetCDF_FORTRAN_ROOT", os.getenv("netcdf_fortran_ROOT")) end if mode() == "unload" then unsetenv("PNETCDF") + unsetenv("NetCDF_C_ROOT") + unsetenv("NetCDF_FORTRAN_ROOT") end setenv("CMAKE_C_COMPILER", "mpicc") diff --git a/modulefiles/mpas/orion.intel.lua b/modulefiles/mpas/orion.intel.lua index 89c14e7a1e..74ef0f75f5 100644 --- a/modulefiles/mpas/orion.intel.lua +++ b/modulefiles/mpas/orion.intel.lua @@ -7,15 +7,20 @@ prepend_path("MODULEPATH", "/apps/contrib/spack-stack/spack-stack-1.9.3/envs/ue- load("stack-oneapi/2024.2.1") load("stack-intel-oneapi-mpi/2021.13") +load("intel-oneapi-mkl/2024.2.1") load("cmake/3.27.9") load("parallel-netcdf/1.12.3") load("parallelio/2.6.2") if mode() == "load" then setenv("PNETCDF", os.getenv("parallel_netcdf_ROOT")) + setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT")) + setenv("NetCDF_FORTRAN_ROOT", os.getenv("netcdf_fortran_ROOT")) end if mode() == "unload" then unsetenv("PNETCDF") + unsetenv("NetCDF_C_ROOT") + unsetenv("NetCDF_FORTRAN_ROOT") end setenv("CMAKE_C_COMPILER", "mpiicc") diff --git a/modulefiles/mpas/ursa.intel.lua b/modulefiles/mpas/ursa.intel.lua index 2b2dc15cf1..f701e51442 100644 --- a/modulefiles/mpas/ursa.intel.lua +++ b/modulefiles/mpas/ursa.intel.lua @@ -7,7 +7,7 @@ prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.9.3/envs/ue-oneap load("stack-oneapi/2024.2.1") load("stack-intel-oneapi-mpi/2021.13") - +load("intel-oneapi-mkl/2024.2.1") load("cmake/3.27.9") load("parallel-netcdf/1.12.3") load("parallelio/2.6.2") @@ -17,9 +17,12 @@ setenv("CMAKE_CXX_COMPILER", "mpiicpc") setenv("CMAKE_Fortran_COMPILER", "mpiifort") if mode() == "load" then - --setenv("PNETCDF", os.getenv("PARALLEL_NETCDF_ROOT")) setenv("PNETCDF", os.getenv("parallel_netcdf_ROOT")) + setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT")) + setenv("NetCDF_FORTRAN_ROOT", os.getenv("netcdf_fortran_ROOT")) end if mode() == "unload" then unsetenv("PNETCDF") + unsetenv("NetCDF_C_ROOT") + unsetenv("NetCDF_FORTRAN_ROOT") end From b6687fd6c26ff24cdce2c0019a60fd06f3de25cf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 13:39:10 -0600 Subject: [PATCH 070/198] Temporarily turn off original set of CI tests while debugging the one with stochastic_physics enabled. --- .github/workflows/build_mpas.yml | 3 ++- .github/workflows/build_mpas_intel.yml | 3 ++- .github/workflows/run_mpas.yml | 3 ++- .github/workflows/run_mpas_hrrr.yml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 496d97af7e..f8aa32125c 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,6 +1,7 @@ name: Build (GNU) MPAS Standalone -on: [pull_request,workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: workflow_dispatch jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index c43974b519..7911d33313 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,6 +1,7 @@ name: Build (Intel) MPAS Standalone -on: [pull_request,workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: workflow_dispatch jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index a069feb107..fbf48ef208 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,6 +1,7 @@ name: Run MPAS Standalone (NOAA GSL tests) -on: [push, pull_request, workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: 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..9ae23038ce 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,6 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -on: [push, pull_request, workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: workflow_dispatch ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From 105d3295a37ebe607560fae8e36b429950a8a3fa Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 13:55:11 -0600 Subject: [PATCH 071/198] Add workflow file and namelist and stream files for stochastic physics CI test. --- .github/workflows/run_mpas_stoch.yml | 265 ++++++++++++++++++ .../namelist.atmosphere | 62 ++++ .../stream_list.atmosphere.diagnostics | 141 ++++++++++ .../stream_list.atmosphere.output | 127 +++++++++ .../stream_list.atmosphere.surface | 2 + .../streams.atmosphere | 59 ++++ 6 files changed, 656 insertions(+) create mode 100644 .github/workflows/run_mpas_stoch.yml create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml new file mode 100644 index 0000000000..95dc111ad7 --- /dev/null +++ b/.github/workflows/run_mpas_stoch.yml @@ -0,0 +1,265 @@ +name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) + +#on: [push, pull_request, workflow_dispatch] +on: workflow_dispatch + +############################################################################################# +# Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. +# +# Description +# +# - Clone and build MPAS for baseline generation. +# - Clone and build MPAS for feature branch testing (against baselines). +# - Download any data (MP tables, MPAS ICs/LBCs/etc...). +# - Create/populate MPAS run directories. +# - Run MPAS using baseline codebase/configuration. +# - Run MPAS using feature branch. +# - Compare results. +# - Save output files to GitHub artifact (for comparision w/ inline/standaloen results) +# +# Comments: +# - The test build/run configurations matrix is described below. +# - This script uses a matrix run configuration with exclusions to achieve the desired "run list" +# +# Tests: +# Baseline Codebase Repository:Branch Physics IC source season build-type +# 1/4) ufs-community:gsl/develop hrrrv5 gfs winter Release/Debug +# 2/5) ufs-community:gsl/develop hrrrv5 rap summer Release/Debug +# 3/6) ufs-community:gsl/develop hrrrv5 rap winter Release/Debug +# +############################################################################################# +jobs: + run_mpas_hrrr: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false # Disable fail-fast + matrix: + f-compiler: [gfortran]#,ifx] +# ic_source: [gfs, rap] + ic_source: [gfs] +# season: [summer, winter] + season: [winter] + build-type: [Release] + exclude: + - ic_source: gfs + season: summer + include: + # Set container images for each compiler + - f-compiler: gfortran + bld_target: gfortran + image: dustinswales/ufs-community-mpas-ci:gnu +# - f-compiler: ifx +# bld_target: intel +# image: dustinswales/ufs-community-mpas-ci:oneapi + container: + image: ${{ matrix.image }} + # + defaults: + run: + shell: bash -el {0} + + # Environmental variables + env: + physics: hrrrv5 + py-version: 3.11 + runner_ROOT: /__w/ + MPAS_ROOT: /__w/MPAS-Model/MPAS-Model + mpas_bl_ROOT: /__w/MPAS-Model-BL + PNETCDF: /opt/pnetcdf + mpas_ics: testing_and_setup/ufs-community/data/ics/ufscommunity + physics_tables: testing_and_setup/ufs-community/data/tables + + # Workflow steps + steps: + + ########################################################################################## + # Step 1: Setup + ########################################################################################## + - name: Setup MPI (GNU) + if: matrix.f-compiler == 'gfortran' + run: | + echo "CC=mpicc" >> $GITHUB_ENV + echo "CXX=mpicxx" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + + - name: Install LAPACK/BLAS + run: | + apt-get update -y + apt-get install -y liblapack-dev libblas-dev libnetcdff-dev + + - name: Setup NetCDF + run: | + NETCDF_DIR=/home/runner/NetCDF + mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include + for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true + done + for f in /usr/lib/x86_64-linux-gnu/libnetcdf*.so; do + [ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/lib/ || true + done + echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV + + - name: Setup PnetCDF + run: | + echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV + + ########################################################################################## + # Step 2a: Clone MPAS and build. (baselines) + ########################################################################################## + - name: Checkout and build MPAS standalone for baseline generation (Debug) + if: contains(matrix.build-type, 'Debug') + run: | + cd ${runner_ROOT} + git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + cd ${mpas_bl_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true + + - name: Checkout and build MPAS standalone for baseline generation (Release) + if: contains(matrix.build-type, 'Release') + run: | + cd ${runner_ROOT} + git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + cd ${mpas_bl_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere + + ########################################################################################## + # Step 2b: Clone MPAS and build (feature branch) + ########################################################################################## + - name: Checkout MPAS codebase for testing. + uses: actions/checkout@v3 + + - name: Initialize any submodules from testing codebase. + run: | + git config --global --add safe.directory ${MPAS_ROOT} + cd ${MPAS_ROOT} + git submodule update --init --recursive + + - name: Build MPAS standalone for testing (Debug) + if: contains(matrix.build-type, 'Debug') + run: | + cd ${MPAS_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true + + - name: Build MPAS standalone for testing (Release) + if: contains(matrix.build-type, 'Release') + run: | + cd ${MPAS_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere + + ########################################################################################## + # Step 3: Fetch any data/files needed for MPAS runs. + ########################################################################################## + - name: Download MPAS data (grid info, IC and LBC files) + run: | + cd ${MPAS_ROOT} + ./testing_and_setup/ufs-community/data/get_data.sh + + ########################################################################################## + # Step 4a: Configure MPAS baseline runs + ########################################################################################## + - name: Create and populate run directory (baselines) + run: | + cd ${runner_ROOT} && mkdir run_bl && cd run_bl + cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . + ln -sf ${mpas_bl_ROOT}/atmosphere_model . + + - name: Link surface files to run directory (baselines) + if: ${{matrix.ic_source}} == 'gfs' + run: | + cd ${runner_ROOT}/run_bl + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + + ########################################################################################## + # Step 4b: Configure MPAS feature runs + ########################################################################################## + - name: Create and populate run directory (feature test) + run: | + cd ${runner_ROOT} && mkdir run_rt && cd run_rt + cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . + ln -sf ${MPAS_ROOT}/atmosphere_model . + + - name: Link surface files to run directory (feature) + if: ${{matrix.ic_source}} == 'gfs' + run: | + cd ${runner_ROOT}/run_rt + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + + ########################################################################################## + # Step 5: Run MPAS + ########################################################################################## + - name: Run MPAS (baselines) + run: | + cd ${runner_ROOT}/run_bl + pwd && ls -l + mpiexec --allow-run-as-root -np 1 ./atmosphere_model + pwd && ls -l + + - name: Run MPAS (feature branch) + run: | + cd ${runner_ROOT}/run_rt + pwd && ls -l + mpiexec --allow-run-as-root -np 1 ./atmosphere_model + pwd && ls -l + + ########################################################################################## + # Step 6: Compare feature branch to baseline branch. + ########################################################################################## + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v3.2.0 + with: + python-version: ${{env.py-version}} + auto-update-conda: true + auto-activate-base: false + environment-file: testing_and_setup/ufs-community/environment.yml + activate-environment: mpas-ci-env + + - name: Run comparison script + run: | + cd ${MPAS_ROOT}/testing_and_setup/ufs-community + ./cmp_rt2bl.py --dir_rt ${runner_ROOT}/run_rt --dir_bl ${runner_ROOT}/run_bl + + ########################################################################################## + # Step 7: Save MPAS output and log files as GitHub Artifact. + ########################################################################################## + - name: Create GitHub artifact + run: | + cd ${runner_ROOT} + mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + mkdir data_bl && cd data_bl + cp ${runner_ROOT}/run_bl/log.atmosphere.*.out log.atmosphere.BL.out + cp ${runner_ROOT}/run_bl/history.*.nc . + cp ${runner_ROOT}/run_bl/diag.*.nc . + cd .. + mkdir data_rt && cd data_rt + cp ${runner_ROOT}/run_rt/log.atmosphere.*.out log.atmosphere.RT.out + cp ${runner_ROOT}/run_rt/history.*.nc . + cp ${runner_ROOT}/run_rt/diag.*.nc . + + - name: Upload log files as GitHub Artifact + uses: actions/upload-artifact@v4 + with: + name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + path: /__w/artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere new file mode 100644 index 0000000000..2e54c86387 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -0,0 +1,62 @@ +&nhyd_model + config_time_integration_order = 2 + config_dt = 720.0 + config_start_time = '2023-03-10_15:00:00' + config_run_duration = '0_01:00:00' + config_split_dynamics_transport = true + config_number_of_sub_steps = 4 + config_dynamics_split_steps = 3 + config_horiz_mixing = '2d_smagorinsky' + config_visc4_2dsmag = 0.05 + config_scalar_advection = true + config_monotonic = true + config_coef_3rd_order = 0.25 + config_epssm = 0.1 + config_smdiv = 0.1 +/ +&damping + config_mpas_cam_coef = 2.0 + config_rayleigh_damp_u = true + config_zd = 16000.0 + config_xnutr = 0.2 + config_number_cam_damping_levels = 8 +/ +&limited_area + config_apply_lbcs = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ +&restart + config_do_restart = false +/ +&printout + config_print_global_minmax_vel = true + config_print_detailed_minmax_vel = false +/ +&IAU + config_IAU_option = 'off' + config_IAU_window_length_s = 21600. +/ +&physics + config_sst_update = false + config_sstdiurn_update = false + config_frac_seaice = true + config_deepsoiltemp_update = false + config_radtlw_interval = '00:15:00' + config_radtsw_interval = '00:15:00' + config_bucket_update = 'none' + config_physics_suite = 'hrrrv5' + num_soil_layers = 9 +/ +&physics_mp_tempo + config_tempo_aerosolaware = .true. + config_tempo_hailaware = .true. +/ +&soundings + config_sounding_interval = 'none' +/ diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics new file mode 100644 index 0000000000..048ec8b9d6 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics @@ -0,0 +1,141 @@ +initial_time +xtime +Time +snowncv +rainncv +graupelncv +prec_acc_c +prec_acc_nc +snow_acc_nc +mslp +relhum_50hPa +relhum_100hPa +relhum_200hPa +relhum_250hPa +relhum_500hPa +relhum_700hPa +relhum_850hPa +relhum_925hPa +dewpoint_50hPa +dewpoint_100hPa +dewpoint_200hPa +dewpoint_250hPa +dewpoint_500hPa +dewpoint_700hPa +dewpoint_850hPa +dewpoint_925hPa +temperature_50hPa +temperature_100hPa +temperature_200hPa +temperature_250hPa +temperature_500hPa +temperature_700hPa +temperature_850hPa +temperature_925hPa +height_50hPa +height_100hPa +height_200hPa +height_250hPa +height_500hPa +height_700hPa +height_850hPa +height_925hPa +uzonal_50hPa +uzonal_100hPa +uzonal_200hPa +uzonal_250hPa +uzonal_500hPa +uzonal_700hPa +uzonal_850hPa +uzonal_925hPa +umeridional_50hPa +umeridional_100hPa +umeridional_200hPa +umeridional_250hPa +umeridional_500hPa +umeridional_700hPa +umeridional_850hPa +umeridional_925hPa +w_50hPa +w_100hPa +w_200hPa +w_250hPa +w_500hPa +w_700hPa +w_850hPa +w_925hPa +vorticity_50hPa +vorticity_100hPa +vorticity_200hPa +vorticity_250hPa +vorticity_500hPa +vorticity_700hPa +vorticity_850hPa +vorticity_925hPa +t_isobaric +t_iso_levels +z_isobaric +z_iso_levels +meanT_500_300 +olrtoa +rainc +rainnc +refl10cm +refl10cm_max +refl10cm_1km +refl10cm_1km_max +precipw +u10 +v10 +q2 +t2m +th2m +cape +cin +lcl +lfc +srh_0_1km +srh_0_3km +uzonal_surface +uzonal_1km +uzonal_6km +umeridional_surface +umeridional_1km +umeridional_6km +temperature_surface +dewpoint_surface +updraft_helicity_max +w_velocity_max +w_velocity_min +w_velocity_mean +wind_speed_level1_max +t_oml +t_oml_initial +t_oml_200m_initial +h_oml +h_oml_initial +hu_oml +hv_oml +updraft_helicity_max_01 +updraft_helicity_max_16 +updraft_helicity_max0_15 +updraft_helicity_max05_15 +updraft_helicity_max_02 +updraft_helicity_max_03 +updraft_helicity_min_01 +updraft_helicity_min_16 +updraft_helicity_min0_15 +updraft_helicity_min05_15 +updraft_helicity_min_02 +updraft_helicity_min_03 +wind02_max +wind02_integral_max +wind_speed_10m_max +wind_speed_10m_mean +u10m_mean +v10m_mean +swdnb +swupt +swddir +swddni +swddif diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output new file mode 100644 index 0000000000..9c151a488d --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output @@ -0,0 +1,127 @@ +scalars +latCell +lonCell +xCell +yCell +zCell +indexToCellID +latEdge +lonEdge +xEdge +yEdge +zEdge +indexToEdgeID +latVertex +lonVertex +xVertex +yVertex +zVertex +indexToVertexID +cellsOnEdge +nEdgesOnCell +nEdgesOnEdge +edgesOnCell +edgesOnEdge +weightsOnEdge +dvEdge +dcEdge +angleEdge +areaCell +areaTriangle +cellsOnCell +verticesOnCell +verticesOnEdge +edgesOnVertex +cellsOnVertex +kiteAreasOnVertex +meshDensity +zgrid +fzm +fzp +zz +initial_time +xtime +Time +u +w +pressure +surface_pressure +rho +theta +relhum +divergence +vorticity +ke +uReconstructZonal +uReconstructMeridional +ertel_pv +u_pv +v_pv +theta_pv +vort_pv +iLev_DT +depv_dt_lw +depv_dt_sw +depv_dt_bl +depv_dt_cu +depv_dt_mix +dtheta_dt_mp +depv_dt_mp +depv_dt_diab +depv_dt_fric +depv_dt_diab_pv +depv_dt_fric_pv +i_rainnc +rainnc +precipw +cuprec +i_rainc +rainc +kpbl +hpbl +hfx +qfx +cd +cda +ck +cka +lh +u10 +v10 +q2 +t2m +th2m +gsw +glw +acsnow +pin +ozmixm +mminlu +isice_lu +iswater_lu +xland +skintemp +snow +snowh +sst +vegfra +shdmin +shdmax +canwat +xice +sh2o +smois +tslb +soilt1 +rhosnf +snowfallac +acrunoff +grdflx +ivgtyp +isltyp +lai +sfc_albedo +cldfrac_bl +snowc +snownc +graupelnc diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface new file mode 100644 index 0000000000..db54cab459 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface @@ -0,0 +1,2 @@ +sst +xice diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere new file mode 100644 index 0000000000..b076c1bc12 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + From d5970aaf7de803a112a86ee44d9f922f6f7792c7 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 13:58:42 -0600 Subject: [PATCH 072/198] Turn on automatic running of stochastic physics CI test. --- .github/workflows/run_mpas_stoch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 95dc111ad7..fe815e5f56 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -#on: [push, pull_request, workflow_dispatch] -on: workflow_dispatch +on: [push, pull_request, workflow_dispatch] +#on: workflow_dispatch ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From e49a7f0f75ee9a16673a1f64e55b1d32bfcabf81 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 14:22:08 -0600 Subject: [PATCH 073/198] Fix up title and bugs in stochastic physics CI test workflow. --- .github/workflows/run_mpas_stoch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index fe815e5f56..30e4f3fe20 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -1,4 +1,4 @@ -name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) +name: Run MPAS Standalone with Stochastic Physics (NOAA GSL HRRRv5 tests) on: [push, pull_request, workflow_dispatch] #on: workflow_dispatch @@ -175,7 +175,7 @@ jobs: ln -sf ${mpas_bl_ROOT}/atmosphere_model . - name: Link surface files to run directory (baselines) - if: ${{matrix.ic_source}} == 'gfs' + if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_bl ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . @@ -201,7 +201,7 @@ jobs: ln -sf ${MPAS_ROOT}/atmosphere_model . - name: Link surface files to run directory (feature) - if: ${{matrix.ic_source}} == 'gfs' + if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_rt ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . From 9aa14e87a0b02e60abe8bb0685c2cba6f906eb7d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 14:33:33 -0600 Subject: [PATCH 074/198] Fix workflow name in file; add debugging lines to run setup step; comment out build lines for temporary efficiency. --- .github/workflows/run_mpas_stoch.yml | 76 +++++++++++++++------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 30e4f3fe20..422e7583a4 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -29,7 +29,7 @@ on: [push, pull_request, workflow_dispatch] # ############################################################################################# jobs: - run_mpas_hrrr: + run_mpas_stoch: runs-on: ubuntu-22.04 strategy: fail-fast: false # Disable fail-fast @@ -106,45 +106,47 @@ jobs: ########################################################################################## # Step 2a: Clone MPAS and build. (baselines) ########################################################################################## - - name: Checkout and build MPAS standalone for baseline generation (Debug) - if: contains(matrix.build-type, 'Debug') - run: | - cd ${runner_ROOT} - git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL - cd ${mpas_bl_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true - - - name: Checkout and build MPAS standalone for baseline generation (Release) - if: contains(matrix.build-type, 'Release') - run: | - cd ${runner_ROOT} - git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL - cd ${mpas_bl_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere +# Don't build baseline branch for now. +# - name: Checkout and build MPAS standalone for baseline generation (Debug) +# if: contains(matrix.build-type, 'Debug') +# run: | +# cd ${runner_ROOT} +# git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL +# cd ${mpas_bl_ROOT} +# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true +# +# - name: Checkout and build MPAS standalone for baseline generation (Release) +# if: contains(matrix.build-type, 'Release') +# run: | +# cd ${runner_ROOT} +# git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL +# cd ${mpas_bl_ROOT} +# make ${{matrix.bld_target}} CORE=atmosphere ########################################################################################## # Step 2b: Clone MPAS and build (feature branch) ########################################################################################## - - name: Checkout MPAS codebase for testing. - uses: actions/checkout@v3 - - - name: Initialize any submodules from testing codebase. - run: | - git config --global --add safe.directory ${MPAS_ROOT} - cd ${MPAS_ROOT} - git submodule update --init --recursive - - - name: Build MPAS standalone for testing (Debug) - if: contains(matrix.build-type, 'Debug') - run: | - cd ${MPAS_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true - - - name: Build MPAS standalone for testing (Release) - if: contains(matrix.build-type, 'Release') - run: | - cd ${MPAS_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere +# Don't build for now, since currently debugging the data download step +# - name: Checkout MPAS codebase for testing. +# uses: actions/checkout@v3 +# +# - name: Initialize any submodules from testing codebase. +# run: | +# git config --global --add safe.directory ${MPAS_ROOT} +# cd ${MPAS_ROOT} +# git submodule update --init --recursive +# +# - name: Build MPAS standalone for testing (Debug) +# if: contains(matrix.build-type, 'Debug') +# run: | +# cd ${MPAS_ROOT} +# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true +# +# - name: Build MPAS standalone for testing (Release) +# if: contains(matrix.build-type, 'Release') +# run: | +# cd ${MPAS_ROOT} +# make ${{matrix.bld_target}} CORE=atmosphere ########################################################################################## # Step 3: Fetch any data/files needed for MPAS runs. @@ -173,6 +175,8 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . + ls -alF + echo "Bye" - name: Link surface files to run directory (baselines) if: matrix.ic_source == 'gfs' From 7ec0238ef4da01ffa9eba358100426c777550997 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 14:37:50 -0600 Subject: [PATCH 075/198] More debugging lines. --- .github/workflows/run_mpas_stoch.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 422e7583a4..74d0f8c501 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -155,6 +155,10 @@ jobs: run: | cd ${MPAS_ROOT} ./testing_and_setup/ufs-community/data/get_data.sh + echo "AAAAAAAAAA" + pwd + ls -alF + echo "BBBBBBBBBB" ########################################################################################## # Step 4a: Configure MPAS baseline runs @@ -175,8 +179,10 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . + echo "CCCCCCCCCC" + pwd ls -alF - echo "Bye" + echo "DDDDDDDDDD" - name: Link surface files to run directory (baselines) if: matrix.ic_source == 'gfs' From d63ebe04499e9fe73cc86ae69351318dc559de1f Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 14:50:19 -0600 Subject: [PATCH 076/198] More bug fixes to workflow file. --- .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 74d0f8c501..497b36db59 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -126,27 +126,27 @@ jobs: ########################################################################################## # Step 2b: Clone MPAS and build (feature branch) ########################################################################################## + - name: Checkout MPAS codebase for testing. + uses: actions/checkout@v3 + + - name: Initialize any submodules from testing codebase. + run: | + git config --global --add safe.directory ${MPAS_ROOT} + cd ${MPAS_ROOT} + git submodule update --init --recursive + # Don't build for now, since currently debugging the data download step -# - name: Checkout MPAS codebase for testing. -# uses: actions/checkout@v3 -# -# - name: Initialize any submodules from testing codebase. -# run: | -# git config --global --add safe.directory ${MPAS_ROOT} -# cd ${MPAS_ROOT} -# git submodule update --init --recursive -# # - name: Build MPAS standalone for testing (Debug) # if: contains(matrix.build-type, 'Debug') # run: | # cd ${MPAS_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true +# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true # # - name: Build MPAS standalone for testing (Release) # if: contains(matrix.build-type, 'Release') # run: | # cd ${MPAS_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere +# make ${{matrix.bld_target}} CORE=atmosphere ########################################################################################## # Step 3: Fetch any data/files needed for MPAS runs. From 936878098a8be42d8a1de24c843fe7ab76bb9f1d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:04:48 -0600 Subject: [PATCH 077/198] More workflow debugging. --- .github/workflows/run_mpas_stoch.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 497b36db59..964459d91a 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -126,6 +126,11 @@ jobs: ########################################################################################## # Step 2b: Clone MPAS and build (feature branch) ########################################################################################## +# actions/checkout@v3 is a standard GitHub Actions action that clones the +# repository that triggered the workflow into the runner's workspace. +# Specifically it: +# 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. +# 2) Checks out the specific commit that triggered the workflow. - name: Checkout MPAS codebase for testing. uses: actions/checkout@v3 @@ -156,15 +161,18 @@ jobs: cd ${MPAS_ROOT} ./testing_and_setup/ufs-community/data/get_data.sh echo "AAAAAAAAAA" + cd testing_and_setup + echo "BBBBBBBBBB" pwd ls -alF - echo "BBBBBBBBBB" + echo "CCCCCCCCCC" ########################################################################################## # Step 4a: Configure MPAS baseline runs ########################################################################################## - name: Create and populate run directory (baselines) run: | + echo "AAAAAAAAAA" cd ${runner_ROOT} && mkdir run_bl && cd run_bl cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . @@ -179,8 +187,9 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . - echo "CCCCCCCCCC" + echo "BBBBBBBBBB" pwd + echo "CCCCCCCCCC" ls -alF echo "DDDDDDDDDD" From ef1dd30ccae6bd5ee7de4b0aa6776d4f44823a85 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:11:49 -0600 Subject: [PATCH 078/198] CI workflow debugging. --- .github/workflows/run_mpas_stoch.yml | 76 +++++++++++++++------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 964459d91a..f14bb7f7d2 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -161,49 +161,50 @@ jobs: cd ${MPAS_ROOT} ./testing_and_setup/ufs-community/data/get_data.sh echo "AAAAAAAAAA" + set -x cd testing_and_setup echo "BBBBBBBBBB" pwd ls -alF echo "CCCCCCCCCC" + cd ufs-community + echo "DDDDDDDDDD" + ls -alF + echo "EEEEEEEEEE" ########################################################################################## # Step 4a: Configure MPAS baseline runs ########################################################################################## - - name: Create and populate run directory (baselines) - run: | - echo "AAAAAAAAAA" - cd ${runner_ROOT} && mkdir run_bl && cd run_bl - cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . - ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . - ln -sf ${mpas_bl_ROOT}/atmosphere_model . - echo "BBBBBBBBBB" - pwd - echo "CCCCCCCCCC" - ls -alF - echo "DDDDDDDDDD" - - - name: Link surface files to run directory (baselines) - if: matrix.ic_source == 'gfs' - run: | - cd ${runner_ROOT}/run_bl - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . +# - name: Create and populate run directory (baselines) +# run: | +# cd ${runner_ROOT} && mkdir run_bl && cd run_bl +# cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . +# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . +# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . +# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . +# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . +# ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . +# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . +# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . +# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . +# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . +# ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . +# ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . +# ln -sf ${mpas_bl_ROOT}/atmosphere_model . +# +# - name: Link surface files to run directory (baselines) +# if: matrix.ic_source == 'gfs' +# run: | +# cd ${runner_ROOT}/run_bl +# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Step 4b: Configure MPAS feature runs ########################################################################################## - name: Create and populate run directory (feature test) run: | + set -x + echo "AAAAAAAAAA" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . @@ -218,6 +219,13 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . + echo "BBBBBBBBBB" + echo "MPAS_ROOT = |${MPAS_ROOT}|" + cd ${MPAS_ROOT} + pwd + echo "CCCCCCCCCC" + ls -alF + echo "DDDDDDDDDD" - name: Link surface files to run directory (feature) if: matrix.ic_source == 'gfs' @@ -228,12 +236,12 @@ jobs: ########################################################################################## # Step 5: Run MPAS ########################################################################################## - - name: Run MPAS (baselines) - run: | - cd ${runner_ROOT}/run_bl - pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model - pwd && ls -l +# - name: Run MPAS (baselines) +# run: | +# cd ${runner_ROOT}/run_bl +# pwd && ls -l +# mpiexec --allow-run-as-root -np 1 ./atmosphere_model +# pwd && ls -l - name: Run MPAS (feature branch) run: | From 25305d5d2fef0fb731412cc8a8d43ad071a3a3db Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:16:10 -0600 Subject: [PATCH 079/198] More debugging CI test for stoch phys. --- .github/workflows/run_mpas_stoch.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index f14bb7f7d2..96e134e72b 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -160,17 +160,22 @@ jobs: run: | cd ${MPAS_ROOT} ./testing_and_setup/ufs-community/data/get_data.sh - echo "AAAAAAAAAA" set -x + echo "AAAAAAAAAA" cd testing_and_setup + pwd + ls -alF echo "BBBBBBBBBB" + cd ufs-community pwd ls -alF echo "CCCCCCCCCC" - cd ufs-community - echo "DDDDDDDDDD" + cd data + pwd ls -alF + echo "DDDDDDDDDD" echo "EEEEEEEEEE" + echo "FFFFFFFFFF" ########################################################################################## # Step 4a: Configure MPAS baseline runs @@ -223,8 +228,8 @@ jobs: echo "MPAS_ROOT = |${MPAS_ROOT}|" cd ${MPAS_ROOT} pwd - echo "CCCCCCCCCC" ls -alF + echo "CCCCCCCCCC" echo "DDDDDDDDDD" - name: Link surface files to run directory (feature) From 75bd766ae90dcc3152a7c58fbd16176f069170cf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:20:01 -0600 Subject: [PATCH 080/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 96e134e72b..bb92ce353c 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -174,6 +174,9 @@ jobs: pwd ls -alF echo "DDDDDDDDDD" + cd ics + pwd + ls -alF echo "EEEEEEEEEE" echo "FFFFFFFFFF" @@ -210,6 +213,7 @@ jobs: run: | set -x echo "AAAAAAAAAA" + echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . From f661b6326314a3258131e84c8c68c278ccb3b223 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:24:21 -0600 Subject: [PATCH 081/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index bb92ce353c..7610bd961e 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -178,6 +178,9 @@ jobs: pwd ls -alF echo "EEEEEEEEEE" + cd ufscommunity.gfs.winter + pwd + ls -alF echo "FFFFFFFFFF" ########################################################################################## @@ -234,7 +237,12 @@ jobs: pwd ls -alF echo "CCCCCCCCCC" + cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch + pwd + ls -alF echo "DDDDDDDDDD" + more namelist.atmosphere + echo "EEEEEEEEEE" - name: Link surface files to run directory (feature) if: matrix.ic_source == 'gfs' From 726cadb676b777edcf9944e5f1801af08bddebb9 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 15:29:53 -0600 Subject: [PATCH 082/198] Modify namelist for stochastic physics test to activate SPPT. --- .../namelist.atmosphere | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 2e54c86387..788cb40e63 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -60,3 +60,25 @@ &soundings config_sounding_interval = 'none' / +&nam_stochy + do_sppt = .true. + do_skeb = .false. + config_spptint = 60 + config_sppt_1 = 0.8 + config_sppt_2 = 0.0 + config_sppt_3 = 0.0 + config_sppt_tau_1 = 21600 + config_sppt_tau_2 = 86400 + config_sppt_tau_3 = 21600 + config_sppt_lscale_1 = 150000 + config_sppt_lscale_2 = 1000000 + config_sppt_lscale_3 = 2000000 + config_sppt_logit = .true. + config_sppt_sfclimit = .true. + config_iseed_sppt1 = 3 + config_iseed_sppt2 = 0 + config_iseed_sppt3 = 0 + config_sppt_hgt_top1 = 15000 + config_sppt_hgt_top2 = 27000 + config_stochini = .false. +/ From 2ed6c4b846540263ace1b656ce6ed7b29cb909e1 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 27 Apr 2026 16:21:27 -0600 Subject: [PATCH 083/198] Re-activate build for the feature branch. --- .github/workflows/run_mpas_stoch.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 7610bd961e..0b9fbdd3f1 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -146,12 +146,12 @@ jobs: # run: | # cd ${MPAS_ROOT} # make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true -# -# - name: Build MPAS standalone for testing (Release) -# if: contains(matrix.build-type, 'Release') -# run: | -# cd ${MPAS_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere + + - name: Build MPAS standalone for testing (Release) + if: contains(matrix.build-type, 'Release') + run: | + cd ${MPAS_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere ########################################################################################## # Step 3: Fetch any data/files needed for MPAS runs. From b7c7c53b4a3d8e71a298dd8bbcfdb86dca3c7faf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 11:23:59 -0600 Subject: [PATCH 084/198] More debugging. --- .github/workflows/run_mpas_stoch.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 0b9fbdd3f1..0f5a375698 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -283,6 +283,16 @@ jobs: run: | cd ${MPAS_ROOT}/testing_and_setup/ufs-community ./cmp_rt2bl.py --dir_rt ${runner_ROOT}/run_rt --dir_bl ${runner_ROOT}/run_bl + set -x + echo "AAAAAAAAAA" + cd ${runner_ROOT}/run_rt + echo "pwd = $(pwd)" + ls -alF + echo "BBBBBBBBBB" + cd ${runner_ROOT}/run_bl + echo "pwd = $(pwd)" + ls -alF + echo "CCCCCCCCCC" ########################################################################################## # Step 7: Save MPAS output and log files as GitHub Artifact. @@ -293,7 +303,10 @@ jobs: mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch mkdir data_bl && cd data_bl + set -x + echo "AAAAAAAAAA" cp ${runner_ROOT}/run_bl/log.atmosphere.*.out log.atmosphere.BL.out + echo "BBBBBBBBBB" cp ${runner_ROOT}/run_bl/history.*.nc . cp ${runner_ROOT}/run_bl/diag.*.nc . cd .. From 8480bf11f9e2a05f9daa21eeea05260e67dc24e4 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 12:05:01 -0600 Subject: [PATCH 085/198] More debugging. --- .github/workflows/run_mpas_stoch.yml | 43 +++++++++++++++++++++------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 0f5a375698..9ae0bded28 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -140,6 +140,24 @@ jobs: cd ${MPAS_ROOT} git submodule update --init --recursive +# - name: Cache MPAS build +# id: cache +# uses: actions/cache@v3 +# with: +# path: ${{ env.MPAS_ROOT }}/atmosphere_model +# key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} +# restore-keys: | +# mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}- + + - name: Check changed files + id: changed + uses: dorny/paths-filter@v3 + with: + filters: | + source: + - 'src/**' + - 'Makefile' + # Don't build for now, since currently debugging the data download step # - name: Build MPAS standalone for testing (Debug) # if: contains(matrix.build-type, 'Debug') @@ -148,7 +166,7 @@ jobs: # make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true - name: Build MPAS standalone for testing (Release) - if: contains(matrix.build-type, 'Release') + if: contains(matrix.build-type, 'Release') && steps.changed.outputs.source == 'true' run: | cd ${MPAS_ROOT} make ${{matrix.bld_target}} CORE=atmosphere @@ -282,17 +300,20 @@ jobs: - name: Run comparison script run: | cd ${MPAS_ROOT}/testing_and_setup/ufs-community + # Note that if the baseline directory ${runner_ROOT}/run_bl doesn't exist, the + # comparison script cmp_rt2bl.py will still report a success. Not clear if this + # is by design. ./cmp_rt2bl.py --dir_rt ${runner_ROOT}/run_rt --dir_bl ${runner_ROOT}/run_bl - set -x - echo "AAAAAAAAAA" - cd ${runner_ROOT}/run_rt - echo "pwd = $(pwd)" - ls -alF - echo "BBBBBBBBBB" - cd ${runner_ROOT}/run_bl - echo "pwd = $(pwd)" - ls -alF - echo "CCCCCCCCCC" +# set -x +# echo "AAAAAAAAAA" +# cd ${runner_ROOT}/run_rt +# echo "pwd = $(pwd)" +# ls -alF +# echo "BBBBBBBBBB" +# cd ${runner_ROOT}/run_bl +# echo "pwd = $(pwd)" +# ls -alF +# echo "CCCCCCCCCC" ########################################################################################## # Step 7: Save MPAS output and log files as GitHub Artifact. From c10ae9805969bad885977aa7237664c16784e433 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 12:31:13 -0600 Subject: [PATCH 086/198] Debugging CI tests. --- .github/workflows/run_mpas_stoch.yml | 128 ++++++++++++++------------- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9ae0bded28..a0c67a05dc 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -107,7 +107,7 @@ jobs: # Step 2a: Clone MPAS and build. (baselines) ########################################################################################## # Don't build baseline branch for now. -# - name: Checkout and build MPAS standalone for baseline generation (Debug) +# - name: Checkout and build MPAS for baseline generation (baseline branch; debug build) # if: contains(matrix.build-type, 'Debug') # run: | # cd ${runner_ROOT} @@ -115,58 +115,60 @@ jobs: # cd ${mpas_bl_ROOT} # make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true # -# - name: Checkout and build MPAS standalone for baseline generation (Release) -# if: contains(matrix.build-type, 'Release') -# run: | -# cd ${runner_ROOT} -# git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL -# cd ${mpas_bl_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere + - name: Get baseline branch SHA + id: baseline-sha + run: | + echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT + + - name: Cache MPAS build (baseline branch; release build) + id: cache-bl-release + uses: actions/cache@v3 + with: + path: ${{ env.mpas_bl_ROOT }}/atmosphere_model + key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} + + - name: Checkout and build MPAS for baseline generation (baseline branch; release build) + if: contains(matrix.build-type, 'Release') && steps.cache-bl-release.outputs.cache-hit != 'true' + run: | + cd ${runner_ROOT} + git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + cd ${mpas_bl_ROOT} + make ${{matrix.bld_target}} CORE=atmosphere ########################################################################################## # Step 2b: Clone MPAS and build (feature branch) ########################################################################################## -# actions/checkout@v3 is a standard GitHub Actions action that clones the -# repository that triggered the workflow into the runner's workspace. -# Specifically it: -# 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. -# 2) Checks out the specific commit that triggered the workflow. - - name: Checkout MPAS codebase for testing. + # actions/checkout@v3 is a standard GitHub Actions action that clones the repository that + # triggered the workflow into the runner's workspace. Specifically it: + # + # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. + # 2) Checks out the specific commit that triggered the workflow. + # + - name: Checkout MPAS for testing (feature branch). uses: actions/checkout@v3 - - name: Initialize any submodules from testing codebase. + - name: Initialize any submodules from testing codebase (feature branch). run: | git config --global --add safe.directory ${MPAS_ROOT} cd ${MPAS_ROOT} git submodule update --init --recursive -# - name: Cache MPAS build -# id: cache -# uses: actions/cache@v3 -# with: -# path: ${{ env.MPAS_ROOT }}/atmosphere_model -# key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} -# restore-keys: | -# mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}- - - - name: Check changed files - id: changed - uses: dorny/paths-filter@v3 + - name: Cache MPAS build (feature branch) + id: cache-feature + uses: actions/cache@v3 with: - filters: | - source: - - 'src/**' - - 'Makefile' + path: ${{ env.MPAS_ROOT }}/atmosphere_model + key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} # Don't build for now, since currently debugging the data download step -# - name: Build MPAS standalone for testing (Debug) +# - name: Build MPAS for testing (Debug) # if: contains(matrix.build-type, 'Debug') # run: | # cd ${MPAS_ROOT} # make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true - - name: Build MPAS standalone for testing (Release) - if: contains(matrix.build-type, 'Release') && steps.changed.outputs.source == 'true' + - name: Build MPAS for testing (feature branch; release build) + if: contains(matrix.build-type, 'Release') && steps.cache-feature.outputs.cache-hit != 'true' run: | cd ${MPAS_ROOT} make ${{matrix.bld_target}} CORE=atmosphere @@ -204,28 +206,28 @@ jobs: ########################################################################################## # Step 4a: Configure MPAS baseline runs ########################################################################################## -# - name: Create and populate run directory (baselines) -# run: | -# cd ${runner_ROOT} && mkdir run_bl && cd run_bl -# cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . -# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . -# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . -# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . -# ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . -# ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . -# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . -# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . -# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . -# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . -# ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . -# ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . -# ln -sf ${mpas_bl_ROOT}/atmosphere_model . -# -# - name: Link surface files to run directory (baselines) -# if: matrix.ic_source == 'gfs' -# run: | -# cd ${runner_ROOT}/run_bl -# ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + - name: Create and populate run directory (baseline generation) + run: | + cd ${runner_ROOT} && mkdir run_bl && cd run_bl + cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . + ln -sf ${mpas_bl_ROOT}/atmosphere_model . + + - name: Link surface files to run directory (baselines) + if: matrix.ic_source == 'gfs' + run: | + cd ${runner_ROOT}/run_bl + ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Step 4b: Configure MPAS feature runs @@ -271,14 +273,14 @@ jobs: ########################################################################################## # Step 5: Run MPAS ########################################################################################## -# - name: Run MPAS (baselines) -# run: | -# cd ${runner_ROOT}/run_bl -# pwd && ls -l -# mpiexec --allow-run-as-root -np 1 ./atmosphere_model -# pwd && ls -l + - name: Run MPAS (baseline generation) + run: | + cd ${runner_ROOT}/run_bl + pwd && ls -l + mpiexec --allow-run-as-root -np 1 ./atmosphere_model + pwd && ls -l - - name: Run MPAS (feature branch) + - name: Run MPAS (feature test) run: | cd ${runner_ROOT}/run_rt pwd && ls -l From aaa661dd15e597ebc50da4f80f8bf8ee05ae6e06 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 16:23:35 -0600 Subject: [PATCH 087/198] Debugging and cleanup. --- .github/workflows/run_mpas_stoch.yml | 133 ++++++++++++--------------- 1 file changed, 59 insertions(+), 74 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index a0c67a05dc..404b8e3cec 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -104,50 +104,42 @@ jobs: echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV ########################################################################################## - # Step 2a: Clone MPAS and build. (baselines) + # Step 2a: Clone MPAS and build -- baseline branch. ########################################################################################## -# Don't build baseline branch for now. -# - name: Checkout and build MPAS for baseline generation (baseline branch; debug build) -# if: contains(matrix.build-type, 'Debug') -# run: | -# cd ${runner_ROOT} -# git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL -# cd ${mpas_bl_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true -# - name: Get baseline branch SHA id: baseline-sha run: | echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT - - name: Cache MPAS build (baseline branch; release build) - id: cache-bl-release + - name: Cache MPAS build (baseline branch) + id: cache-bl uses: actions/cache@v3 with: path: ${{ env.mpas_bl_ROOT }}/atmosphere_model key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} - - name: Checkout and build MPAS for baseline generation (baseline branch; release build) - if: contains(matrix.build-type, 'Release') && steps.cache-bl-release.outputs.cache-hit != 'true' + - name: Checkout and build MPAS for baseline generation (baseline branch) + if: steps.cache-bl.outputs.cache-hit != 'true' run: | cd ${runner_ROOT} git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL cd ${mpas_bl_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere + make ${{matrix.bld_target}} CORE=atmosphere ${{ matrix.build-type == 'Debug' && 'DEBUG=true' || '' }} ########################################################################################## - # Step 2b: Clone MPAS and build (feature branch) + # Step 2b: Clone MPAS and build -- feature branch. ########################################################################################## + # actions/checkout@v3 is a standard GitHub Actions action that clones the repository that # triggered the workflow into the runner's workspace. Specifically it: # # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. # 2) Checks out the specific commit that triggered the workflow. # - - name: Checkout MPAS for testing (feature branch). + - name: Checkout MPAS for testing (feature branch) uses: actions/checkout@v3 - - name: Initialize any submodules from testing codebase (feature branch). + - name: Initialize submodules (feature branch) run: | git config --global --add safe.directory ${MPAS_ROOT} cd ${MPAS_ROOT} @@ -160,18 +152,11 @@ jobs: path: ${{ env.MPAS_ROOT }}/atmosphere_model key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} -# Don't build for now, since currently debugging the data download step -# - name: Build MPAS for testing (Debug) -# if: contains(matrix.build-type, 'Debug') -# run: | -# cd ${MPAS_ROOT} -# make ${{matrix.bld_target}} CORE=atmosphere DEBUG=true - - - name: Build MPAS for testing (feature branch; release build) - if: contains(matrix.build-type, 'Release') && steps.cache-feature.outputs.cache-hit != 'true' + - name: Build MPAS for testing (feature branch) + if: steps.cache-feature.outputs.cache-hit != 'true' run: | cd ${MPAS_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere + make ${{matrix.bld_target}} CORE=atmosphere ${{ matrix.build-type == 'Debug' && 'DEBUG=true' || '' }} ########################################################################################## # Step 3: Fetch any data/files needed for MPAS runs. @@ -180,33 +165,33 @@ jobs: run: | cd ${MPAS_ROOT} ./testing_and_setup/ufs-community/data/get_data.sh - set -x - echo "AAAAAAAAAA" - cd testing_and_setup - pwd - ls -alF - echo "BBBBBBBBBB" - cd ufs-community - pwd - ls -alF - echo "CCCCCCCCCC" - cd data - pwd - ls -alF - echo "DDDDDDDDDD" - cd ics - pwd - ls -alF - echo "EEEEEEEEEE" - cd ufscommunity.gfs.winter - pwd - ls -alF - echo "FFFFFFFFFF" +# set -x +# echo "AAAAAAAAAA" +# cd testing_and_setup +# pwd +# ls -alF +# echo "BBBBBBBBBB" +# cd ufs-community +# pwd +# ls -alF +# echo "CCCCCCCCCC" +# cd data +# pwd +# ls -alF +# echo "DDDDDDDDDD" +# cd ics +# pwd +# ls -alF +# echo "EEEEEEEEEE" +# cd ufscommunity.gfs.winter +# pwd +# ls -alF +# echo "FFFFFFFFFF" ########################################################################################## - # Step 4a: Configure MPAS baseline runs + # Step 4a: Configure MPAS baseline branch run directory. ########################################################################################## - - name: Create and populate run directory (baseline generation) + - name: Create and populate run directory -- baseline branch runs run: | cd ${runner_ROOT} && mkdir run_bl && cd run_bl cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . @@ -223,20 +208,20 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . - - name: Link surface files to run directory (baselines) + - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_bl ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## - # Step 4b: Configure MPAS feature runs + # Step 4b: Configure MPAS feature branch run directory. ########################################################################################## - - name: Create and populate run directory (feature test) + - name: Create and populate run directory -- feature branch runs run: | - set -x - echo "AAAAAAAAAA" - echo "pwd = |$(pwd)|" +# set -x +# echo "AAAAAAAAAA" +# echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . @@ -251,36 +236,36 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . - echo "BBBBBBBBBB" - echo "MPAS_ROOT = |${MPAS_ROOT}|" - cd ${MPAS_ROOT} - pwd - ls -alF - echo "CCCCCCCCCC" - cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch - pwd - ls -alF - echo "DDDDDDDDDD" - more namelist.atmosphere - echo "EEEEEEEEEE" +# echo "BBBBBBBBBB" +# echo "MPAS_ROOT = |${MPAS_ROOT}|" +# cd ${MPAS_ROOT} +# pwd +# ls -alF +# echo "CCCCCCCCCC" +# cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch +# pwd +# ls -alF +# echo "DDDDDDDDDD" +# more namelist.atmosphere +# echo "EEEEEEEEEE" - - name: Link surface files to run directory (feature) + - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_rt ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## - # Step 5: Run MPAS + # Step 5: Run MPAS with both baseline and feature branches. ########################################################################################## - - name: Run MPAS (baseline generation) + - name: Run MPAS -- baseline branch run: | cd ${runner_ROOT}/run_bl pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l - - name: Run MPAS (feature test) + - name: Run MPAS -- feature branch run: | cd ${runner_ROOT}/run_rt pwd && ls -l From 136c951735eab044dcc32da31e7925f4a3a6a054 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 16:25:19 -0600 Subject: [PATCH 088/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 404b8e3cec..ff2426615f 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -317,11 +317,13 @@ jobs: echo "BBBBBBBBBB" cp ${runner_ROOT}/run_bl/history.*.nc . cp ${runner_ROOT}/run_bl/diag.*.nc . + cp ${runner_ROOT}/run_bl/namelist.atmosphere . cd .. mkdir data_rt && cd data_rt cp ${runner_ROOT}/run_rt/log.atmosphere.*.out log.atmosphere.RT.out cp ${runner_ROOT}/run_rt/history.*.nc . cp ${runner_ROOT}/run_rt/diag.*.nc . + cp ${runner_ROOT}/run_rt/namelist.atmosphere . - name: Upload log files as GitHub Artifact uses: actions/upload-artifact@v4 From 520fb034c2982b0a7e5a2e6b6a3b81ff516bdc4c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 16:33:05 -0600 Subject: [PATCH 089/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index ff2426615f..1ab8c57b18 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -219,9 +219,9 @@ jobs: ########################################################################################## - name: Create and populate run directory -- feature branch runs run: | -# set -x -# echo "AAAAAAAAAA" -# echo "pwd = |$(pwd)|" + #set -x + #echo "AAAAAAAAAA" + #echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . From ab72f9ed3f8074180793a441fcebdadb463db013 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 16:50:47 -0600 Subject: [PATCH 090/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 1ab8c57b18..20d8c66e73 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -111,14 +111,14 @@ jobs: run: | echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT - - name: Cache MPAS build (baseline branch) + - name: Cache MPAS build -- baseline branch id: cache-bl uses: actions/cache@v3 with: path: ${{ env.mpas_bl_ROOT }}/atmosphere_model key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} - - name: Checkout and build MPAS for baseline generation (baseline branch) + - name: Checkout and build MPAS for baseline generation -- baseline branch if: steps.cache-bl.outputs.cache-hit != 'true' run: | cd ${runner_ROOT} @@ -136,7 +136,7 @@ jobs: # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. # 2) Checks out the specific commit that triggered the workflow. # - - name: Checkout MPAS for testing (feature branch) + - name: Checkout MPAS for testing -- feature branch uses: actions/checkout@v3 - name: Initialize submodules (feature branch) @@ -145,7 +145,7 @@ jobs: cd ${MPAS_ROOT} git submodule update --init --recursive - - name: Cache MPAS build (feature branch) + - name: Cache MPAS build -- feature branch id: cache-feature uses: actions/cache@v3 with: @@ -258,11 +258,13 @@ jobs: ########################################################################################## # Step 5: Run MPAS with both baseline and feature branches. ########################################################################################## +### cp ${runner_ROOT}/run_bl/history.*.nc . - name: Run MPAS -- baseline branch + continue-on-error: true run: | cd ${runner_ROOT}/run_bl pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model + mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l - name: Run MPAS -- feature branch From 809f3534b5fe61db5f4ef75ddc4df2058665c14b Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 16:54:48 -0600 Subject: [PATCH 091/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 20d8c66e73..ac37c8c3c9 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -266,6 +266,12 @@ jobs: pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l + echo + echo "AAAAAAAAAA" + more log.atmosphere.0000.err + echo + echo "BBBBBBBBBB" + more log.atmosphere.0000.out - name: Run MPAS -- feature branch run: | @@ -273,6 +279,12 @@ jobs: pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l + echo + echo "AAAAAAAAAA" + more log.atmosphere.0000.err + echo + echo "BBBBBBBBBB" + more log.atmosphere.0000.out ########################################################################################## # Step 6: Compare feature branch to baseline branch. From d58fb53c6eaec9c1e03a64103faccdc21a2da679 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 17:04:17 -0600 Subject: [PATCH 092/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index ac37c8c3c9..62e8dd4e75 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -111,6 +111,11 @@ jobs: run: | echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT + - name: Checkout MPAS -- baseline branch + run: | + cd ${runner_ROOT} + git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + - name: Cache MPAS build -- baseline branch id: cache-bl uses: actions/cache@v3 @@ -118,11 +123,9 @@ jobs: path: ${{ env.mpas_bl_ROOT }}/atmosphere_model key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} - - name: Checkout and build MPAS for baseline generation -- baseline branch + - name: Build MPAS -- baseline branch if: steps.cache-bl.outputs.cache-hit != 'true' run: | - cd ${runner_ROOT} - git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL cd ${mpas_bl_ROOT} make ${{matrix.bld_target}} CORE=atmosphere ${{ matrix.build-type == 'Debug' && 'DEBUG=true' || '' }} @@ -139,7 +142,7 @@ jobs: - name: Checkout MPAS for testing -- feature branch uses: actions/checkout@v3 - - name: Initialize submodules (feature branch) + - name: Initialize submodules -- feature branch run: | git config --global --add safe.directory ${MPAS_ROOT} cd ${MPAS_ROOT} @@ -152,7 +155,7 @@ jobs: path: ${{ env.MPAS_ROOT }}/atmosphere_model key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} - - name: Build MPAS for testing (feature branch) + - name: Build MPAS for testing -- feature branch if: steps.cache-feature.outputs.cache-hit != 'true' run: | cd ${MPAS_ROOT} @@ -277,7 +280,7 @@ jobs: run: | cd ${runner_ROOT}/run_rt pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model + mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l echo echo "AAAAAAAAAA" From 75b64e34cd2b434f1a428b2790438cc4e9058867 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 17:45:26 -0600 Subject: [PATCH 093/198] Change namelist file for stochastic physics CI test. --- .../namelist.atmosphere | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 788cb40e63..045a625d67 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -1,7 +1,7 @@ &nhyd_model config_time_integration_order = 2 config_dt = 720.0 - config_start_time = '2023-03-10_15:00:00' + config_start_time = '2023-03-10_15:00:00' config_run_duration = '0_01:00:00' config_split_dynamics_transport = true config_number_of_sub_steps = 4 @@ -15,21 +15,21 @@ config_smdiv = 0.1 / &damping - config_mpas_cam_coef = 2.0 - config_rayleigh_damp_u = true - config_zd = 16000.0 - config_xnutr = 0.2 + config_mpas_cam_coef = 2.0 + config_rayleigh_damp_u = true + config_zd = 16000.0 + config_xnutr = 0.2 config_number_cam_damping_levels = 8 / &limited_area config_apply_lbcs = true / &io - config_pio_num_iotasks = 0 - config_pio_stride = 1 + config_pio_num_iotasks = 0 + config_pio_stride = 1 / &decomposition - config_block_decomp_file_prefix = 'graph.info.part.' + config_block_decomp_file_prefix = 'graph.info.part.' / &restart config_do_restart = false @@ -40,7 +40,7 @@ / &IAU config_IAU_option = 'off' - config_IAU_window_length_s = 21600. + config_IAU_window_length_s = 21600.0 / &physics config_sst_update = false @@ -50,19 +50,21 @@ config_radtlw_interval = '00:15:00' config_radtsw_interval = '00:15:00' config_bucket_update = 'none' - config_physics_suite = 'hrrrv5' - num_soil_layers = 9 +! config_physics_suite = 'hrrrv5' +! num_soil_layers = 9 + config_physics_suite = 'convection_permitting' + config_microp_scheme = 'mp_tempo' / &physics_mp_tempo - config_tempo_aerosolaware = .true. - config_tempo_hailaware = .true. + config_tempo_aerosolaware = true + config_tempo_hailaware = true / &soundings config_sounding_interval = 'none' / &nam_stochy - do_sppt = .true. - do_skeb = .false. + do_sppt = true + do_skeb = false config_spptint = 60 config_sppt_1 = 0.8 config_sppt_2 = 0.0 @@ -73,12 +75,12 @@ config_sppt_lscale_1 = 150000 config_sppt_lscale_2 = 1000000 config_sppt_lscale_3 = 2000000 - config_sppt_logit = .true. - config_sppt_sfclimit = .true. + config_sppt_logit = true + config_sppt_sfclimit = true config_iseed_sppt1 = 3 config_iseed_sppt2 = 0 config_iseed_sppt3 = 0 config_sppt_hgt_top1 = 15000 config_sppt_hgt_top2 = 27000 - config_stochini = .false. + config_stochini = false / From a71c15d352cdbe4c91ac7b51b8ae7b78e829bca4 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 28 Apr 2026 17:48:16 -0600 Subject: [PATCH 094/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 62e8dd4e75..47edb76816 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -239,18 +239,18 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . -# echo "BBBBBBBBBB" -# echo "MPAS_ROOT = |${MPAS_ROOT}|" -# cd ${MPAS_ROOT} -# pwd -# ls -alF -# echo "CCCCCCCCCC" -# cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch -# pwd -# ls -alF -# echo "DDDDDDDDDD" -# more namelist.atmosphere -# echo "EEEEEEEEEE" + echo "BBBBBBBBBB" + echo "MPAS_ROOT = |${MPAS_ROOT}|" + cd ${MPAS_ROOT} + pwd + ls -alF + echo "CCCCCCCCCC" + cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch + pwd + ls -alF + echo "DDDDDDDDDD" + more namelist.atmosphere + echo "EEEEEEEEEE" - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' From d15a7dc43dca332221f3ebb1b57b67d9b976db5c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 30 Apr 2026 13:25:33 -0600 Subject: [PATCH 095/198] Change name of baseline directory in worklow tests from gsl/develop to noaa/develop; add debugging statements. --- .github/workflows/run_mpas_stoch.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 47edb76816..fb1bd739f8 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -109,12 +109,14 @@ jobs: - name: Get baseline branch SHA id: baseline-sha run: | - echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT + #echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT + echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git noaa/develop | cut -f1)" >> $GITHUB_OUTPUT - name: Checkout MPAS -- baseline branch run: | cd ${runner_ROOT} - git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + #git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL + git clone --recursive --branch noaa/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL - name: Cache MPAS build -- baseline branch id: cache-bl @@ -196,8 +198,13 @@ jobs: ########################################################################################## - name: Create and populate run directory -- baseline branch runs run: | + set -x cd ${runner_ROOT} && mkdir run_bl && cd run_bl cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + echo + echo "AAAAAAAAAA" + ls -alF ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL + echo "BBBBBBBBBB" ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . From e6f2e35b2fd124a7e4203ca01b370cb6abbe5ece Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 30 Apr 2026 14:49:10 -0600 Subject: [PATCH 096/198] Change workflow file for stochastic physics CI test(s) so that the lookup-tables generation is done separately from the build (because caching the build does not save the lookup tables). --- .github/workflows/run_mpas_stoch.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index fb1bd739f8..9fdba5df67 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -125,6 +125,11 @@ jobs: path: ${{ env.mpas_bl_ROOT }}/atmosphere_model key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} + - name: Download physics tables -- baseline branch + run: | + cd ${mpas_bl_ROOT}/src/core_atmosphere/physics + ./checkout_data_files.sh + - name: Build MPAS -- baseline branch if: steps.cache-bl.outputs.cache-hit != 'true' run: | @@ -157,6 +162,11 @@ jobs: path: ${{ env.MPAS_ROOT }}/atmosphere_model key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} + - name: Download physics tables -- feature branch + run: | + cd ${MPAS_ROOT}/src/core_atmosphere/physics + ./checkout_data_files.sh + - name: Build MPAS for testing -- feature branch if: steps.cache-feature.outputs.cache-hit != 'true' run: | From 3c714b863c10ce4fb801b28e344d619effe1c63e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 08:11:31 -0600 Subject: [PATCH 097/198] Clean up stochastic CI test workflow. --- .github/workflows/run_mpas_stoch.yml | 32 +++++++++++++--------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9fdba5df67..029167132d 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -23,9 +23,9 @@ on: [push, pull_request, workflow_dispatch] # # Tests: # Baseline Codebase Repository:Branch Physics IC source season build-type -# 1/4) ufs-community:gsl/develop hrrrv5 gfs winter Release/Debug -# 2/5) ufs-community:gsl/develop hrrrv5 rap summer Release/Debug -# 3/6) ufs-community:gsl/develop hrrrv5 rap winter Release/Debug +# 1/4) ufs-community:noaa/develop hrrrv5 gfs winter Release/Debug +# 2/5) ufs-community:noaa/develop hrrrv5 rap summer Release/Debug +# 3/6) ufs-community:noaa/develop hrrrv5 rap winter Release/Debug # ############################################################################################# jobs: @@ -109,13 +109,11 @@ jobs: - name: Get baseline branch SHA id: baseline-sha run: | - #echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git gsl/develop | cut -f1)" >> $GITHUB_OUTPUT echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git noaa/develop | cut -f1)" >> $GITHUB_OUTPUT - name: Checkout MPAS -- baseline branch run: | cd ${runner_ROOT} - #git clone --recursive --branch gsl/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL git clone --recursive --branch noaa/develop https://github.com/ufs-community/MPAS-Model.git MPAS-Model-BL - name: Cache MPAS build -- baseline branch @@ -256,18 +254,18 @@ jobs: ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . - echo "BBBBBBBBBB" - echo "MPAS_ROOT = |${MPAS_ROOT}|" - cd ${MPAS_ROOT} - pwd - ls -alF - echo "CCCCCCCCCC" - cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch - pwd - ls -alF - echo "DDDDDDDDDD" - more namelist.atmosphere - echo "EEEEEEEEEE" +# echo "BBBBBBBBBB" +# echo "MPAS_ROOT = |${MPAS_ROOT}|" +# cd ${MPAS_ROOT} +# pwd +# ls -alF +# echo "CCCCCCCCCC" +# cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch +# pwd +# ls -alF +# echo "DDDDDDDDDD" +# more namelist.atmosphere +# echo "EEEEEEEEEE" - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' From e80b093c0c2e6c630fd574cf9f211e82bd50f792 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 08:12:26 -0600 Subject: [PATCH 098/198] Make &physics namelist for stoch CI test more similar to the namelist being used for retro runs. --- .../namelist.atmosphere | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 045a625d67..cec17ce8ac 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -50,10 +50,9 @@ config_radtlw_interval = '00:15:00' config_radtsw_interval = '00:15:00' config_bucket_update = 'none' -! config_physics_suite = 'hrrrv5' -! num_soil_layers = 9 - config_physics_suite = 'convection_permitting' - config_microp_scheme = 'mp_tempo' + config_physics_suite = 'hrrrv5' + num_soil_layers = 9 + config_mynn_mixnumcon = 0 / &physics_mp_tempo config_tempo_aerosolaware = true From 9b6ccbd90ad34453ffee090a8db3e097c337f272 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 09:02:01 -0600 Subject: [PATCH 099/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 54 +++++++++++++++------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 029167132d..99c0137f89 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -68,6 +68,8 @@ jobs: PNETCDF: /opt/pnetcdf mpas_ics: testing_and_setup/ufs-community/data/ics/ufscommunity physics_tables: testing_and_setup/ufs-community/data/tables + ufs_community: testing_and_setup/ufs-community + ufs_community_data: testing_and_setup/ufs-community/data # Workflow steps steps: @@ -176,30 +178,32 @@ jobs: ########################################################################################## - name: Download MPAS data (grid info, IC and LBC files) run: | + echo "0000000000" cd ${MPAS_ROOT} - ./testing_and_setup/ufs-community/data/get_data.sh -# set -x -# echo "AAAAAAAAAA" -# cd testing_and_setup -# pwd -# ls -alF -# echo "BBBBBBBBBB" -# cd ufs-community -# pwd -# ls -alF -# echo "CCCCCCCCCC" -# cd data -# pwd -# ls -alF -# echo "DDDDDDDDDD" -# cd ics -# pwd -# ls -alF -# echo "EEEEEEEEEE" -# cd ufscommunity.gfs.winter -# pwd -# ls -alF -# echo "FFFFFFFFFF" + #./testing_and_setup/ufs-community/data/get_data.sh + ./${ufs_community_data}/get_data.sh + set -x + echo "AAAAAAAAAA" + cd testing_and_setup + pwd + ls -alF + echo "BBBBBBBBBB" + cd ufs-community + pwd + ls -alF + echo "CCCCCCCCCC" + cd data + pwd + ls -alF + echo "DDDDDDDDDD" + cd ics + pwd + ls -alF + echo "EEEEEEEEEE" + cd ufscommunity.gfs.winter + pwd + ls -alF + echo "FFFFFFFFFF" ########################################################################################## # Step 4a: Configure MPAS baseline branch run directory. @@ -242,15 +246,18 @@ jobs: #echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + # Create links in the run directory to the physics parameterization tables. ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + # Create links in the run directory to the initial and boundary condition ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + # Create links in the run directory to the tables fetched by the ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . @@ -276,7 +283,6 @@ jobs: ########################################################################################## # Step 5: Run MPAS with both baseline and feature branches. ########################################################################################## -### cp ${runner_ROOT}/run_bl/history.*.nc . - name: Run MPAS -- baseline branch continue-on-error: true run: | From a5a99c24c23741699cf2bbec616e84653f628d5c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 09:32:54 -0600 Subject: [PATCH 100/198] Try defining new variables in the workflow file. --- .github/workflows/run_mpas_stoch.yml | 57 +++++++++++++++++----------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 99c0137f89..9539c3bbe3 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -58,7 +58,8 @@ jobs: run: shell: bash -el {0} - # Environmental variables + # Environmental variables. GitHub Actions automatically exports these to all shell + # environments. env: physics: hrrrv5 py-version: 3.11 @@ -66,14 +67,22 @@ jobs: MPAS_ROOT: /__w/MPAS-Model/MPAS-Model mpas_bl_ROOT: /__w/MPAS-Model-BL PNETCDF: /opt/pnetcdf - mpas_ics: testing_and_setup/ufs-community/data/ics/ufscommunity - physics_tables: testing_and_setup/ufs-community/data/tables + #mpas_ics: testing_and_setup/ufs-community/data/ics/ufscommunity + #physics_tables: testing_and_setup/ufs-community/data/tables ufs_community: testing_and_setup/ufs-community - ufs_community_data: testing_and_setup/ufs-community/data + #ufs_community_data: testing_and_setup/ufs-community/data # Workflow steps steps: + - name: Set derived env vars + run: | + ufs_community_data="${{ env.ufs_community }}/data" + echo "ufs_community_data=${ufs_community_data}" >> $GITHUB_ENV + echo "ufs_community_cases=${{ env.ufs_community }}/cases" >> $GITHUB_ENV + echo "ufs_community_phys_tables=${ufs_community_data}/tables" >> $GITHUB_ENV + echo "ufs_community_mpas_ics=${ufs_community_data}/ics/ufscommunity" >> $GITHUB_ENV + ########################################################################################## # Step 1: Setup ########################################################################################## @@ -212,7 +221,8 @@ jobs: run: | set -x cd ${runner_ROOT} && mkdir run_bl && cd run_bl - cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + #cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + cp ${MPAS_ROOT}/${ufs_community_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . echo echo "AAAAAAAAAA" ls -alF ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL @@ -222,19 +232,19 @@ jobs: ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . - ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_bl - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Step 4b: Configure MPAS feature branch run directory. @@ -245,7 +255,8 @@ jobs: #echo "AAAAAAAAAA" #echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt - cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + #cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + cp ${MPAS_ROOT}/${ufs_community_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # Create links in the run directory to the physics parameterization tables. ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . @@ -253,13 +264,13 @@ jobs: ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Create links in the run directory to the initial and boundary condition - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . # Create links in the run directory to the tables fetched by the - ln -sf ${MPAS_ROOT}/${physics_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${physics_tables}/ugw/* . + ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/ugw/* . ln -sf ${MPAS_ROOT}/atmosphere_model . # echo "BBBBBBBBBB" # echo "MPAS_ROOT = |${MPAS_ROOT}|" @@ -278,7 +289,7 @@ jobs: if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_rt - ln -sf ${MPAS_ROOT}/${mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Step 5: Run MPAS with both baseline and feature branches. @@ -319,12 +330,14 @@ jobs: python-version: ${{env.py-version}} auto-update-conda: true auto-activate-base: false - environment-file: testing_and_setup/ufs-community/environment.yml + #environment-file: testing_and_setup/ufs-community/environment.yml + environment-file: ${{ env.ufs_community }}/environment.yml activate-environment: mpas-ci-env - name: Run comparison script run: | - cd ${MPAS_ROOT}/testing_and_setup/ufs-community + #cd ${MPAS_ROOT}/testing_and_setup/ufs-community + cd ${MPAS_ROOT}/${ufs_community} # Note that if the baseline directory ${runner_ROOT}/run_bl doesn't exist, the # comparison script cmp_rt2bl.py will still report a success. Not clear if this # is by design. From a1de8c8ec80912ccd1c4f81e6f603357aeba051e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 12:57:22 -0600 Subject: [PATCH 101/198] Streamlining, debugging, and commenting. --- .github/workflows/run_mpas_stoch.yml | 195 ++++++++++++++------------- 1 file changed, 105 insertions(+), 90 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9539c3bbe3..dbb5b145f3 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -52,7 +52,7 @@ jobs: # bld_target: intel # image: dustinswales/ufs-community-mpas-ci:oneapi container: - image: ${{ matrix.image }} + image: ${{matrix.image}} # defaults: run: @@ -67,25 +67,37 @@ jobs: MPAS_ROOT: /__w/MPAS-Model/MPAS-Model mpas_bl_ROOT: /__w/MPAS-Model-BL PNETCDF: /opt/pnetcdf - #mpas_ics: testing_and_setup/ufs-community/data/ics/ufscommunity - #physics_tables: testing_and_setup/ufs-community/data/tables ufs_community: testing_and_setup/ufs-community - #ufs_community_data: testing_and_setup/ufs-community/data # Workflow steps steps: - - - name: Set derived env vars - run: | - ufs_community_data="${{ env.ufs_community }}/data" - echo "ufs_community_data=${ufs_community_data}" >> $GITHUB_ENV - echo "ufs_community_cases=${{ env.ufs_community }}/cases" >> $GITHUB_ENV - echo "ufs_community_phys_tables=${ufs_community_data}/tables" >> $GITHUB_ENV - echo "ufs_community_mpas_ics=${ufs_community_data}/ics/ufscommunity" >> $GITHUB_ENV - ########################################################################################## - # Step 1: Setup + # Setup ########################################################################################## + - name: Set derived shell environment variables + run: | + # Define various (relative) directories for convenience. These are all relative to + # the MPAS-Model base directory. + # + # The wrf_phys_tables directory contains physics tables and other files specific to + # WRF physics. + echo "wrf_phys_tables=src/core_atmosphere/physics/physics_wrf/files" >> $GITHUB_ENV + # The ufscmnty_cases directory contains MPAS configuration files for various CI test + # cases. These consist of MPAS namelists and stream definitions. + echo "ufscmnty_cases=${ufs_community}/cases" >> $GITHUB_ENV + # The ufscmnty_data directory contains the script (get_data.sh) that downloads into + # subdirectories various files needed for running MPAS. These include physics tables + # specific to UFS physics parameterizations (as opposed to WRF physics), MPAS initial + # and boundary conditions, and MPAS static files. + ufscmnty_data="${ufs_community}/data" + echo "ufscmnty_data=${ufscmnty_data}" >> $GITHUB_ENV + # The ufs_phys_tables directory contains physics tables and other files specific to + # ufs physics. + echo "ufs_phys_tables=${ufscmnty_data}/tables" >> $GITHUB_ENV + # The mpas_ics directory contains MPAS initial and boundary condition files and MPAS + # static files. + echo "mpas_ics=${ufscmnty_data}/ics" >> $GITHUB_ENV + - name: Setup MPI (GNU) if: matrix.f-compiler == 'gfortran' run: | @@ -115,9 +127,9 @@ jobs: echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV ########################################################################################## - # Step 2a: Clone MPAS and build -- baseline branch. + # Clone and build the MPAS baseline branch. ########################################################################################## - - name: Get baseline branch SHA + - name: Get SHA -- baseline branch id: baseline-sha run: | echo "sha=$(git ls-remote https://github.com/ufs-community/MPAS-Model.git noaa/develop | cut -f1)" >> $GITHUB_OUTPUT @@ -131,8 +143,8 @@ jobs: id: cache-bl uses: actions/cache@v3 with: - path: ${{ env.mpas_bl_ROOT }}/atmosphere_model - key: mpas-build-bl-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ steps.baseline-sha.outputs.sha }} + path: ${{env.mpas_bl_ROOT}}/atmosphere_model + key: mpas-build-bl-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{steps.baseline-sha.outputs.sha}} - name: Download physics tables -- baseline branch run: | @@ -143,10 +155,10 @@ jobs: if: steps.cache-bl.outputs.cache-hit != 'true' run: | cd ${mpas_bl_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere ${{ matrix.build-type == 'Debug' && 'DEBUG=true' || '' }} + make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## - # Step 2b: Clone MPAS and build -- feature branch. + # Clone and build the MPAS feature branch. ########################################################################################## # actions/checkout@v3 is a standard GitHub Actions action that clones the repository that @@ -155,7 +167,7 @@ jobs: # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. # 2) Checks out the specific commit that triggered the workflow. # - - name: Checkout MPAS for testing -- feature branch + - name: Checkout MPAS -- feature branch uses: actions/checkout@v3 - name: Initialize submodules -- feature branch @@ -168,61 +180,60 @@ jobs: id: cache-feature uses: actions/cache@v3 with: - path: ${{ env.MPAS_ROOT }}/atmosphere_model - key: mpas-build-${{ runner.os }}-${{ matrix.image }}-${{ matrix.f-compiler }}-${{ matrix.build-type }}-${{ hashFiles('Makefile', 'src/**') }} + path: ${{env.MPAS_ROOT}}/atmosphere_model + key: mpas-build-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{hashFiles('Makefile', 'src/**')}} - name: Download physics tables -- feature branch run: | cd ${MPAS_ROOT}/src/core_atmosphere/physics ./checkout_data_files.sh - - name: Build MPAS for testing -- feature branch + - name: Build MPAS -- feature branch if: steps.cache-feature.outputs.cache-hit != 'true' run: | cd ${MPAS_ROOT} - make ${{matrix.bld_target}} CORE=atmosphere ${{ matrix.build-type == 'Debug' && 'DEBUG=true' || '' }} + make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## - # Step 3: Fetch any data/files needed for MPAS runs. + # Download any data/files needed for MPAS runs. + # Note that this step uses the get_data.sh script in the feature branch, assuming that + # the data downloaded is also sufficient for runs with the baseline branch. ########################################################################################## - - name: Download MPAS data (grid info, IC and LBC files) + - name: Download MPAS data (grid info, IC and LBC files, some larger physics tables) run: | - echo "0000000000" - cd ${MPAS_ROOT} - #./testing_and_setup/ufs-community/data/get_data.sh - ./${ufs_community_data}/get_data.sh - set -x - echo "AAAAAAAAAA" - cd testing_and_setup - pwd - ls -alF - echo "BBBBBBBBBB" - cd ufs-community - pwd - ls -alF - echo "CCCCCCCCCC" - cd data - pwd - ls -alF - echo "DDDDDDDDDD" - cd ics - pwd - ls -alF - echo "EEEEEEEEEE" - cd ufscommunity.gfs.winter - pwd - ls -alF - echo "FFFFFFFFFF" + #echo "0000000000" + ${MPAS_ROOT}/${ufscmnty_data}/get_data.sh + #set -x + #echo "AAAAAAAAAA" + #cd testing_and_setup + #pwd + #ls -alF + #echo "BBBBBBBBBB" + #cd ufs-community + #pwd + #ls -alF + #echo "CCCCCCCCCC" + #cd data + #pwd + #ls -alF + #echo "DDDDDDDDDD" + #cd ics + #pwd + #ls -alF + #echo "EEEEEEEEEE" + #cd ufscommunity.gfs.winter + #pwd + #ls -alF + #echo "FFFFFFFFFF" ########################################################################################## - # Step 4a: Configure MPAS baseline branch run directory. + # Configure MPAS baseline branch run directory. ########################################################################################## - name: Create and populate run directory -- baseline branch runs run: | set -x cd ${runner_ROOT} && mkdir run_bl && cd run_bl - #cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . - cp ${MPAS_ROOT}/${ufs_community_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . echo echo "AAAAAAAAAA" ls -alF ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL @@ -232,56 +243,60 @@ jobs: ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . - ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/ugw/* . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/ugw/* . ln -sf ${mpas_bl_ROOT}/atmosphere_model . - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_bl - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## - # Step 4b: Configure MPAS feature branch run directory. + # Configure MPAS feature branch run directory. ########################################################################################## - name: Create and populate run directory -- feature branch runs run: | - #set -x - #echo "AAAAAAAAAA" + set -x + echo "AAAAAAAAAA" #echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt - #cp ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . - cp ${MPAS_ROOT}/${ufs_community_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . - # Create links in the run directory to the physics parameterization tables. - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + # Create symlinks in the run directory. + # + # Links to WRF physics tables and other files that are downloaded during the call to + # checkout_data_files.sh. + ln -sf ${MPAS_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*.DATA} . + # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model + # repo or submodules. These are not created in the build step or some other way. They + # are present once the repository is cloned (recursively). ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . - # Create links in the run directory to the initial and boundary condition - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . - # Create links in the run directory to the tables fetched by the - ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${ufs_community_phys_tables}/ugw/* . + # Links to the UFS physics tables downloaded by the get_data.sh script. + ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/tempo/* . + ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/ugw/* . + # Links to the MPAS initial and boundary condition files and other static files. + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + # Link to the MPAS executable. ln -sf ${MPAS_ROOT}/atmosphere_model . # echo "BBBBBBBBBB" # echo "MPAS_ROOT = |${MPAS_ROOT}|" # cd ${MPAS_ROOT} # pwd # ls -alF -# echo "CCCCCCCCCC" -# cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch -# pwd -# ls -alF -# echo "DDDDDDDDDD" + echo "CCCCCCCCCC" + cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch + pwd + ls -alF + echo "DDDDDDDDDD" # more namelist.atmosphere # echo "EEEEEEEEEE" @@ -289,10 +304,10 @@ jobs: if: matrix.ic_source == 'gfs' run: | cd ${runner_ROOT}/run_rt - ln -sf ${MPAS_ROOT}/${ufs_community_mpas_ics}.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## - # Step 5: Run MPAS with both baseline and feature branches. + # Run MPAS with both baseline and feature branches. ########################################################################################## - name: Run MPAS -- baseline branch continue-on-error: true @@ -322,7 +337,7 @@ jobs: more log.atmosphere.0000.out ########################################################################################## - # Step 6: Compare feature branch to baseline branch. + # Compare feature branch to baseline branch. ########################################################################################## - name: Setup Miniconda uses: conda-incubator/setup-miniconda@v3.2.0 @@ -331,7 +346,7 @@ jobs: auto-update-conda: true auto-activate-base: false #environment-file: testing_and_setup/ufs-community/environment.yml - environment-file: ${{ env.ufs_community }}/environment.yml + environment-file: ${{env.ufs_community}}/environment.yml activate-environment: mpas-ci-env - name: Run comparison script @@ -354,7 +369,7 @@ jobs: # echo "CCCCCCCCCC" ########################################################################################## - # Step 7: Save MPAS output and log files as GitHub Artifact. + # Save MPAS output and log files as GitHub Artifact. ########################################################################################## - name: Create GitHub artifact run: | From 3a7f70f10d833947cfa5ebd187f3ed54b73f1c2e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 13:03:41 -0600 Subject: [PATCH 102/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index dbb5b145f3..a54e6971d8 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -287,11 +287,11 @@ jobs: ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . # Link to the MPAS executable. ln -sf ${MPAS_ROOT}/atmosphere_model . -# echo "BBBBBBBBBB" -# echo "MPAS_ROOT = |${MPAS_ROOT}|" -# cd ${MPAS_ROOT} -# pwd -# ls -alF + echo "BBBBBBBBBB" + echo "MPAS_ROOT = |${MPAS_ROOT}|" + cd ${MPAS_ROOT} + pwd + ls -alF echo "CCCCCCCCCC" cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch pwd From 88d4fc36145c04f13f9a629a44cffab5525cebdf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 13:10:38 -0600 Subject: [PATCH 103/198] Debugging. --- .github/workflows/run_mpas_stoch.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index a54e6971d8..bbf7514fbd 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -288,17 +288,17 @@ jobs: # Link to the MPAS executable. ln -sf ${MPAS_ROOT}/atmosphere_model . echo "BBBBBBBBBB" - echo "MPAS_ROOT = |${MPAS_ROOT}|" - cd ${MPAS_ROOT} - pwd + #echo "MPAS_ROOT = |${MPAS_ROOT}|" + #cd ${MPAS_ROOT} + echo "pwd = $(pwd)" ls -alF echo "CCCCCCCCCC" - cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch - pwd - ls -alF - echo "DDDDDDDDDD" -# more namelist.atmosphere -# echo "EEEEEEEEEE" + #cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch + #pwd + #ls -alF + #echo "DDDDDDDDDD" + #more namelist.atmosphere + # echo "EEEEEEEEEE" - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' From ab31dc806ca03a76e9190ed9cff95e53ca2ef538 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 15:27:53 -0600 Subject: [PATCH 104/198] Bug fix and more debugging statements. --- .github/workflows/run_mpas_stoch.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index bbf7514fbd..82e1d301cd 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -271,7 +271,7 @@ jobs: # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. - ln -sf ${MPAS_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*.DATA} . + ln -sf ${MPAS_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). @@ -282,8 +282,8 @@ jobs: ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . # Link to the MPAS executable. ln -sf ${MPAS_ROOT}/atmosphere_model . @@ -293,10 +293,12 @@ jobs: echo "pwd = $(pwd)" ls -alF echo "CCCCCCCCCC" + # Test if the symlink target exists: + [ -e graph.info.part.2 ] && echo "valid" || echo "dangling" #cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch #pwd #ls -alF - #echo "DDDDDDDDDD" + echo "DDDDDDDDDD" #more namelist.atmosphere # echo "EEEEEEEEEE" From feb1bf89b09d481cd654c2ce04df29976bf0ca27 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 15:57:49 -0600 Subject: [PATCH 105/198] Cleanup and improvments to stochastic CI test workflow. --- .github/workflows/run_mpas_stoch.yml | 144 +++++++++------------------ 1 file changed, 45 insertions(+), 99 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 82e1d301cd..b295fb16ee 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -8,6 +8,9 @@ on: [push, pull_request, workflow_dispatch] # # Description # +# This workflow will run MPAS-Model with stochastic physics enabled in order to compare +# output from the baseline branch to one from the feature branch. +# # - Clone and build MPAS for baseline generation. # - Clone and build MPAS for feature branch testing (against baselines). # - Download any data (MP tables, MPAS ICs/LBCs/etc...). @@ -22,10 +25,8 @@ on: [push, pull_request, workflow_dispatch] # - This script uses a matrix run configuration with exclusions to achieve the desired "run list" # # Tests: -# Baseline Codebase Repository:Branch Physics IC source season build-type -# 1/4) ufs-community:noaa/develop hrrrv5 gfs winter Release/Debug -# 2/5) ufs-community:noaa/develop hrrrv5 rap summer Release/Debug -# 3/6) ufs-community:noaa/develop hrrrv5 rap winter Release/Debug +# Baseline Codebase Repository:Branch Physics IC source season build-type +# 1) ufs-community:noaa/develop hrrrv5 gfs winter Release # ############################################################################################# jobs: @@ -65,7 +66,7 @@ jobs: py-version: 3.11 runner_ROOT: /__w/ MPAS_ROOT: /__w/MPAS-Model/MPAS-Model - mpas_bl_ROOT: /__w/MPAS-Model-BL + MPAS_BL_ROOT: /__w/MPAS-Model-BL PNETCDF: /opt/pnetcdf ufs_community: testing_and_setup/ufs-community @@ -126,9 +127,9 @@ jobs: run: | echo "PNETCDF=/opt/pnetcdf" >> $GITHUB_ENV - ########################################################################################## - # Clone and build the MPAS baseline branch. - ########################################################################################## + ########################################################################################## + # Clone and build the MPAS baseline branch. + ########################################################################################## - name: Get SHA -- baseline branch id: baseline-sha run: | @@ -143,18 +144,18 @@ jobs: id: cache-bl uses: actions/cache@v3 with: - path: ${{env.mpas_bl_ROOT}}/atmosphere_model + path: ${{env.MPAS_BL_ROOT}}/atmosphere_model key: mpas-build-bl-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{steps.baseline-sha.outputs.sha}} - name: Download physics tables -- baseline branch run: | - cd ${mpas_bl_ROOT}/src/core_atmosphere/physics + cd ${MPAS_BL_ROOT}/src/core_atmosphere/physics ./checkout_data_files.sh - name: Build MPAS -- baseline branch if: steps.cache-bl.outputs.cache-hit != 'true' run: | - cd ${mpas_bl_ROOT} + cd ${MPAS_BL_ROOT} make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## @@ -196,60 +197,46 @@ jobs: ########################################################################################## # Download any data/files needed for MPAS runs. - # Note that this step uses the get_data.sh script in the feature branch, assuming that - # the data downloaded is also sufficient for runs with the baseline branch. ########################################################################################## - - name: Download MPAS data (grid info, IC and LBC files, some larger physics tables) + - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- baseline branch + run: | + ${MPAS_BL_ROOT}/${ufscmnty_data}/get_data.sh + + - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- feature branch run: | - #echo "0000000000" ${MPAS_ROOT}/${ufscmnty_data}/get_data.sh - #set -x - #echo "AAAAAAAAAA" - #cd testing_and_setup - #pwd - #ls -alF - #echo "BBBBBBBBBB" - #cd ufs-community - #pwd - #ls -alF - #echo "CCCCCCCCCC" - #cd data - #pwd - #ls -alF - #echo "DDDDDDDDDD" - #cd ics - #pwd - #ls -alF - #echo "EEEEEEEEEE" - #cd ufscommunity.gfs.winter - #pwd - #ls -alF - #echo "FFFFFFFFFF" ########################################################################################## # Configure MPAS baseline branch run directory. ########################################################################################## - name: Create and populate run directory -- baseline branch runs run: | - set -x cd ${runner_ROOT} && mkdir run_bl && cd run_bl cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . - echo - echo "AAAAAAAAAA" - ls -alF ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL - echo "BBBBBBBBBB" - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . - ln -sf ${mpas_bl_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . - ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/ugw/* . - ln -sf ${mpas_bl_ROOT}/atmosphere_model . + # + # Create symlinks in the run directory. + # + # Links to WRF physics tables and other files that are downloaded during the call to + # checkout_data_files.sh. + ln -sf ${MPAS_BL_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . + #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . + #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model + # repo or submodules. These are not created in the build step or some other way. They + # are present once the repository is cloned (recursively). + ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + # Links to the UFS physics tables downloaded by the get_data.sh script. + ln -sf ${MPAS_BL_ROOT}/${ufs_phys_tables}/tempo/* . + ln -sf ${MPAS_BL_ROOT}/${ufs_phys_tables}/ugw/* . + # Links to the MPAS initial and boundary condition files and other static files. + ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + #ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + # Link to the MPAS executable. + ln -sf ${MPAS_BL_ROOT}/atmosphere_model . - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' @@ -262,11 +249,9 @@ jobs: ########################################################################################## - name: Create and populate run directory -- feature branch runs run: | - set -x - echo "AAAAAAAAAA" - #echo "pwd = |$(pwd)|" cd ${runner_ROOT} && mkdir run_rt && cd run_rt cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + # # Create symlinks in the run directory. # # Links to WRF physics tables and other files that are downloaded during the call to @@ -284,23 +269,9 @@ jobs: ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + #ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . # Link to the MPAS executable. ln -sf ${MPAS_ROOT}/atmosphere_model . - echo "BBBBBBBBBB" - #echo "MPAS_ROOT = |${MPAS_ROOT}|" - #cd ${MPAS_ROOT} - echo "pwd = $(pwd)" - ls -alF - echo "CCCCCCCCCC" - # Test if the symlink target exists: - [ -e graph.info.part.2 ] && echo "valid" || echo "dangling" - #cd ${MPAS_ROOT}/testing_and_setup/ufs-community/cases/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch - #pwd - #ls -alF - echo "DDDDDDDDDD" - #more namelist.atmosphere - # echo "EEEEEEEEEE" - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' @@ -318,12 +289,6 @@ jobs: pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l - echo - echo "AAAAAAAAAA" - more log.atmosphere.0000.err - echo - echo "BBBBBBBBBB" - more log.atmosphere.0000.out - name: Run MPAS -- feature branch run: | @@ -331,12 +296,6 @@ jobs: pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l - echo - echo "AAAAAAAAAA" - more log.atmosphere.0000.err - echo - echo "BBBBBBBBBB" - more log.atmosphere.0000.out ########################################################################################## # Compare feature branch to baseline branch. @@ -347,28 +306,16 @@ jobs: python-version: ${{env.py-version}} auto-update-conda: true auto-activate-base: false - #environment-file: testing_and_setup/ufs-community/environment.yml environment-file: ${{env.ufs_community}}/environment.yml activate-environment: mpas-ci-env - name: Run comparison script run: | - #cd ${MPAS_ROOT}/testing_and_setup/ufs-community cd ${MPAS_ROOT}/${ufs_community} # Note that if the baseline directory ${runner_ROOT}/run_bl doesn't exist, the # comparison script cmp_rt2bl.py will still report a success. Not clear if this # is by design. ./cmp_rt2bl.py --dir_rt ${runner_ROOT}/run_rt --dir_bl ${runner_ROOT}/run_bl -# set -x -# echo "AAAAAAAAAA" -# cd ${runner_ROOT}/run_rt -# echo "pwd = $(pwd)" -# ls -alF -# echo "BBBBBBBBBB" -# cd ${runner_ROOT}/run_bl -# echo "pwd = $(pwd)" -# ls -alF -# echo "CCCCCCCCCC" ########################################################################################## # Save MPAS output and log files as GitHub Artifact. @@ -378,15 +325,14 @@ jobs: cd ${runner_ROOT} mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + # mkdir data_bl && cd data_bl - set -x - echo "AAAAAAAAAA" cp ${runner_ROOT}/run_bl/log.atmosphere.*.out log.atmosphere.BL.out - echo "BBBBBBBBBB" cp ${runner_ROOT}/run_bl/history.*.nc . cp ${runner_ROOT}/run_bl/diag.*.nc . cp ${runner_ROOT}/run_bl/namelist.atmosphere . cd .. + # mkdir data_rt && cd data_rt cp ${runner_ROOT}/run_rt/log.atmosphere.*.out log.atmosphere.RT.out cp ${runner_ROOT}/run_rt/history.*.nc . From c76cafb8ba0197d45b721a31cb0b26dc82ad0f19 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 16:40:32 -0600 Subject: [PATCH 106/198] Cleanup and improvements. --- .github/workflows/run_mpas_stoch.yml | 123 ++++++++++++++------------- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index b295fb16ee..8668896596 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -65,10 +65,11 @@ jobs: physics: hrrrv5 py-version: 3.11 runner_ROOT: /__w/ - MPAS_ROOT: /__w/MPAS-Model/MPAS-Model - MPAS_BL_ROOT: /__w/MPAS-Model-BL PNETCDF: /opt/pnetcdf ufs_community: testing_and_setup/ufs-community + # Root directories for git clones of the MPAS baseline and feature branches. + SRCDIR_BL: /__w/MPAS-Model-BL + SRCDIR_FT: /__w/MPAS-Model/MPAS-Model # Workflow steps steps: @@ -77,8 +78,8 @@ jobs: ########################################################################################## - name: Set derived shell environment variables run: | - # Define various (relative) directories for convenience. These are all relative to - # the MPAS-Model base directory. + # Define various directories for convenience. Relative paths are with respect to the + # the root directory of the MPAS-Model clone. # # The wrf_phys_tables directory contains physics tables and other files specific to # WRF physics. @@ -98,6 +99,12 @@ jobs: # The mpas_ics directory contains MPAS initial and boundary condition files and MPAS # static files. echo "mpas_ics=${ufscmnty_data}/ics" >> $GITHUB_ENV + # + # Absolute paths to the base directories of the runs with the baseline and feature + # branches. + # + echo "RUNDIR_BL=${runner_ROOT}/run_bl" >> $GITHUB_ENV + echo "RUNDIR_FT=${runner_ROOT}/run_ft" >> $GITHUB_ENV - name: Setup MPI (GNU) if: matrix.f-compiler == 'gfortran' @@ -144,18 +151,18 @@ jobs: id: cache-bl uses: actions/cache@v3 with: - path: ${{env.MPAS_BL_ROOT}}/atmosphere_model + path: ${{env.SRCDIR_BL}}/atmosphere_model key: mpas-build-bl-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{steps.baseline-sha.outputs.sha}} - name: Download physics tables -- baseline branch run: | - cd ${MPAS_BL_ROOT}/src/core_atmosphere/physics + 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 ${MPAS_BL_ROOT} + cd ${SRCDIR_BL} make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## @@ -165,7 +172,7 @@ jobs: # actions/checkout@v3 is a standard GitHub Actions action that clones the repository that # triggered the workflow into the runner's workspace. Specifically it: # - # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${MPAS_ROOT}. + # 1) Clones the feature branch (the one that was pushed or opened as a PR) into ${SRCDIR_FT}. # 2) Checks out the specific commit that triggered the workflow. # - name: Checkout MPAS -- feature branch @@ -173,26 +180,26 @@ jobs: - name: Initialize submodules -- feature branch run: | - git config --global --add safe.directory ${MPAS_ROOT} - cd ${MPAS_ROOT} + git config --global --add safe.directory ${SRCDIR_FT} + cd ${SRCDIR_FT} git submodule update --init --recursive - name: Cache MPAS build -- feature branch id: cache-feature uses: actions/cache@v3 with: - path: ${{env.MPAS_ROOT}}/atmosphere_model + path: ${{env.SRCDIR_FT}}/atmosphere_model key: mpas-build-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{hashFiles('Makefile', 'src/**')}} - name: Download physics tables -- feature branch run: | - cd ${MPAS_ROOT}/src/core_atmosphere/physics + cd ${SRCDIR_FT}/src/core_atmosphere/physics ./checkout_data_files.sh - name: Build MPAS -- feature branch if: steps.cache-feature.outputs.cache-hit != 'true' run: | - cd ${MPAS_ROOT} + cd ${SRCDIR_FT} make ${{matrix.bld_target}} CORE=atmosphere ${{matrix.build-type == 'Debug' && 'DEBUG=true' || ''}} ########################################################################################## @@ -200,99 +207,95 @@ jobs: ########################################################################################## - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- baseline branch run: | - ${MPAS_BL_ROOT}/${ufscmnty_data}/get_data.sh + ${SRCDIR_BL}/${ufscmnty_data}/get_data.sh - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- feature branch run: | - ${MPAS_ROOT}/${ufscmnty_data}/get_data.sh + ${SRCDIR_FT}/${ufscmnty_data}/get_data.sh ########################################################################################## # Configure MPAS baseline branch run directory. ########################################################################################## - name: Create and populate run directory -- baseline branch runs run: | - cd ${runner_ROOT} && mkdir run_bl && cd run_bl - cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + #cd ${runner_ROOT} && mkdir run_bl && cd run_bl + mkdir -p ${RUNDIR_BL} && cd ${RUNDIR_BL} + cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . # # Create symlinks in the run directory. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. - ln -sf ${MPAS_BL_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . - #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.TBL . - #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*.DBL . - #ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_wrf/files/*DATA . + ln -sf ${SRCDIR_BL}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). - ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${MPAS_BL_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${SRCDIR_BL}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${SRCDIR_BL}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. - ln -sf ${MPAS_BL_ROOT}/${ufs_phys_tables}/tempo/* . - ln -sf ${MPAS_BL_ROOT}/${ufs_phys_tables}/ugw/* . + ln -sf ${SRCDIR_BL}/${ufs_phys_tables}/tempo/* . + ln -sf ${SRCDIR_BL}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. - ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - #ln -sf ${MPAS_BL_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . # Link to the MPAS executable. - ln -sf ${MPAS_BL_ROOT}/atmosphere_model . + ln -sf ${SRCDIR_BL}/atmosphere_model . - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | - cd ${runner_ROOT}/run_bl - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + cd ${RUNDIR_BL} + ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Configure MPAS feature branch run directory. ########################################################################################## - name: Create and populate run directory -- feature branch runs run: | - cd ${runner_ROOT} && mkdir run_rt && cd run_rt - cp ${MPAS_ROOT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + #cd ${runner_ROOT} && mkdir run_rt && cd run_rt + mkdir -p ${RUNDIR_FT} && cd ${RUNDIR_FT} + cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # # Create symlinks in the run directory. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. - ln -sf ${MPAS_ROOT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + ln -sf ${SRCDIR_FT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${MPAS_ROOT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${SRCDIR_FT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${SRCDIR_FT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. - ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/tempo/* . - ln -sf ${MPAS_ROOT}/${ufs_phys_tables}/ugw/* . + ln -sf ${SRCDIR_FT}/${ufs_phys_tables}/tempo/* . + ln -sf ${SRCDIR_FT}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . - #ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/graph.info.part.2 . + ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . # Link to the MPAS executable. - ln -sf ${MPAS_ROOT}/atmosphere_model . + ln -sf ${SRCDIR_FT}/atmosphere_model . - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' run: | - cd ${runner_ROOT}/run_rt - ln -sf ${MPAS_ROOT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + cd ${RUNDIR_FT} + ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Run MPAS with both baseline and feature branches. ########################################################################################## - name: Run MPAS -- baseline branch - continue-on-error: true run: | - cd ${runner_ROOT}/run_bl + cd ${RUNDIR_BL} pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l - name: Run MPAS -- feature branch run: | - cd ${runner_ROOT}/run_rt + cd ${RUNDIR_FT} pwd && ls -l mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l @@ -311,11 +314,11 @@ jobs: - name: Run comparison script run: | - cd ${MPAS_ROOT}/${ufs_community} - # Note that if the baseline directory ${runner_ROOT}/run_bl doesn't exist, the + cd ${SRCDIR_FT}/${ufs_community} + # Note that if the directory for the baseline run ${RUNDIR_BL} doesn't exist, the # comparison script cmp_rt2bl.py will still report a success. Not clear if this # is by design. - ./cmp_rt2bl.py --dir_rt ${runner_ROOT}/run_rt --dir_bl ${runner_ROOT}/run_bl + ./cmp_rt2bl.py --dir_rt ${RUNDIR_FT} --dir_bl ${RUNDIR_BL} ########################################################################################## # Save MPAS output and log files as GitHub Artifact. @@ -327,17 +330,17 @@ jobs: cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch # mkdir data_bl && cd data_bl - cp ${runner_ROOT}/run_bl/log.atmosphere.*.out log.atmosphere.BL.out - cp ${runner_ROOT}/run_bl/history.*.nc . - cp ${runner_ROOT}/run_bl/diag.*.nc . - cp ${runner_ROOT}/run_bl/namelist.atmosphere . + cp ${RUNDIR_BL}/log.atmosphere.*.out log.atmosphere.BL.out + cp ${RUNDIR_BL}/history.*.nc . + cp ${RUNDIR_BL}/diag.*.nc . + cp ${RUNDIR_BL}/namelist.atmosphere . cd .. # mkdir data_rt && cd data_rt - cp ${runner_ROOT}/run_rt/log.atmosphere.*.out log.atmosphere.RT.out - cp ${runner_ROOT}/run_rt/history.*.nc . - cp ${runner_ROOT}/run_rt/diag.*.nc . - cp ${runner_ROOT}/run_rt/namelist.atmosphere . + cp ${RUNDIR_FT}/log.atmosphere.*.out log.atmosphere.RT.out + cp ${RUNDIR_FT}/history.*.nc . + cp ${RUNDIR_FT}/diag.*.nc . + cp ${RUNDIR_FT}/namelist.atmosphere . - name: Upload log files as GitHub Artifact uses: actions/upload-artifact@v4 From 4868593484379eb59439b327a587a03e342a87f1 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 18:45:24 -0600 Subject: [PATCH 107/198] More improvements. --- .github/workflows/run_mpas_stoch.yml | 124 ++++++++++++++++++--------- 1 file changed, 82 insertions(+), 42 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 8668896596..1394d6637b 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -78,8 +78,9 @@ jobs: ########################################################################################## - name: Set derived shell environment variables run: | - # Define various directories for convenience. Relative paths are with respect to the - # the root directory of the MPAS-Model clone. + # + # Define some relative paths. These are with respect to the root directory of the + # MPAS-Model clone (which may be SRCDIR_BL or SRCDIR_RF). # # The wrf_phys_tables directory contains physics tables and other files specific to # WRF physics. @@ -100,11 +101,18 @@ jobs: # static files. echo "mpas_ics=${ufscmnty_data}/ics" >> $GITHUB_ENV # - # Absolute paths to the base directories of the runs with the baseline and feature + # Define absolute paths to the base directories of the runs with the baseline and feature # branches. # echo "RUNDIR_BL=${runner_ROOT}/run_bl" >> $GITHUB_ENV echo "RUNDIR_FT=${runner_ROOT}/run_ft" >> $GITHUB_ENV + # + # Set the Github artifact name and absolute path. + # + artifact="artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${physics}-stoch" + #echo "artifact=${artifact}" >> $GITHUB_ENV + echo "ARTDIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV + - name: Setup MPI (GNU) if: matrix.f-compiler == 'gfortran' @@ -218,64 +226,85 @@ jobs: ########################################################################################## - name: Create and populate run directory -- baseline branch runs run: | - #cd ${runner_ROOT} && mkdir run_bl && cd run_bl - mkdir -p ${RUNDIR_BL} && cd ${RUNDIR_BL} - cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}/* . + rundir=${RUNDIR_BL} + srcdir=${SRCDIR_BL} + # Create and cd into run directory. + mkdir -p ${rundir} && cd ${rundir} + # Copy MPAS configuration files (namelist, stream) into run directory. + # + # Since the baseline branch does not yet have a "/some/long/path.stoch" directory from + # which to copy the stochastic physics configuration files, the following command for + # copying the MPAS configuration files to the run directory will not work. Thus, + # comment this out for now and uncomment only after the stochastic physics PR is + # merged. + #cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + # + # Instead, copy the MPAS configuration files from the corresponding directory for the + # feature branch. Also, since the namelist file that the baseline branch cannot + # contain the stochastic physics namelist (called "nam_stochy", we specifically copy + # in a version of the namelist file without that namelist. + cp ${RUNDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + # The following command takes the namelist.atmosphere file copied into the run directory + # above (and which contains the nam_stochy namelist) and removes that namelist from it. + sed -i '/^[[:space:]]*&nam_stochy/,/^[[:space:]]*\//d' namelist.atmosphere # # Create symlinks in the run directory. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. - ln -sf ${SRCDIR_BL}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). - ln -sf ${SRCDIR_BL}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${SRCDIR_BL}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. - ln -sf ${SRCDIR_BL}/${ufs_phys_tables}/tempo/* . - ln -sf ${SRCDIR_BL}/${ufs_phys_tables}/ugw/* . + ln -sf ${srcdir}/${ufs_phys_tables}/tempo/* . + ln -sf ${srcdir}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. - ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . # Link to the MPAS executable. - ln -sf ${SRCDIR_BL}/atmosphere_model . + ln -sf ${srcdir}/atmosphere_model . - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | cd ${RUNDIR_BL} - ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . + ln -sf ${SRCDIR_BL}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.sfc_update.nc . ########################################################################################## # Configure MPAS feature branch run directory. ########################################################################################## - name: Create and populate run directory -- feature branch runs run: | - #cd ${runner_ROOT} && mkdir run_rt && cd run_rt - mkdir -p ${RUNDIR_FT} && cd ${RUNDIR_FT} - cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + rundir=${RUNDIR_FT} + srcdir=${SRCDIR_FT} + # Create and cd into run directory. + mkdir -p ${rundir} && cd ${rundir} + # Copy MPAS configuration files (namelist, stream) into run directory. + cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # # Create symlinks in the run directory. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. - ln -sf ${SRCDIR_FT}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). - ln -sf ${SRCDIR_FT}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . - ln -sf ${SRCDIR_FT}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . + ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noahmp/parameters/NoahmpTable.TBL . + ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. - ln -sf ${SRCDIR_FT}/${ufs_phys_tables}/tempo/* . - ln -sf ${SRCDIR_FT}/${ufs_phys_tables}/ugw/* . + ln -sf ${srcdir}/${ufs_phys_tables}/tempo/* . + ln -sf ${srcdir}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. - ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . - ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . - ln -sf ${SRCDIR_FT}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.lbc.nc . + ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.ugwp_oro_data.nc . # Link to the MPAS executable. - ln -sf ${SRCDIR_FT}/atmosphere_model . + ln -sf ${srcdir}/atmosphere_model . - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' @@ -325,25 +354,36 @@ jobs: ########################################################################################## - name: Create GitHub artifact run: | - cd ${runner_ROOT} - mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch - cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + #cd ${runner_ROOT} + #mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + #cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + #mkdir ${ARTDIR} + #cd ${artifact_dir} # - mkdir data_bl && cd data_bl - cp ${RUNDIR_BL}/log.atmosphere.*.out log.atmosphere.BL.out - cp ${RUNDIR_BL}/history.*.nc . - cp ${RUNDIR_BL}/diag.*.nc . - cp ${RUNDIR_BL}/namelist.atmosphere . + datadir="${ARTDIR}/data_bl" + mkdir -p ${datadir} + cd ${RUNDIR_BL} + cp ./* ${data_dir} + #mkdir data_bl && cd data_bl + #cp ${RUNDIR_BL}/log.atmosphere.*.out . + #cp ${RUNDIR_BL}/history.*.nc . + #cp ${RUNDIR_BL}/diag.*.nc . + #cp ${RUNDIR_BL}/namelist.atmosphere . cd .. # - mkdir data_rt && cd data_rt - cp ${RUNDIR_FT}/log.atmosphere.*.out log.atmosphere.RT.out - cp ${RUNDIR_FT}/history.*.nc . - cp ${RUNDIR_FT}/diag.*.nc . - cp ${RUNDIR_FT}/namelist.atmosphere . + #mkdir data_ft && cd data_ft + #cp ${RUNDIR_FT}/log.atmosphere.*.out . + #cp ${RUNDIR_FT}/history.*.nc . + #cp ${RUNDIR_FT}/diag.*.nc . + #cp ${RUNDIR_FT}/namelist.atmosphere . + datadir="${ARTDIR}/data_ft" + mkdir -p ${datadir} + cd ${RUNDIR_FT} + cp ./* ${data_dir} - name: Upload log files as GitHub Artifact uses: actions/upload-artifact@v4 with: name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch - path: /__w/artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + #path: /__w/${artifact} + path: ${ARTDIR} From db1f6724742ede27aa02235bc6207f5c2a804aa4 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 18:53:15 -0600 Subject: [PATCH 108/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 1394d6637b..27f5073544 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -213,11 +213,11 @@ jobs: ########################################################################################## # Download any data/files needed for MPAS runs. ########################################################################################## - - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- baseline branch + - name: Download MPAS static/IC/LBC files and UFS physics tables -- baseline branch run: | ${SRCDIR_BL}/${ufscmnty_data}/get_data.sh - - name: Download MPAS static, IC, and LBC files, UFS physics lookup tables -- feature branch + - name: Download MPAS static/IC/LBC files and UFS physics tables -- feature branch run: | ${SRCDIR_FT}/${ufscmnty_data}/get_data.sh @@ -243,7 +243,7 @@ jobs: # feature branch. Also, since the namelist file that the baseline branch cannot # contain the stochastic physics namelist (called "nam_stochy", we specifically copy # in a version of the namelist file without that namelist. - cp ${RUNDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # The following command takes the namelist.atmosphere file copied into the run directory # above (and which contains the nam_stochy namelist) and removes that namelist from it. sed -i '/^[[:space:]]*&nam_stochy/,/^[[:space:]]*\//d' namelist.atmosphere From 99273c349d878b8f375de9a91e07014a57ff51cf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 19:05:21 -0600 Subject: [PATCH 109/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 27f5073544..8c85003a96 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -360,10 +360,11 @@ jobs: #mkdir ${ARTDIR} #cd ${artifact_dir} # + set -x datadir="${ARTDIR}/data_bl" mkdir -p ${datadir} cd ${RUNDIR_BL} - cp ./* ${data_dir} + cp ./* ${datadir} #mkdir data_bl && cd data_bl #cp ${RUNDIR_BL}/log.atmosphere.*.out . #cp ${RUNDIR_BL}/history.*.nc . @@ -379,7 +380,7 @@ jobs: datadir="${ARTDIR}/data_ft" mkdir -p ${datadir} cd ${RUNDIR_FT} - cp ./* ${data_dir} + cp ./* ${datadir} - name: Upload log files as GitHub Artifact uses: actions/upload-artifact@v4 From 82f53fc65b2aa428106e8b68376550a5973527f5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 19:17:20 -0600 Subject: [PATCH 110/198] Cache miniconda and a bug fix. --- .github/workflows/run_mpas_stoch.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 8c85003a96..5d945b2756 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -110,7 +110,7 @@ jobs: # Set the Github artifact name and absolute path. # artifact="artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${physics}-stoch" - #echo "artifact=${artifact}" >> $GITHUB_ENV + echo "artifact=${artifact}" >> $GITHUB_ENV echo "ARTDIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV @@ -340,6 +340,7 @@ jobs: auto-activate-base: false environment-file: ${{env.ufs_community}}/environment.yml activate-environment: mpas-ci-env + cache-environment: true - name: Run comparison script run: | @@ -385,6 +386,7 @@ jobs: - name: Upload log files as GitHub Artifact uses: actions/upload-artifact@v4 with: - name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + #name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch + name: mpas-baselines-${artifact} #path: /__w/${artifact} path: ${ARTDIR} From 09cb179a30ffef7cdb40f7f7f2a7dc984b5e3888 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 20:56:39 -0600 Subject: [PATCH 111/198] Bug fixes and improvements. --- .github/workflows/run_mpas_stoch.yml | 47 +++++++++++++++------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 5d945b2756..524b3ad946 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -41,6 +41,7 @@ jobs: # season: [summer, winter] season: [winter] build-type: [Release] + physics: [hrrrv5] exclude: - ic_source: gfs season: summer @@ -62,7 +63,6 @@ jobs: # Environmental variables. GitHub Actions automatically exports these to all shell # environments. env: - physics: hrrrv5 py-version: 3.11 runner_ROOT: /__w/ PNETCDF: /opt/pnetcdf @@ -70,6 +70,9 @@ jobs: # Root directories for git clones of the MPAS baseline and feature branches. SRCDIR_BL: /__w/MPAS-Model-BL SRCDIR_FT: /__w/MPAS-Model/MPAS-Model + # Github artifact name. + artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch" + #ARTIFACT_DIR: ${runner_ROOT}/${artifact}" >> $GITHUB_ENV # Workflow steps steps: @@ -107,12 +110,11 @@ jobs: echo "RUNDIR_BL=${runner_ROOT}/run_bl" >> $GITHUB_ENV echo "RUNDIR_FT=${runner_ROOT}/run_ft" >> $GITHUB_ENV # - # Set the Github artifact name and absolute path. + # Set the absolute path to the Github artifact. # - artifact="artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${physics}-stoch" - echo "artifact=${artifact}" >> $GITHUB_ENV - echo "ARTDIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV - + #artifact="artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch" + #echo "artifact=${artifact}" >> $GITHUB_ENV + echo "ARTIFACT_DIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV - name: Setup MPI (GNU) if: matrix.f-compiler == 'gfortran' @@ -162,7 +164,7 @@ jobs: path: ${{env.SRCDIR_BL}}/atmosphere_model key: mpas-build-bl-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{steps.baseline-sha.outputs.sha}} - - name: Download physics tables -- baseline branch + - name: Download WRF physics tables -- baseline branch run: | cd ${SRCDIR_BL}/src/core_atmosphere/physics ./checkout_data_files.sh @@ -199,7 +201,7 @@ jobs: path: ${{env.SRCDIR_FT}}/atmosphere_model key: mpas-build-${{runner.os}}-${{matrix.image}}-${{matrix.f-compiler}}-${{matrix.build-type}}-${{hashFiles('Makefile', 'src/**')}} - - name: Download physics tables -- feature branch + - name: Download WRF physics tables -- feature branch run: | cd ${SRCDIR_FT}/src/core_atmosphere/physics ./checkout_data_files.sh @@ -237,13 +239,13 @@ jobs: # copying the MPAS configuration files to the run directory will not work. Thus, # comment this out for now and uncomment only after the stochastic physics PR is # merged. - #cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + #cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # # Instead, copy the MPAS configuration files from the corresponding directory for the # feature branch. Also, since the namelist file that the baseline branch cannot # contain the stochastic physics namelist (called "nam_stochy", we specifically copy # in a version of the namelist file without that namelist. - cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # The following command takes the namelist.atmosphere file copied into the run directory # above (and which contains the nam_stochy namelist) and removes that namelist from it. sed -i '/^[[:space:]]*&nam_stochy/,/^[[:space:]]*\//d' namelist.atmosphere @@ -284,7 +286,7 @@ jobs: # Create and cd into run directory. mkdir -p ${rundir} && cd ${rundir} # Copy MPAS configuration files (namelist, stream) into run directory. - cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{env.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . + cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # # Create symlinks in the run directory. # @@ -333,7 +335,8 @@ jobs: # Compare feature branch to baseline branch. ########################################################################################## - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v3.2.0 + #uses: conda-incubator/setup-miniconda@v3.2.0 + uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{env.py-version}} auto-update-conda: true @@ -356,13 +359,13 @@ jobs: - name: Create GitHub artifact run: | #cd ${runner_ROOT} - #mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch - #cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch - #mkdir ${ARTDIR} + #mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch + #cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch + #mkdir ${ARTIFACT_DIR} #cd ${artifact_dir} # set -x - datadir="${ARTDIR}/data_bl" + datadir="${ARTIFACT_DIR}/data_bl" mkdir -p ${datadir} cd ${RUNDIR_BL} cp ./* ${datadir} @@ -378,15 +381,17 @@ jobs: #cp ${RUNDIR_FT}/history.*.nc . #cp ${RUNDIR_FT}/diag.*.nc . #cp ${RUNDIR_FT}/namelist.atmosphere . - datadir="${ARTDIR}/data_ft" + datadir="${ARTIFACT_DIR}/data_ft" mkdir -p ${datadir} cd ${RUNDIR_FT} cp ./* ${datadir} - - name: Upload log files as GitHub Artifact + - name: Upload MPAS Runs as GitHub Artifact uses: actions/upload-artifact@v4 with: - #name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{env.physics}}-stoch - name: mpas-baselines-${artifact} + #name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch + #name: mpas-baselines-${artifact} + name: mpas-baselines-${{env.artifact}} #path: /__w/${artifact} - path: ${ARTDIR} + path: ${{env.runner_ROOT}}/${{env.artifact}} + #path: ${ARTIFACT_DIR} From d92cf65f4473c7e4af93f4fbe7595b230c562954 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 21:05:31 -0600 Subject: [PATCH 112/198] Bug fix to the bug fix. --- .github/workflows/run_mpas_stoch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 524b3ad946..813bd1c62c 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -71,7 +71,7 @@ jobs: SRCDIR_BL: /__w/MPAS-Model-BL SRCDIR_FT: /__w/MPAS-Model/MPAS-Model # Github artifact name. - artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch" + artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch #ARTIFACT_DIR: ${runner_ROOT}/${artifact}" >> $GITHUB_ENV # Workflow steps From 93cf56b6db5d102bbae222b6f688e755a871b6b3 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 21:24:44 -0600 Subject: [PATCH 113/198] Cleanup and improvements. --- .github/workflows/run_mpas_stoch.yml | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 813bd1c62c..a591826215 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -72,7 +72,6 @@ jobs: SRCDIR_FT: /__w/MPAS-Model/MPAS-Model # Github artifact name. artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch - #ARTIFACT_DIR: ${runner_ROOT}/${artifact}" >> $GITHUB_ENV # Workflow steps steps: @@ -112,8 +111,6 @@ jobs: # # Set the absolute path to the Github artifact. # - #artifact="artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch" - #echo "artifact=${artifact}" >> $GITHUB_ENV echo "ARTIFACT_DIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV - name: Setup MPI (GNU) @@ -358,29 +355,11 @@ jobs: ########################################################################################## - name: Create GitHub artifact run: | - #cd ${runner_ROOT} - #mkdir artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch - #cd artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch - #mkdir ${ARTIFACT_DIR} - #cd ${artifact_dir} - # - set -x datadir="${ARTIFACT_DIR}/data_bl" mkdir -p ${datadir} cd ${RUNDIR_BL} cp ./* ${datadir} - #mkdir data_bl && cd data_bl - #cp ${RUNDIR_BL}/log.atmosphere.*.out . - #cp ${RUNDIR_BL}/history.*.nc . - #cp ${RUNDIR_BL}/diag.*.nc . - #cp ${RUNDIR_BL}/namelist.atmosphere . - cd .. # - #mkdir data_ft && cd data_ft - #cp ${RUNDIR_FT}/log.atmosphere.*.out . - #cp ${RUNDIR_FT}/history.*.nc . - #cp ${RUNDIR_FT}/diag.*.nc . - #cp ${RUNDIR_FT}/namelist.atmosphere . datadir="${ARTIFACT_DIR}/data_ft" mkdir -p ${datadir} cd ${RUNDIR_FT} @@ -389,9 +368,5 @@ jobs: - name: Upload MPAS Runs as GitHub Artifact uses: actions/upload-artifact@v4 with: - #name: mpas-baselines-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch - #name: mpas-baselines-${artifact} name: mpas-baselines-${{env.artifact}} - #path: /__w/${artifact} - path: ${{env.runner_ROOT}}/${{env.artifact}} - #path: ${ARTIFACT_DIR} + path: ${{env.ARTIFACT_DIR}} From 2fecafddd2aefad532692c26d2fa471f35121a97 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 21:53:46 -0600 Subject: [PATCH 114/198] Improvements and cleanup. --- .github/workflows/run_mpas_stoch.yml | 32 ++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index a591826215..6483678cdb 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -331,16 +331,40 @@ jobs: ########################################################################################## # Compare feature branch to baseline branch. ########################################################################################## - - name: Setup Miniconda + + # Note that the comparison script used below (cmp_rt2bl.py) is the one in the feature + # branch. Thus, the environment file used in the miniconda setup should be the one in + # that branch (SRCDIR_FT). + - name: Setup miniconda #uses: conda-incubator/setup-miniconda@v3.2.0 uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{env.py-version}} auto-update-conda: true auto-activate-base: false - environment-file: ${{env.ufs_community}}/environment.yml activate-environment: mpas-ci-env - cache-environment: true + environment-file: ${{env.SRCDIR_FT}}/${{env.ufs_community}}/environment.yml + +# - name: Cache conda environment +# id: cache-conda +# uses: actions/cache@v3 +# with: +# path: ${{ env.CONDA }}/envs +# key: conda-${{ runner.os }}-${{ hashFiles(format('{0}/environment.yml', env.ufs_community)) }} +# +# - name: Setup miniconda +# uses: conda-incubator/setup-miniconda@v3 +# with: +# python-version: ${{env.py-version}} +# auto-update-conda: true +# auto-activate-base: false +# activate-environment: mpas-ci-env +# #use-only-tar-bz2: true +# +# - name: Create conda environment +# if: steps.cache-conda.outputs.cache-hit != 'true' +# run: conda env update --file ${SRCDIR_FT}/${{env.ufs_community}}/environment.yml --name mpas-ci-env + - name: Run comparison script run: | @@ -365,7 +389,7 @@ jobs: cd ${RUNDIR_FT} cp ./* ${datadir} - - name: Upload MPAS Runs as GitHub Artifact + - name: Upload MPAS runs as GitHub artifact uses: actions/upload-artifact@v4 with: name: mpas-baselines-${{env.artifact}} From b29539a8d16724099a3d2d03a01fdde92693adcc Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 22:17:34 -0600 Subject: [PATCH 115/198] Use the built-in variable GITHUB_WORKSPACE to set SRCDIR_FT. --- .github/workflows/run_mpas_stoch.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 6483678cdb..efee487e22 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -67,9 +67,6 @@ jobs: runner_ROOT: /__w/ PNETCDF: /opt/pnetcdf ufs_community: testing_and_setup/ufs-community - # Root directories for git clones of the MPAS baseline and feature branches. - SRCDIR_BL: /__w/MPAS-Model-BL - SRCDIR_FT: /__w/MPAS-Model/MPAS-Model # Github artifact name. artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch @@ -103,6 +100,16 @@ jobs: # static files. echo "mpas_ics=${ufscmnty_data}/ics" >> $GITHUB_ENV # + # Define base directories for git clones of the MPAS baseline and feature branches. + # + echo "SRCDIR_BL=/__w/MPAS-Model-BL" >> $GITHUB_ENV + # Note that GITHUB_WORKSPACE is set using the pattern + # /__w// + # i.e. the repository name is repeated twice: once for the parent directory and once + # for the checkout directory within it. Thus, here, it will be set to + # /__w/MPAS-Model/MPAS-Model + # and SRCDIR_FT will be set to that as well. + echo "SRCDIR_FT=${GITHUB_WORKSPACE}" >> $GITHUB_ENV # Define absolute paths to the base directories of the runs with the baseline and feature # branches. # From 0b16b70f6b622a42a8592a27b4d387f32fe24766 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 22:23:53 -0600 Subject: [PATCH 116/198] Remove extra tailing slash in definition of runner_ROOT. --- .github/workflows/run_mpas_stoch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index efee487e22..e508288d76 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -64,7 +64,7 @@ jobs: # environments. env: py-version: 3.11 - runner_ROOT: /__w/ + runner_ROOT: /__w PNETCDF: /opt/pnetcdf ufs_community: testing_and_setup/ufs-community # Github artifact name. From ec6d55a639e608730456316972fcf9f68aa908cd Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 22:34:03 -0600 Subject: [PATCH 117/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index e508288d76..fb881d4634 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -341,7 +341,10 @@ jobs: # Note that the comparison script used below (cmp_rt2bl.py) is the one in the feature # branch. Thus, the environment file used in the miniconda setup should be the one in - # that branch (SRCDIR_FT). + # that branch (SRCDIR_FT). Since the miniconda step prepends ${GITHUB_WORKSPACE} to + # whatever value is provided to environment-file: below and since ${SRCDIR_FT} is set + # to ${GITHUB_WORKSPACE}, the environment file used below is in fact the one in the + # feature branch. - name: Setup miniconda #uses: conda-incubator/setup-miniconda@v3.2.0 uses: conda-incubator/setup-miniconda@v3 @@ -350,7 +353,8 @@ jobs: auto-update-conda: true auto-activate-base: false activate-environment: mpas-ci-env - environment-file: ${{env.SRCDIR_FT}}/${{env.ufs_community}}/environment.yml + #environment-file: ${{env.SRCDIR_FT}}/${{env.ufs_community}}/environment.yml + environment-file: ${{env.ufs_community}}/environment.yml # - name: Cache conda environment # id: cache-conda From 1d1a75188cc90ba17fa9e7614188b1356ceea6dc Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 22:40:52 -0600 Subject: [PATCH 118/198] Try cacheing the conda environment. --- .github/workflows/run_mpas_stoch.yml | 56 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index fb881d4634..9945b72df7 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -218,6 +218,8 @@ jobs: ########################################################################################## # Download any data/files needed for MPAS runs. + # This is done for both branches since the files downloaded by the get_data.sh script may + # not be the same for the two branches. ########################################################################################## - name: Download MPAS static/IC/LBC files and UFS physics tables -- baseline branch run: | @@ -339,42 +341,40 @@ jobs: # Compare feature branch to baseline branch. ########################################################################################## - # Note that the comparison script used below (cmp_rt2bl.py) is the one in the feature - # branch. Thus, the environment file used in the miniconda setup should be the one in - # that branch (SRCDIR_FT). Since the miniconda step prepends ${GITHUB_WORKSPACE} to - # whatever value is provided to environment-file: below and since ${SRCDIR_FT} is set - # to ${GITHUB_WORKSPACE}, the environment file used below is in fact the one in the - # feature branch. +# # Note that the comparison script used below (cmp_rt2bl.py) is the one in the feature +# # branch. Thus, the environment file used in the miniconda setup should be the one in +# # that branch (SRCDIR_FT). Since the miniconda step prepends ${GITHUB_WORKSPACE} to +# # whatever value is provided to environment-file: below and since ${SRCDIR_FT} is set +# # to ${GITHUB_WORKSPACE}, the environment file used below is in fact the one in the +# # feature branch. +# - name: Setup miniconda +# uses: conda-incubator/setup-miniconda@v3 +# with: +# python-version: ${{env.py-version}} +# auto-update-conda: true +# auto-activate-base: false +# activate-environment: mpas-ci-env +# environment-file: ${{env.ufs_community}}/environment.yml + + - name: Cache conda environment + id: cache-conda + uses: actions/cache@v3 + with: + path: ${{ env.CONDA }}/envs + key: conda-${{ runner.os }}-${{ hashFiles(format('{0}/environment.yml', env.ufs_community)) }} + - name: Setup miniconda - #uses: conda-incubator/setup-miniconda@v3.2.0 uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{env.py-version}} auto-update-conda: true auto-activate-base: false activate-environment: mpas-ci-env - #environment-file: ${{env.SRCDIR_FT}}/${{env.ufs_community}}/environment.yml - environment-file: ${{env.ufs_community}}/environment.yml + #use-only-tar-bz2: true -# - name: Cache conda environment -# id: cache-conda -# uses: actions/cache@v3 -# with: -# path: ${{ env.CONDA }}/envs -# key: conda-${{ runner.os }}-${{ hashFiles(format('{0}/environment.yml', env.ufs_community)) }} -# -# - name: Setup miniconda -# uses: conda-incubator/setup-miniconda@v3 -# with: -# python-version: ${{env.py-version}} -# auto-update-conda: true -# auto-activate-base: false -# activate-environment: mpas-ci-env -# #use-only-tar-bz2: true -# -# - name: Create conda environment -# if: steps.cache-conda.outputs.cache-hit != 'true' -# run: conda env update --file ${SRCDIR_FT}/${{env.ufs_community}}/environment.yml --name mpas-ci-env + - name: Create conda environment + if: steps.cache-conda.outputs.cache-hit != 'true' + run: conda env update --file ${SRCDIR_FT}/${{env.ufs_community}}/environment.yml --name mpas-ci-env - name: Run comparison script From ad9059c9bca07cd5e27d099e903ce9a0a53f184c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 1 May 2026 22:55:30 -0600 Subject: [PATCH 119/198] Minor cleanup. --- .github/workflows/run_mpas_stoch.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9945b72df7..9c98e380ca 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -370,13 +370,11 @@ jobs: auto-update-conda: true auto-activate-base: false activate-environment: mpas-ci-env - #use-only-tar-bz2: true - name: Create conda environment if: steps.cache-conda.outputs.cache-hit != 'true' run: conda env update --file ${SRCDIR_FT}/${{env.ufs_community}}/environment.yml --name mpas-ci-env - - name: Run comparison script run: | cd ${SRCDIR_FT}/${ufs_community} From 6a8dd69d78e6935e8197482c7737b57f983d09d8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 00:25:17 -0600 Subject: [PATCH 120/198] Change the time-scale for the first SPPT pattern to 600 sec (10 minutes) so a change can be seen within the lenght of the forecast, which is 1 hour. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index cec17ce8ac..0445bac462 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -68,7 +68,8 @@ config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 - config_sppt_tau_1 = 21600 +! config_sppt_tau_1 = 21600 + config_sppt_tau_1 = 600 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 config_sppt_lscale_1 = 150000 From b4404ea3977c48920bc1126acc5ae415170c0668 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 00:26:52 -0600 Subject: [PATCH 121/198] Update deprecated settings. --- .github/workflows/run_mpas_stoch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9c98e380ca..0a38093f18 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -352,7 +352,7 @@ jobs: # with: # python-version: ${{env.py-version}} # auto-update-conda: true -# auto-activate-base: false +# auto-activate: false # activate-environment: mpas-ci-env # environment-file: ${{env.ufs_community}}/environment.yml @@ -368,7 +368,7 @@ jobs: with: python-version: ${{env.py-version}} auto-update-conda: true - auto-activate-base: false + auto-activate: false activate-environment: mpas-ci-env - name: Create conda environment From 7f08724e5f183036c84cd863cebad8e427eec36e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 00:38:56 -0600 Subject: [PATCH 122/198] Have the SPPT pattern change with every time step. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 0445bac462..e97cbc7b06 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -64,7 +64,8 @@ &nam_stochy do_sppt = true do_skeb = false - config_spptint = 60 +! config_spptint = 60 + config_spptint = 0 config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 From c5fe27f0193024db81577468bcb45323da215265 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 00:48:18 -0600 Subject: [PATCH 123/198] Explicitly set spptint to the same value as the time step. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index e97cbc7b06..18235d59f7 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -65,7 +65,8 @@ do_sppt = true do_skeb = false ! config_spptint = 60 - config_spptint = 0 +! config_spptint = 0 + config_spptint = 720 config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 From 4080bae8741694aaa9af5ad2abbbc8514cb4a292 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 00:55:17 -0600 Subject: [PATCH 124/198] Change timescale for SPPT pattern 1. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 18235d59f7..4431c8e2b7 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -71,7 +71,7 @@ config_sppt_2 = 0.0 config_sppt_3 = 0.0 ! config_sppt_tau_1 = 21600 - config_sppt_tau_1 = 600 + config_sppt_tau_1 = 3600 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 config_sppt_lscale_1 = 150000 From 7eb4f638de80a7d7cf0233cb5a0d81f9e7c292e6 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:00:28 -0600 Subject: [PATCH 125/198] Go back to original values. --- .../namelist.atmosphere | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 4431c8e2b7..a3315c8391 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -64,14 +64,15 @@ &nam_stochy do_sppt = true do_skeb = false -! config_spptint = 60 + config_spptint = 60 ! config_spptint = 0 - config_spptint = 720 +! config_spptint = 720 config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 -! config_sppt_tau_1 = 21600 - config_sppt_tau_1 = 3600 + config_sppt_tau_1 = 21600 +! config_sppt_tau_1 = 600 +! config_sppt_tau_1 = 3600 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 config_sppt_lscale_1 = 150000 From e3f5fc8cd306635de8ac6910ed2cfe99d8ff328e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:07:47 -0600 Subject: [PATCH 126/198] Increase forecast length to 6 hours. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- .../ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index a3315c8391..d1a7432f4f 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -2,7 +2,8 @@ config_time_integration_order = 2 config_dt = 720.0 config_start_time = '2023-03-10_15:00:00' - config_run_duration = '0_01:00:00' +# config_run_duration = '0_01:00:00' + config_run_duration = '0_06:00:00' config_split_dynamics_transport = true config_number_of_sub_steps = 4 config_dynamics_split_steps = 3 diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere index b076c1bc12..e8fec72782 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -13,7 +13,7 @@ + output_interval="01:00:00" > From d1e4f4675954e9eb24c55058cb792f3a72b9cc97 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:21:33 -0600 Subject: [PATCH 127/198] Bug fix. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index d1a7432f4f..9e310461ee 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -2,7 +2,7 @@ config_time_integration_order = 2 config_dt = 720.0 config_start_time = '2023-03-10_15:00:00' -# config_run_duration = '0_01:00:00' +! config_run_duration = '0_01:00:00' config_run_duration = '0_06:00:00' config_split_dynamics_transport = true config_number_of_sub_steps = 4 From 6b86b77bce6032ebd07b00f6435090787ab35643 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:29:37 -0600 Subject: [PATCH 128/198] Bug fix - change output interval of diag stream. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere index e8fec72782..4f19e3696b 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -21,7 +21,7 @@ + output_interval="01:00:00" > From 3cdae2de83da60a54a64229854d0efca6f1f8db5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:33:22 -0600 Subject: [PATCH 129/198] Change time scale of first SPPT pattern. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 9e310461ee..7e5a2acade 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -71,9 +71,10 @@ config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 - config_sppt_tau_1 = 21600 +! config_sppt_tau_1 = 21600 ! config_sppt_tau_1 = 600 ! config_sppt_tau_1 = 3600 + config_sppt_tau_1 = 10800 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 config_sppt_lscale_1 = 150000 From 15bb71fc4772f4b391e9c4bed144d45921d1743e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 01:42:41 -0600 Subject: [PATCH 130/198] Change timestep to 60sec. --- .../ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 7e5a2acade..f1bd705e28 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -1,6 +1,7 @@ &nhyd_model config_time_integration_order = 2 - config_dt = 720.0 +! config_dt = 720.0 + config_dt = 60.0 config_start_time = '2023-03-10_15:00:00' ! config_run_duration = '0_01:00:00' config_run_duration = '0_06:00:00' From 144994eb429d3a89a99d9756464f1cdcc2027f63 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 2 May 2026 11:45:19 -0600 Subject: [PATCH 131/198] Try different SPPT settings. --- .../namelist.atmosphere | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index f1bd705e28..23ff5b38d2 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -1,7 +1,7 @@ &nhyd_model config_time_integration_order = 2 -! config_dt = 720.0 - config_dt = 60.0 + config_dt = 720.0 +! config_dt = 60.0 config_start_time = '2023-03-10_15:00:00' ! config_run_duration = '0_01:00:00' config_run_duration = '0_06:00:00' @@ -66,8 +66,8 @@ &nam_stochy do_sppt = true do_skeb = false - config_spptint = 60 -! config_spptint = 0 +! config_spptint = 60 + config_spptint = 0 ! config_spptint = 720 config_sppt_1 = 0.8 config_sppt_2 = 0.0 @@ -78,7 +78,8 @@ config_sppt_tau_1 = 10800 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 - config_sppt_lscale_1 = 150000 + config_sppt_lscale_1 = 1500000 +! config_sppt_lscale_1 = 150000 config_sppt_lscale_2 = 1000000 config_sppt_lscale_3 = 2000000 config_sppt_logit = true From 2e3b6a482734cf270fba33426589a281bd12e89f Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 6 May 2026 00:18:10 -0400 Subject: [PATCH 132/198] Modifications to get make build to work on gaeac6. --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile b/Makefile index 354fcef069..7124e96fdc 100644 --- a/Makefile +++ b/Makefile @@ -484,6 +484,34 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) +intel-mpi-gaeac6: # BUILDTARGET for gaea C6 + ( $(MAKE) all \ + "FC_PARALLEL = ftn" \ + "CC_PARALLEL = cc" \ + "CXX_PARALLEL = mpiicpc" \ + "FC_SERIAL = ifort" \ + "CC_SERIAL = cc" \ + "CXX_SERIAL = icpc" \ + "FFLAGS_PROMOTION = -real-size 64" \ + "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \ + "CFLAGS_OPT = -O3" \ + "CXXFLAGS_OPT = -O3" \ + "LDFLAGS_OPT = -O3" \ + "FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \ + "CFLAGS_DEBUG = -g -traceback" \ + "CXXFLAGS_DEBUG = -g -traceback" \ + "LDFLAGS_DEBUG = -g -fpe0 -traceback" \ + "FFLAGS_OMP = -qopenmp" \ + "CFLAGS_OMP = -qopenmp" \ + "PICFLAG = -fpic" \ + "BUILD_TARGET = $(@)" \ + "CORE = $(CORE)" \ + "DEBUG = $(DEBUG)" \ + "USE_PAPI = $(USE_PAPI)" \ + "OPENMP = $(OPENMP)" \ + "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ + "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) + intel-llvm-mpi: # BUILDTARGET Intel LLVM compiler suite with Intel MPI library ( $(MAKE) all \ "FC_PARALLEL = mpiifx" \ From cbd79107851cc55b151ad4bb68eb655778fe2cff Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 14:42:24 -0600 Subject: [PATCH 133/198] Clean up the streams.atmosphere file. --- .../streams.atmosphere | 104 +++++++++++------- 1 file changed, 66 insertions(+), 38 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere index 4f19e3696b..52dea6d6e9 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -1,59 +1,87 @@ + + + + input_interval="initial_only" + /> + + + + + output_interval="1_00:00:00" + /> + + + + + + - - + output_interval="01:00:00"> + - - - - - - - + output_interval="01:00:00"> + - - - - - - From b48b17d321ccbfe9711a2a422d3ee41277cacf06 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 14:52:12 -0600 Subject: [PATCH 134/198] Update namelist for stochastic physics run with the one that was tested on Hera. --- .../namelist.atmosphere | 104 ++++++++++++------ 1 file changed, 73 insertions(+), 31 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 23ff5b38d2..face9cdf01 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -1,15 +1,14 @@ &nhyd_model config_time_integration_order = 2 config_dt = 720.0 -! config_dt = 60.0 config_start_time = '2023-03-10_15:00:00' -! config_run_duration = '0_01:00:00' config_run_duration = '0_06:00:00' config_split_dynamics_transport = true - config_number_of_sub_steps = 4 + config_number_of_sub_steps = 2 config_dynamics_split_steps = 3 config_horiz_mixing = '2d_smagorinsky' config_visc4_2dsmag = 0.05 + config_scalar_eddy_mix = false config_scalar_advection = true config_monotonic = true config_coef_3rd_order = 0.25 @@ -17,21 +16,19 @@ config_smdiv = 0.1 / &damping - config_mpas_cam_coef = 2.0 - config_rayleigh_damp_u = true - config_zd = 16000.0 + config_zd = 22000.0 config_xnutr = 0.2 - config_number_cam_damping_levels = 8 / &limited_area config_apply_lbcs = true + config_lbc_w = 'nearest' / &io config_pio_num_iotasks = 0 config_pio_stride = 1 / &decomposition - config_block_decomp_file_prefix = 'graph.info.part.' + config_block_decomp_file_prefix = 'ci_conus_120km.graph.info.part.' / &restart config_do_restart = false @@ -40,53 +37,98 @@ config_print_global_minmax_vel = true config_print_detailed_minmax_vel = false / -&IAU - config_IAU_option = 'off' - config_IAU_window_length_s = 21600.0 +&iau + config_iau_option = 'off' + config_iau_window_length_s = 21600.0 / &physics config_sst_update = false + config_gvf_update = true config_sstdiurn_update = false - config_frac_seaice = true config_deepsoiltemp_update = false - config_radtlw_interval = '00:15:00' - config_radtsw_interval = '00:15:00' + config_radtlw_interval = '00:30:00' + config_radtsw_interval = '00:30:00' config_bucket_update = 'none' - config_physics_suite = 'hrrrv5' - num_soil_layers = 9 - config_mynn_mixnumcon = 0 + config_physics_suite = 'convection_permitting' + config_microp_scheme = 'mp_tempo' +/ +&soundings + config_sounding_interval = 'none' +/ +&physics_lsm_noahmp + config_noahmp_iopt_dveg = 4 + config_noahmp_iopt_crs = 1 + config_noahmp_iopt_btr = 1 + config_noahmp_iopt_runsrf = 3 + config_noahmp_iopt_runsub = 3 + config_noahmp_iopt_sfc = 1 + config_noahmp_iopt_frz = 1 + config_noahmp_iopt_inf = 1 + config_noahmp_iopt_rad = 3 + config_noahmp_iopt_alb = 1 + config_noahmp_iopt_snf = 1 + config_noahmp_iopt_tksno = 1 + config_noahmp_iopt_tbot = 2 + config_noahmp_iopt_stc = 1 + config_noahmp_iopt_gla = 1 + config_noahmp_iopt_rsf = 4 + config_noahmp_iopt_soil = 1 + config_noahmp_iopt_pedo = 1 + config_noahmp_iopt_crop = 0 + config_noahmp_iopt_irr = 0 + config_noahmp_iopt_irrm = 0 + config_noahmp_iopt_infdv = 1 + config_noahmp_iopt_tdrn = 0 / &physics_mp_tempo - config_tempo_aerosolaware = true config_tempo_hailaware = true / -&soundings - config_sounding_interval = 'none' +&chemistry + rwc_emis_scale_factor = 1.0 + num_chem = 0 + kanthro = 1 + kwildfire = 1 + kbiogenic = 1 + kvolcanic = 1 + kreswoodcomb = 1 + hwp_method = 1 + hwp_alpha = 1.0 + bb_input_prevh = 24 + bb_beta = 1 + wetdep_ls_opt = 0 + wetdep_ls_alpha = 0.0 + plumerise_opt = 0 + plume_wind_eff = 0 + plume_alpha = 0.0 + bb_qv_scale_factor = 1.0 + ebb_dcycle = 0 + calc_bb_emis_online = false + bb_emis_scale_factor = 1.0 + drydep_opt = 0 + pm_settling = 0 + dust_alpha = 1.0 + dust_gamma = 1.0 + dust_moist_correction = 1.0 + dust_drylimit_factor = 1.0 / &nam_stochy do_sppt = true do_skeb = false -! config_spptint = 60 config_spptint = 0 -! config_spptint = 720 config_sppt_1 = 0.8 config_sppt_2 = 0.0 config_sppt_3 = 0.0 -! config_sppt_tau_1 = 21600 -! config_sppt_tau_1 = 600 -! config_sppt_tau_1 = 3600 - config_sppt_tau_1 = 10800 + config_sppt_tau_1 = 21600 config_sppt_tau_2 = 86400 config_sppt_tau_3 = 21600 - config_sppt_lscale_1 = 1500000 -! config_sppt_lscale_1 = 150000 + config_sppt_lscale_1 = 450000 config_sppt_lscale_2 = 1000000 config_sppt_lscale_3 = 2000000 config_sppt_logit = true config_sppt_sfclimit = true - config_iseed_sppt1 = 3 - config_iseed_sppt2 = 0 - config_iseed_sppt3 = 0 + config_iseed_sppt1 = '2026010112001' + config_iseed_sppt2 = '0' + config_iseed_sppt3 = '0' config_sppt_hgt_top1 = 15000 config_sppt_hgt_top2 = 27000 config_stochini = false From 531b5fbaf5d9241e47ca444c057b561f140ebb23 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 16:58:41 -0600 Subject: [PATCH 135/198] Change integration time to only 1 hour but still maintain 6 output times (not including initial output) that are 12 minutes apart. --- .../namelist.atmosphere | 10 +++++----- .../streams.atmosphere | 11 ++--------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index face9cdf01..852eb787a8 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -2,7 +2,7 @@ config_time_integration_order = 2 config_dt = 720.0 config_start_time = '2023-03-10_15:00:00' - config_run_duration = '0_06:00:00' + config_run_duration = '0_01:00:00' config_split_dynamics_transport = true config_number_of_sub_steps = 2 config_dynamics_split_steps = 3 @@ -28,7 +28,7 @@ config_pio_stride = 1 / &decomposition - config_block_decomp_file_prefix = 'ci_conus_120km.graph.info.part.' + config_block_decomp_file_prefix = 'graph.info.part.' / &restart config_do_restart = false @@ -37,9 +37,9 @@ config_print_global_minmax_vel = true config_print_detailed_minmax_vel = false / -&iau - config_iau_option = 'off' - config_iau_window_length_s = 21600.0 +&IAU + config_IAU_option = 'off' + config_IAU_window_length_s = 21600. / &physics config_sst_update = false diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere index 52dea6d6e9..e5d3b0bd81 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -44,13 +44,6 @@ Notes on xml attributes used in the input stream definition(s) below: packages="limited_area" /> - - + output_interval="00:12:00"> + output_interval="00:12:00"> From e613d69632d3a953754a146b0326928d85485262 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:05:10 -0600 Subject: [PATCH 136/198] Rename directory to say "convection_permitting" instead of "hrrrv5" (i.e. correct the name of the physics suite in the name of the directory). --- .../namelist.atmosphere | 0 .../stream_list.atmosphere.diagnostics | 0 .../stream_list.atmosphere.output | 0 .../stream_list.atmosphere.surface | 0 .../streams.atmosphere | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename testing_and_setup/ufs-community/cases/{ufscommunity.hrrrv5.gfs.winter.stoch => ufscommunity.convection_permitting.gfs.winter.stoch}/namelist.atmosphere (100%) rename testing_and_setup/ufs-community/cases/{ufscommunity.hrrrv5.gfs.winter.stoch => ufscommunity.convection_permitting.gfs.winter.stoch}/stream_list.atmosphere.diagnostics (100%) rename testing_and_setup/ufs-community/cases/{ufscommunity.hrrrv5.gfs.winter.stoch => ufscommunity.convection_permitting.gfs.winter.stoch}/stream_list.atmosphere.output (100%) rename testing_and_setup/ufs-community/cases/{ufscommunity.hrrrv5.gfs.winter.stoch => ufscommunity.convection_permitting.gfs.winter.stoch}/stream_list.atmosphere.surface (100%) rename testing_and_setup/ufs-community/cases/{ufscommunity.hrrrv5.gfs.winter.stoch => ufscommunity.convection_permitting.gfs.winter.stoch}/streams.atmosphere (100%) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere similarity index 100% rename from testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere rename to testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics similarity index 100% rename from testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics rename to testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output similarity index 100% rename from testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output rename to testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.surface similarity index 100% rename from testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface rename to testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.surface diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/streams.atmosphere similarity index 100% rename from testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere rename to testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/streams.atmosphere From bb2ead23759ecaf52b29999af526ac457cdaed62 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:21:06 -0600 Subject: [PATCH 137/198] Correct the name of the suite being used in the CI test for stochastic physics; clean up comments in the CI test workflow file. --- .github/workflows/run_mpas_stoch.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 0a38093f18..134a462064 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -41,7 +41,7 @@ jobs: # season: [summer, winter] season: [winter] build-type: [Release] - physics: [hrrrv5] + physics: [convection_permitting] exclude: - ic_source: gfs season: summer @@ -248,12 +248,11 @@ jobs: #cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # # Instead, copy the MPAS configuration files from the corresponding directory for the - # feature branch. Also, since the namelist file that the baseline branch cannot - # contain the stochastic physics namelist (called "nam_stochy", we specifically copy - # in a version of the namelist file without that namelist. + # feature branch. cp ${SRCDIR_FT}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . - # The following command takes the namelist.atmosphere file copied into the run directory - # above (and which contains the nam_stochy namelist) and removes that namelist from it. + # Since the namelist file that the baseline branch will use cannot yet contain the + # stochastic physics namelist (called "nam_stochy"), we use the following command to + # remove that namelist from the namelist file. sed -i '/^[[:space:]]*&nam_stochy/,/^[[:space:]]*\//d' namelist.atmosphere # # Create symlinks in the run directory. From 36f8347cade18fbfb32fd7b854910c89753352a3 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:23:09 -0600 Subject: [PATCH 138/198] Remove fail-safes for the run tasks in the CI testing workflow for stochastic physics. --- .github/workflows/run_mpas_stoch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 134a462064..d419a2d9c5 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -326,14 +326,14 @@ jobs: run: | cd ${RUNDIR_BL} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true + mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l - name: Run MPAS -- feature branch run: | cd ${RUNDIR_FT} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true + mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l ########################################################################################## From 3efd1d7b7474b196c0e7f6e79ed14318ece04e1a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:41:55 -0600 Subject: [PATCH 139/198] Clean up comments in CI test workflow script. --- .github/workflows/run_mpas_stoch.yml | 35 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index d419a2d9c5..5f4f3bf28b 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -337,23 +337,24 @@ jobs: pwd && ls -l ########################################################################################## - # Compare feature branch to baseline branch. + # Install the conda environment needed for comparing run output from the baseline and + # feature branches. ########################################################################################## -# # Note that the comparison script used below (cmp_rt2bl.py) is the one in the feature -# # branch. Thus, the environment file used in the miniconda setup should be the one in -# # that branch (SRCDIR_FT). Since the miniconda step prepends ${GITHUB_WORKSPACE} to -# # whatever value is provided to environment-file: below and since ${SRCDIR_FT} is set -# # to ${GITHUB_WORKSPACE}, the environment file used below is in fact the one in the -# # feature branch. -# - name: Setup miniconda -# uses: conda-incubator/setup-miniconda@v3 -# with: -# python-version: ${{env.py-version}} -# auto-update-conda: true -# auto-activate: false -# activate-environment: mpas-ci-env -# environment-file: ${{env.ufs_community}}/environment.yml + # The following three tasks are to avoid rebuilding the conda environment on every CI + # run, which can take a long time. Instead of rebuilding the conda environment from + # scratch on every CI run, the environment is cached and only recreated when environment.yml + # actually changes. Descriptions of the three tasks are as follows: + # + # 1) Cache conda environment + # Checks whether a cached copy of the environment already exists, keyed on the hash + # of the environment.yml file. + # 2) Setup miniconda + # Installs conda, but with no "environment-file:" field, so it does NOT build the + # environment. + # 3) Create conda environment + # Only runs on a cache miss (which can happen in step 1 above), and builds the + # environment via "conda env update". - name: Cache conda environment id: cache-conda @@ -374,6 +375,10 @@ jobs: if: steps.cache-conda.outputs.cache-hit != 'true' run: conda env update --file ${SRCDIR_FT}/${{env.ufs_community}}/environment.yml --name mpas-ci-env + ########################################################################################## + # Compare output from feature branch run to that from baseline branch run. + ########################################################################################## + - name: Run comparison script run: | cd ${SRCDIR_FT}/${ufs_community} From 22616fef5ec3ab96060de868c3163b0beec9fc07 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:43:37 -0600 Subject: [PATCH 140/198] Remove the chemistry namelist from the namelist file. --- .../namelist.atmosphere | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere index 852eb787a8..1fe6227b83 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere @@ -83,34 +83,6 @@ &physics_mp_tempo config_tempo_hailaware = true / -&chemistry - rwc_emis_scale_factor = 1.0 - num_chem = 0 - kanthro = 1 - kwildfire = 1 - kbiogenic = 1 - kvolcanic = 1 - kreswoodcomb = 1 - hwp_method = 1 - hwp_alpha = 1.0 - bb_input_prevh = 24 - bb_beta = 1 - wetdep_ls_opt = 0 - wetdep_ls_alpha = 0.0 - plumerise_opt = 0 - plume_wind_eff = 0 - plume_alpha = 0.0 - bb_qv_scale_factor = 1.0 - ebb_dcycle = 0 - calc_bb_emis_online = false - bb_emis_scale_factor = 1.0 - drydep_opt = 0 - pm_settling = 0 - dust_alpha = 1.0 - dust_gamma = 1.0 - dust_moist_correction = 1.0 - dust_drylimit_factor = 1.0 -/ &nam_stochy do_sppt = true do_skeb = false From c78dffed6d68f11917966f5ea7a701afc0fb8015 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 17:49:34 -0600 Subject: [PATCH 141/198] Enable automatic running of all CI tests (i.e. run on branch push to github). --- .github/workflows/build_mpas.yml | 3 +-- .github/workflows/build_mpas_intel.yml | 3 +-- .github/workflows/run_mpas.yml | 3 +-- .github/workflows/run_mpas_hrrr.yml | 3 +-- .github/workflows/run_mpas_stoch.yml | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index f8aa32125c..496d97af7e 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,7 +1,6 @@ name: Build (GNU) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: workflow_dispatch +on: [pull_request,workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index 7911d33313..c43974b519 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,7 +1,6 @@ name: Build (Intel) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: workflow_dispatch +on: [pull_request,workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index fbf48ef208..a069feb107 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone (NOAA GSL tests) -#on: [push, pull_request, workflow_dispatch] -on: 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 9ae23038ce..3cc679ad75 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -#on: [push, pull_request, workflow_dispatch] -on: 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 5f4f3bf28b..5909270b46 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone with Stochastic Physics (NOAA GSL HRRRv5 tests) on: [push, pull_request, workflow_dispatch] -#on: workflow_dispatch ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From 148ad22ea73a1de1b233eec4138b4524fe702c79 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 14 May 2026 21:30:48 -0600 Subject: [PATCH 142/198] Add stochastic pattern on both the MPAS mesh and the gaussian grid to the list of variables to output in the history*.nc files. --- .../stream_list.atmosphere.output | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output index 9c151a488d..41b074374b 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output @@ -54,6 +54,8 @@ vorticity ke uReconstructZonal uReconstructMeridional +stoch_pattern_sppt +stoch_pattern_gg ertel_pv u_pv v_pv @@ -121,6 +123,7 @@ ivgtyp isltyp lai sfc_albedo +dzs cldfrac_bl snowc snownc From f4dc6523ca49b39db17455179724795d41c45b66 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2026 15:38:28 +0000 Subject: [PATCH 143/198] 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 144/198] 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 145/198] 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 146/198] 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 147/198] 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 148/198] 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 149/198] 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 150/198] 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 151/198] 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 152/198] 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 153/198] 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 From 51a25041d5d436ee615c8fa80ad5604ce4874f27 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 15 May 2026 16:53:37 -0600 Subject: [PATCH 154/198] Turn off running of most CI tests after push except for the stoch test. --- .github/workflows/build_mpas.yml | 3 ++- .github/workflows/build_mpas_intel.yml | 3 ++- .github/workflows/run_mpas.yml | 3 ++- .github/workflows/run_mpas_hrrr.yml | 3 ++- .github/workflows/run_mpas_stoch.yml | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 496d97af7e..9566786e9f 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,6 +1,7 @@ name: Build (GNU) MPAS Standalone -on: [pull_request,workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: [workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index c43974b519..d903603c1c 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,6 +1,7 @@ name: Build (Intel) MPAS Standalone -on: [pull_request,workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: [workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index a069feb107..f0de83858d 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,6 +1,7 @@ name: Run MPAS Standalone (NOAA GSL tests) -on: [push, pull_request, workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: [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..f3713b605f 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,6 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -on: [push, pull_request, workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: [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 5909270b46..662d48192a 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -1,6 +1,7 @@ name: Run MPAS Standalone with Stochastic Physics (NOAA GSL HRRRv5 tests) on: [push, pull_request, workflow_dispatch] +#on: [workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From fffc50ac81b67ed2bcd8858353a59a75792e9177 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 15 May 2026 16:58:01 -0600 Subject: [PATCH 155/198] Make the "Run MPAS" tasks for both the baseline and feature branch always succeed. --- .github/workflows/run_mpas_stoch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 662d48192a..c97e589e6a 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -326,14 +326,14 @@ jobs: run: | cd ${RUNDIR_BL} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model + mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l - name: Run MPAS -- feature branch run: | cd ${RUNDIR_FT} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model + mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true pwd && ls -l ########################################################################################## From 1162b34180910b1711367f13c422e0cb948b9947 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 19 May 2026 18:35:58 -0600 Subject: [PATCH 156/198] Add flag that allows only a subset of the run directories to be copied into the artifact (useful when the artifact is too large, e.g. for downloading in a reasonable time, if all files in the run directory are included). --- .github/workflows/run_mpas_stoch.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index c97e589e6a..9a29be5a1f 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -67,8 +67,15 @@ jobs: runner_ROOT: /__w PNETCDF: /opt/pnetcdf ufs_community: testing_and_setup/ufs-community - # Github artifact name. + # GitHub artifact name. artifact: artifact-${{matrix.f-compiler}}-${{matrix.build-type}}-${{matrix.ic_source}}-${{matrix.season}}-${{matrix.physics}}-stoch + # Set to 'true' to copy only a subset of the files in run directories + # into the GitHub artifact, e.g. only the history*.nc and diag*.nc + # files instead of all the files. This is useful when the full run + # directory is too large and would take a long time to download from + # GitHub. + #artifact_incl_only_rundir_subset: 'false' + artifact_incl_only_rundir_subset: 'true' # Workflow steps steps: @@ -116,7 +123,7 @@ jobs: echo "RUNDIR_BL=${runner_ROOT}/run_bl" >> $GITHUB_ENV echo "RUNDIR_FT=${runner_ROOT}/run_ft" >> $GITHUB_ENV # - # Set the absolute path to the Github artifact. + # Set the absolute path to the GitHub artifact. # echo "ARTIFACT_DIR=${runner_ROOT}/${artifact}" >> $GITHUB_ENV @@ -395,12 +402,21 @@ jobs: datadir="${ARTIFACT_DIR}/data_bl" mkdir -p ${datadir} cd ${RUNDIR_BL} - cp ./* ${datadir} + if [ "${{ env.artifact_incl_only_rundir_subset }}" = "true" ]; then + #cp history*.nc diag*.nc ${datadir}/ || true + cp namelist.atmosphere history*.nc diag*.nc log.atmosphere.* ${datadir}/ || true + else + cp ./* ${datadir} + fi # datadir="${ARTIFACT_DIR}/data_ft" mkdir -p ${datadir} cd ${RUNDIR_FT} - cp ./* ${datadir} + if [ "${{ env.artifact_incl_only_rundir_subset }}" = "true" ]; then + cp namelist.atmosphere history*.nc diag*.nc log.atmosphere.* ${datadir}/ || true + else + cp ./* ${datadir} + fi - name: Upload MPAS runs as GitHub artifact uses: actions/upload-artifact@v4 From 580c7b2ab7032793da3d79ca87e810fe7b457b1a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 19 May 2026 19:28:34 -0600 Subject: [PATCH 157/198] Bug fix (hopefully) to the "Run MPAS -- baseline branch" failing. --- .github/workflows/run_mpas_stoch.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9a29be5a1f..36e9fcf1cb 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -18,7 +18,7 @@ on: [push, pull_request, workflow_dispatch] # - Run MPAS using baseline codebase/configuration. # - Run MPAS using feature branch. # - Compare results. -# - Save output files to GitHub artifact (for comparision w/ inline/standaloen results) +# - Save output files to GitHub artifact (for comparison w/ inline/standalone results) # # Comments: # - The test build/run configurations matrix is described below. @@ -86,7 +86,7 @@ jobs: run: | # # Define some relative paths. These are with respect to the root directory of the - # MPAS-Model clone (which may be SRCDIR_BL or SRCDIR_RF). + # MPAS-Model clone (which may be SRCDIR_BL or SRCDIR_FT). # # The wrf_phys_tables directory contains physics tables and other files specific to # WRF physics. @@ -261,6 +261,10 @@ jobs: # stochastic physics namelist (called "nam_stochy"), we use the following command to # remove that namelist from the namelist file. sed -i '/^[[:space:]]*&nam_stochy/,/^[[:space:]]*\//d' namelist.atmosphere + # Also, the stream_list.* files cannot contain any variables with the string "stoch" + # in them (because we're running with stochastic physics disabled), so remove all + # such variables from the stream_list.* files. + sed -i '/stoch/d' stream_list.* # # Create symlinks in the run directory. # From 89553e8f67ed37a491fea899b149b3afdb905094 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 20 May 2026 02:38:12 -0600 Subject: [PATCH 158/198] Dustin's recommended modifications for dealing with tendency names. --- .../dynamics/mpas_atm_time_integration.F | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index d49d58d1ea..cec7fe33d8 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -32,6 +32,7 @@ module atm_time_integration use mpas_atmphys_todynamics use mpas_atmphys_utilities use mpas_stochastic_physics, only : stochastic_physics_pattern_apply, dosppt + use mpas_stochastic_physics, only : tend_names #endif use mpas_atm_boundaries, only : nSpecZone, nRelaxZone, nBdyZone, mpas_atm_get_bdy_state, mpas_atm_get_bdy_tend ! regional_MPAS addition @@ -881,7 +882,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. @@ -1082,12 +1082,8 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) 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" if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, 4, tend_names, ierr) + call stochastic_physics_pattern_apply(domain, tend_names(1:4), ierr) endif call physics_get_tend( block, mesh, state, diag, tend, tend_physics, & @@ -1097,10 +1093,8 @@ subroutine atm_srk3(domain, dt, itimestep, 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" if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, 1, tend_names, ierr) + call stochastic_physics_pattern_apply(domain, tend_names(5), ierr) endif #else #ifndef MPAS_CAM_DYCORE From 47def074369b4fbf874d51acd1ca3b8a737710da Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 20 May 2026 02:38:58 -0600 Subject: [PATCH 159/198] Update hash of stochastic_physics. --- 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 2f6eace83f..2b71d4a1b2 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 2f6eace83f662db2ee16cad8f831c012e7be92f5 +Subproject commit 2b71d4a1b214a222b233ac66e6c4883c3fd4b7e6 From b4e817d3aa69b3d72b449e463d3ee4b21dd89067 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 20 May 2026 20:53:37 -0600 Subject: [PATCH 160/198] Rearrange order of variables so the stream_list files are more similar to the ones in ufscommunity.convection_permitting.gfs.winter (without the .stoch at the end). --- .../stream_list.atmosphere.diagnostics | 26 +++++++++---------- .../stream_list.atmosphere.output | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics index 048ec8b9d6..5c32a8a1cf 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.diagnostics @@ -1,5 +1,18 @@ initial_time xtime +olrtoa +rainc +rainnc +refl10cm +refl10cm_max +refl10cm_1km +refl10cm_1km_max +precipw +u10 +v10 +q2 +t2m +th2m Time snowncv rainncv @@ -77,19 +90,6 @@ t_iso_levels z_isobaric z_iso_levels meanT_500_300 -olrtoa -rainc -rainnc -refl10cm -refl10cm_max -refl10cm_1km -refl10cm_1km_max -precipw -u10 -v10 -q2 -t2m -th2m cape cin lcl diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output index 41b074374b..6054cba7d4 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/stream_list.atmosphere.output @@ -61,7 +61,6 @@ u_pv v_pv theta_pv vort_pv -iLev_DT depv_dt_lw depv_dt_sw depv_dt_bl @@ -73,6 +72,7 @@ depv_dt_diab depv_dt_fric depv_dt_diab_pv depv_dt_fric_pv +iLev_DT i_rainnc rainnc precipw From b8407705a48d50a9a61a710d8b963bdd58349de4 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 07:06:17 -0600 Subject: [PATCH 161/198] Bug fix to match actual argument to dummy argument. --- src/core_atmosphere/dynamics/mpas_atm_time_integration.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F index cec7fe33d8..b7de28e22f 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -1094,7 +1094,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) ! apply random perturbation pattern to the tendency if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, tend_names(5), ierr) + call stochastic_physics_pattern_apply(domain, tend_names(5:5), ierr) endif #else #ifndef MPAS_CAM_DYCORE From a538b2b8149b8649dcea2b3a1478a5a76eaa7003 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 07:06:41 -0600 Subject: [PATCH 162/198] Update hash of stochastic_physics. --- 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 2b71d4a1b2..0130d1120d 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 2b71d4a1b214a222b233ac66e6c4883c3fd4b7e6 +Subproject commit 0130d1120d4adcf01692dc5fd304864a8a5fa23d From c4960a0bb8b04398bf36cb4c66fc300a6e5a3921 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 08:04:35 -0600 Subject: [PATCH 163/198] Remove setting of microphysics scheme to TEMPO from namelist file for CI testing of convection_permitting suite since the latter uses the Thompson MP scheme. Also, remove the physics_lsm_noahmp namelist since the convection_permitting scheme doesn't need it (it uses the noah lsm, not noahmp). --- .../namelist.atmosphere | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere index 1fe6227b83..d75d2e09b3 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere @@ -50,36 +50,10 @@ config_radtsw_interval = '00:30:00' config_bucket_update = 'none' config_physics_suite = 'convection_permitting' - config_microp_scheme = 'mp_tempo' / &soundings config_sounding_interval = 'none' / -&physics_lsm_noahmp - config_noahmp_iopt_dveg = 4 - config_noahmp_iopt_crs = 1 - config_noahmp_iopt_btr = 1 - config_noahmp_iopt_runsrf = 3 - config_noahmp_iopt_runsub = 3 - config_noahmp_iopt_sfc = 1 - config_noahmp_iopt_frz = 1 - config_noahmp_iopt_inf = 1 - config_noahmp_iopt_rad = 3 - config_noahmp_iopt_alb = 1 - config_noahmp_iopt_snf = 1 - config_noahmp_iopt_tksno = 1 - config_noahmp_iopt_tbot = 2 - config_noahmp_iopt_stc = 1 - config_noahmp_iopt_gla = 1 - config_noahmp_iopt_rsf = 4 - config_noahmp_iopt_soil = 1 - config_noahmp_iopt_pedo = 1 - config_noahmp_iopt_crop = 0 - config_noahmp_iopt_irr = 0 - config_noahmp_iopt_irrm = 0 - config_noahmp_iopt_infdv = 1 - config_noahmp_iopt_tdrn = 0 -/ &physics_mp_tempo config_tempo_hailaware = true / From 5204bf2df1fd83d284caf777d3833fe4bd8fdebf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 08:09:37 -0600 Subject: [PATCH 164/198] Add hrrrv5 as a second suite to test with stochastic physics enabled. --- .github/workflows/run_mpas_stoch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 36e9fcf1cb..9a8c015bb5 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -41,7 +41,7 @@ jobs: # season: [summer, winter] season: [winter] build-type: [Release] - physics: [convection_permitting] + physics: [convection_permitting,hrrrv5 exclude: - ic_source: gfs season: summer From c8e0a1f6daf40ae2d9d30c8b365863a5055968ae Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 09:05:10 -0600 Subject: [PATCH 165/198] Enable CI testing on push. --- .github/workflows/build_mpas.yml | 4 ++-- .github/workflows/build_mpas_intel.yml | 4 ++-- .github/workflows/run_mpas.yml | 4 ++-- .github/workflows/run_mpas_hrrr.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 9566786e9f..8130fc8f78 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,7 +1,7 @@ name: Build (GNU) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: [workflow_dispatch] +on: [pull_request,workflow_dispatch] +#on: [workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index d903603c1c..ca022183e8 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,7 +1,7 @@ name: Build (Intel) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: [workflow_dispatch] +on: [pull_request,workflow_dispatch] +#on: [workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index f0de83858d..0ca604001e 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL tests) -#on: [push, pull_request, workflow_dispatch] -on: [workflow_dispatch] +on: [push, pull_request, workflow_dispatch] +#on: [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 f3713b605f..27a21f369e 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -#on: [push, pull_request, workflow_dispatch] -on: [workflow_dispatch] +on: [push, pull_request, workflow_dispatch] +#on: [workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From ecfa2729a2edf9bf12dccc68a678493d107039fb Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 09:21:01 -0600 Subject: [PATCH 166/198] Update hashes of submodules. --- src/core_atmosphere/physics/physics_noaa/MYNN-EDMF | 2 +- src/core_atmosphere/physics/physics_noaa/MYNN-SFC | 2 +- src/core_atmosphere/physics/physics_noaa/RUCLSM | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF index c6d08709e8..c942418a47 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF @@ -1 +1 @@ -Subproject commit c6d08709e83fbc6245e91a65600fd78c7219f1ee +Subproject commit c942418a47a29dee09b51b377286da6bb25160e3 diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC index b66187f54a..9af3bb9ac3 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC @@ -1 +1 @@ -Subproject commit b66187f54a0c169e36592552634867474e603ac0 +Subproject commit 9af3bb9ac3bc2bc7d61a22d0483e7090183dfe8a diff --git a/src/core_atmosphere/physics/physics_noaa/RUCLSM b/src/core_atmosphere/physics/physics_noaa/RUCLSM index 8c9f1a8bb2..74f7b5d412 160000 --- a/src/core_atmosphere/physics/physics_noaa/RUCLSM +++ b/src/core_atmosphere/physics/physics_noaa/RUCLSM @@ -1 +1 @@ -Subproject commit 8c9f1a8bb2cfb5fb8d115440fced566361fe0f20 +Subproject commit 74f7b5d41276540864b3e826155d20d5220d3685 From 96cc4cbd482047817bfacd3c8e0e43599e588554 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 09:46:08 -0600 Subject: [PATCH 167/198] Update hashes of submodules. --- src/core_atmosphere/physics/physics_noaa/MYNN-EDMF | 2 +- src/core_atmosphere/physics/physics_noaa/MYNN-SFC | 2 +- src/core_atmosphere/physics/physics_noaa/RUCLSM | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF index c942418a47..c6d08709e8 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-EDMF @@ -1 +1 @@ -Subproject commit c942418a47a29dee09b51b377286da6bb25160e3 +Subproject commit c6d08709e83fbc6245e91a65600fd78c7219f1ee diff --git a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC index 9af3bb9ac3..b66187f54a 160000 --- a/src/core_atmosphere/physics/physics_noaa/MYNN-SFC +++ b/src/core_atmosphere/physics/physics_noaa/MYNN-SFC @@ -1 +1 @@ -Subproject commit 9af3bb9ac3bc2bc7d61a22d0483e7090183dfe8a +Subproject commit b66187f54a0c169e36592552634867474e603ac0 diff --git a/src/core_atmosphere/physics/physics_noaa/RUCLSM b/src/core_atmosphere/physics/physics_noaa/RUCLSM index 74f7b5d412..8c9f1a8bb2 160000 --- a/src/core_atmosphere/physics/physics_noaa/RUCLSM +++ b/src/core_atmosphere/physics/physics_noaa/RUCLSM @@ -1 +1 @@ -Subproject commit 74f7b5d41276540864b3e826155d20d5220d3685 +Subproject commit 8c9f1a8bb2cfb5fb8d115440fced566361fe0f20 From 88540a6aaea6cfeb91e05e0fb1499ce5f14d22d9 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 10:01:34 -0600 Subject: [PATCH 168/198] Bug fix. --- .github/workflows/run_mpas_stoch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 9a8c015bb5..f42bfbb113 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -41,7 +41,7 @@ jobs: # season: [summer, winter] season: [winter] build-type: [Release] - physics: [convection_permitting,hrrrv5 + physics: [convection_permitting,hrrrv5] exclude: - ic_source: gfs season: summer From c1d47016c422f38b6acd705d1cb3dfea9bd3a12d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 10:04:14 -0600 Subject: [PATCH 169/198] Temporarily turn off original set of CI tests. --- .github/workflows/build_mpas.yml | 4 ++-- .github/workflows/build_mpas_intel.yml | 4 ++-- .github/workflows/run_mpas.yml | 4 ++-- .github/workflows/run_mpas_hrrr.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 8130fc8f78..9566786e9f 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,7 +1,7 @@ name: Build (GNU) MPAS Standalone -on: [pull_request,workflow_dispatch] -#on: [workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: [workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index ca022183e8..d903603c1c 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,7 +1,7 @@ name: Build (Intel) MPAS Standalone -on: [pull_request,workflow_dispatch] -#on: [workflow_dispatch] +#on: [pull_request,workflow_dispatch] +on: [workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index 5fe61ab7c6..55ee97824b 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL tests) -on: [push, pull_request, workflow_dispatch] -#on: [workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: [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 821f5f8d2d..e601685fba 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -on: [push, pull_request, workflow_dispatch] -#on: [workflow_dispatch] +#on: [push, pull_request, workflow_dispatch] +on: [workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From 801970b9fc5e85f198add7e9107b2acda4de66d4 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 10:22:13 -0600 Subject: [PATCH 170/198] Add new directory containing setup files for testing stochastic physics with the hrrrv5 physics suite. --- .../namelist.atmosphere | 84 +++++++++++ .../namelist.atmosphere.orig | 62 ++++++++ .../stream_list.atmosphere.diagnostics | 141 ++++++++++++++++++ .../stream_list.atmosphere.output | 129 ++++++++++++++++ .../stream_list.atmosphere.surface | 2 + .../streams.atmosphere | 59 ++++++++ 6 files changed, 477 insertions(+) create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere.orig create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface create mode 100644 testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere new file mode 100644 index 0000000000..4b1284ebf4 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -0,0 +1,84 @@ +&nhyd_model + config_time_integration_order = 2 + config_dt = 720.0 + config_start_time = '2023-03-10_15:00:00' + config_run_duration = '0_01:00:00' + config_split_dynamics_transport = true + config_number_of_sub_steps = 4 + config_dynamics_split_steps = 3 + config_horiz_mixing = '2d_smagorinsky' + config_visc4_2dsmag = 0.05 + config_scalar_advection = true + config_monotonic = true + config_coef_3rd_order = 0.25 + config_epssm = 0.1 + config_smdiv = 0.1 +/ +&damping + config_mpas_cam_coef = 2.0 + config_rayleigh_damp_u = true + config_zd = 16000.0 + config_xnutr = 0.2 + config_number_cam_damping_levels = 8 +/ +&limited_area + config_apply_lbcs = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ +&restart + config_do_restart = false +/ +&printout + config_print_global_minmax_vel = true + config_print_detailed_minmax_vel = false +/ +&IAU + config_IAU_option = 'off' + config_IAU_window_length_s = 21600. +/ +&physics + config_sst_update = false + config_sstdiurn_update = false + config_frac_seaice = true + config_deepsoiltemp_update = false + config_radtlw_interval = '00:15:00' + config_radtsw_interval = '00:15:00' + config_bucket_update = 'none' + config_physics_suite = 'hrrrv5' + num_soil_layers = 9 +/ +&physics_mp_tempo + config_tempo_aerosolaware = .true. + config_tempo_hailaware = .true. +/ +&soundings + config_sounding_interval = 'none' +/ +&nam_stochy + do_sppt = true + do_skeb = false + config_spptint = 0 + config_sppt_1 = 0.8 + config_sppt_2 = 0.0 + config_sppt_3 = 0.0 + config_sppt_tau_1 = 21600 + config_sppt_tau_2 = 86400 + config_sppt_tau_3 = 21600 + config_sppt_lscale_1 = 450000 + config_sppt_lscale_2 = 1000000 + config_sppt_lscale_3 = 2000000 + config_sppt_logit = true + config_sppt_sfclimit = true + config_iseed_sppt1 = '2026010112001' + config_iseed_sppt2 = '0' + config_iseed_sppt3 = '0' + config_sppt_hgt_top1 = 15000 + config_sppt_hgt_top2 = 27000 + config_stochini = false +/ diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere.orig b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere.orig new file mode 100644 index 0000000000..2e54c86387 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere.orig @@ -0,0 +1,62 @@ +&nhyd_model + config_time_integration_order = 2 + config_dt = 720.0 + config_start_time = '2023-03-10_15:00:00' + config_run_duration = '0_01:00:00' + config_split_dynamics_transport = true + config_number_of_sub_steps = 4 + config_dynamics_split_steps = 3 + config_horiz_mixing = '2d_smagorinsky' + config_visc4_2dsmag = 0.05 + config_scalar_advection = true + config_monotonic = true + config_coef_3rd_order = 0.25 + config_epssm = 0.1 + config_smdiv = 0.1 +/ +&damping + config_mpas_cam_coef = 2.0 + config_rayleigh_damp_u = true + config_zd = 16000.0 + config_xnutr = 0.2 + config_number_cam_damping_levels = 8 +/ +&limited_area + config_apply_lbcs = true +/ +&io + config_pio_num_iotasks = 0 + config_pio_stride = 1 +/ +&decomposition + config_block_decomp_file_prefix = 'graph.info.part.' +/ +&restart + config_do_restart = false +/ +&printout + config_print_global_minmax_vel = true + config_print_detailed_minmax_vel = false +/ +&IAU + config_IAU_option = 'off' + config_IAU_window_length_s = 21600. +/ +&physics + config_sst_update = false + config_sstdiurn_update = false + config_frac_seaice = true + config_deepsoiltemp_update = false + config_radtlw_interval = '00:15:00' + config_radtsw_interval = '00:15:00' + config_bucket_update = 'none' + config_physics_suite = 'hrrrv5' + num_soil_layers = 9 +/ +&physics_mp_tempo + config_tempo_aerosolaware = .true. + config_tempo_hailaware = .true. +/ +&soundings + config_sounding_interval = 'none' +/ diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics new file mode 100644 index 0000000000..048ec8b9d6 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics @@ -0,0 +1,141 @@ +initial_time +xtime +Time +snowncv +rainncv +graupelncv +prec_acc_c +prec_acc_nc +snow_acc_nc +mslp +relhum_50hPa +relhum_100hPa +relhum_200hPa +relhum_250hPa +relhum_500hPa +relhum_700hPa +relhum_850hPa +relhum_925hPa +dewpoint_50hPa +dewpoint_100hPa +dewpoint_200hPa +dewpoint_250hPa +dewpoint_500hPa +dewpoint_700hPa +dewpoint_850hPa +dewpoint_925hPa +temperature_50hPa +temperature_100hPa +temperature_200hPa +temperature_250hPa +temperature_500hPa +temperature_700hPa +temperature_850hPa +temperature_925hPa +height_50hPa +height_100hPa +height_200hPa +height_250hPa +height_500hPa +height_700hPa +height_850hPa +height_925hPa +uzonal_50hPa +uzonal_100hPa +uzonal_200hPa +uzonal_250hPa +uzonal_500hPa +uzonal_700hPa +uzonal_850hPa +uzonal_925hPa +umeridional_50hPa +umeridional_100hPa +umeridional_200hPa +umeridional_250hPa +umeridional_500hPa +umeridional_700hPa +umeridional_850hPa +umeridional_925hPa +w_50hPa +w_100hPa +w_200hPa +w_250hPa +w_500hPa +w_700hPa +w_850hPa +w_925hPa +vorticity_50hPa +vorticity_100hPa +vorticity_200hPa +vorticity_250hPa +vorticity_500hPa +vorticity_700hPa +vorticity_850hPa +vorticity_925hPa +t_isobaric +t_iso_levels +z_isobaric +z_iso_levels +meanT_500_300 +olrtoa +rainc +rainnc +refl10cm +refl10cm_max +refl10cm_1km +refl10cm_1km_max +precipw +u10 +v10 +q2 +t2m +th2m +cape +cin +lcl +lfc +srh_0_1km +srh_0_3km +uzonal_surface +uzonal_1km +uzonal_6km +umeridional_surface +umeridional_1km +umeridional_6km +temperature_surface +dewpoint_surface +updraft_helicity_max +w_velocity_max +w_velocity_min +w_velocity_mean +wind_speed_level1_max +t_oml +t_oml_initial +t_oml_200m_initial +h_oml +h_oml_initial +hu_oml +hv_oml +updraft_helicity_max_01 +updraft_helicity_max_16 +updraft_helicity_max0_15 +updraft_helicity_max05_15 +updraft_helicity_max_02 +updraft_helicity_max_03 +updraft_helicity_min_01 +updraft_helicity_min_16 +updraft_helicity_min0_15 +updraft_helicity_min05_15 +updraft_helicity_min_02 +updraft_helicity_min_03 +wind02_max +wind02_integral_max +wind_speed_10m_max +wind_speed_10m_mean +u10m_mean +v10m_mean +swdnb +swupt +swddir +swddni +swddif diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output new file mode 100644 index 0000000000..35cf85ba9e --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output @@ -0,0 +1,129 @@ +scalars +latCell +lonCell +xCell +yCell +zCell +indexToCellID +latEdge +lonEdge +xEdge +yEdge +zEdge +indexToEdgeID +latVertex +lonVertex +xVertex +yVertex +zVertex +indexToVertexID +cellsOnEdge +nEdgesOnCell +nEdgesOnEdge +edgesOnCell +edgesOnEdge +weightsOnEdge +dvEdge +dcEdge +angleEdge +areaCell +areaTriangle +cellsOnCell +verticesOnCell +verticesOnEdge +edgesOnVertex +cellsOnVertex +kiteAreasOnVertex +meshDensity +zgrid +fzm +fzp +zz +initial_time +xtime +Time +u +w +pressure +surface_pressure +rho +theta +relhum +divergence +vorticity +ke +uReconstructZonal +uReconstructMeridional +stoch_pattern_sppt +stoch_pattern_gg +ertel_pv +u_pv +v_pv +theta_pv +vort_pv +iLev_DT +depv_dt_lw +depv_dt_sw +depv_dt_bl +depv_dt_cu +depv_dt_mix +dtheta_dt_mp +depv_dt_mp +depv_dt_diab +depv_dt_fric +depv_dt_diab_pv +depv_dt_fric_pv +i_rainnc +rainnc +precipw +cuprec +i_rainc +rainc +kpbl +hpbl +hfx +qfx +cd +cda +ck +cka +lh +u10 +v10 +q2 +t2m +th2m +gsw +glw +acsnow +pin +ozmixm +mminlu +isice_lu +iswater_lu +xland +skintemp +snow +snowh +sst +vegfra +shdmin +shdmax +canwat +xice +sh2o +smois +tslb +soilt1 +rhosnf +snowfallac +acrunoff +grdflx +ivgtyp +isltyp +lai +sfc_albedo +cldfrac_bl +snowc +snownc +graupelnc diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface new file mode 100644 index 0000000000..db54cab459 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.surface @@ -0,0 +1,2 @@ +sst +xice diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere new file mode 100644 index 0000000000..b076c1bc12 --- /dev/null +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + From 11d67dcf65ba651d5754a54bd4ce8028457d4229 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 11:16:43 -0600 Subject: [PATCH 171/198] Now that the MP being used for convection_permitting suite is not being changed to TEMPO (the Thompson scheme, which is part of convection_permitting, is being used), we need to add links to the Thompson tables. Do that here. --- .github/workflows/run_mpas_stoch.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index f42bfbb113..fd1ecc1cf1 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -271,6 +271,8 @@ jobs: # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + # Links to tables in the testing_and_setup directory of MPAS-Model, e.g. Thompson MP tables. + ln -sf ${srcdir}/{ufscmnty_data}/tables/thompson/MP_THOMPSON_* . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). @@ -286,6 +288,14 @@ jobs: # Link to the MPAS executable. ln -sf ${srcdir}/atmosphere_model . +# - name: Link Thompson MP data tables to run directory -- baseline branch runs +# if: contains(matrix.physics, 'convection_permitting') +# run: | +# rundir=${RUNDIR_BL} +# srcdir=${SRCDIR_BL} +# cd ${rundir} +# cp ${srcdir}/{ufscmnty_data}/tables/thompson/* . + - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | @@ -309,6 +319,8 @@ jobs: # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . + # Links to tables in the testing_and_setup directory of MPAS-Model, e.g. Thompson MP tables. + ln -sf ${srcdir}/{ufscmnty_data}/tables/thompson/MP_THOMPSON_* . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). @@ -324,6 +336,14 @@ jobs: # Link to the MPAS executable. ln -sf ${srcdir}/atmosphere_model . +# - name: Link Thompson MP data tables to run directory -- feature branch runs +# if: contains(matrix.physics, 'convection_permitting') +# run: | +# rundir=${RUNDIR_FT} +# srcdir=${SRCDIR_FT} +# cd ${rundir} +# cp ${srcdir}/{ufscmnty_data}/tables/thompson/* . + - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' run: | From 4586205bbe07902dd21b9059fefa50dc6e836a06 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 11:29:06 -0600 Subject: [PATCH 172/198] Hopefully a bug fix. --- .github/workflows/run_mpas_stoch.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index fd1ecc1cf1..12a8bbd510 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -266,13 +266,12 @@ jobs: # such variables from the stream_list.* files. sed -i '/stoch/d' stream_list.* # - # Create symlinks in the run directory. + # Create symlinks in the run directory. Note that not all of these may be necessary + # for the particular run configuration, but we link all for convenience. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . - # Links to tables in the testing_and_setup directory of MPAS-Model, e.g. Thompson MP tables. - ln -sf ${srcdir}/{ufscmnty_data}/tables/thompson/MP_THOMPSON_* . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). @@ -280,6 +279,7 @@ jobs: ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. ln -sf ${srcdir}/${ufs_phys_tables}/tempo/* . + ln -sf ${srcdir}/${ufs_phys_tables}/thompson/* . ln -sf ${srcdir}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . @@ -314,7 +314,8 @@ jobs: # Copy MPAS configuration files (namelist, stream) into run directory. cp ${srcdir}/${ufscmnty_cases}/ufscommunity.${{matrix.physics}}.${{matrix.ic_source}}.${{matrix.season}}.stoch/* . # - # Create symlinks in the run directory. + # Create symlinks in the run directory. Note that not all of these may be necessary + # for the particular run configuration, but we link all for convenience. # # Links to WRF physics tables and other files that are downloaded during the call to # checkout_data_files.sh. @@ -328,6 +329,7 @@ jobs: ln -sf ${srcdir}/src/core_atmosphere/physics/physics_noaa/TEMPO/tables/ccn_activate.bin . # Links to the UFS physics tables downloaded by the get_data.sh script. ln -sf ${srcdir}/${ufs_phys_tables}/tempo/* . + ln -sf ${srcdir}/${ufs_phys_tables}/thompson/* . ln -sf ${srcdir}/${ufs_phys_tables}/ugw/* . # Links to the MPAS initial and boundary condition files and other static files. ln -sf ${srcdir}/${mpas_ics}/ufscommunity.${{matrix.ic_source}}.${{matrix.season}}/mpas.init.nc . From 2913f5febc0cf9be2333a073123068424192ca8f Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 21 May 2026 11:35:37 -0600 Subject: [PATCH 173/198] Remove fail-safes for the "Run MPAS" tasks and hope for the best; remove commented-out code. --- .github/workflows/run_mpas_stoch.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index 12a8bbd510..ef751c695e 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -288,14 +288,6 @@ jobs: # Link to the MPAS executable. ln -sf ${srcdir}/atmosphere_model . -# - name: Link Thompson MP data tables to run directory -- baseline branch runs -# if: contains(matrix.physics, 'convection_permitting') -# run: | -# rundir=${RUNDIR_BL} -# srcdir=${SRCDIR_BL} -# cd ${rundir} -# cp ${srcdir}/{ufscmnty_data}/tables/thompson/* . - - name: Link surface files to run directory -- baseline branch runs if: matrix.ic_source == 'gfs' run: | @@ -338,14 +330,6 @@ jobs: # Link to the MPAS executable. ln -sf ${srcdir}/atmosphere_model . -# - name: Link Thompson MP data tables to run directory -- feature branch runs -# if: contains(matrix.physics, 'convection_permitting') -# run: | -# rundir=${RUNDIR_FT} -# srcdir=${SRCDIR_FT} -# cd ${rundir} -# cp ${srcdir}/{ufscmnty_data}/tables/thompson/* . - - name: Link surface files to run directory -- feature branch runs if: matrix.ic_source == 'gfs' run: | @@ -359,14 +343,14 @@ jobs: run: | cd ${RUNDIR_BL} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true + mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l - name: Run MPAS -- feature branch run: | cd ${RUNDIR_FT} pwd && ls -l - mpiexec --allow-run-as-root -np 1 ./atmosphere_model || true + mpiexec --allow-run-as-root -np 1 ./atmosphere_model pwd && ls -l ########################################################################################## From e1018f94d111573cc63f253093b60a9fef80485b Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 23 May 2026 16:44:42 -0600 Subject: [PATCH 174/198] Modifications required to make MPAS-Model work with the latest changes to the stochastic_physics_pattern_apply() subroutine in stochastic_physics. --- src/core_atmosphere/dynamics/mpas_atm_time_integration.F | 5 ++--- 1 file changed, 2 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 b7de28e22f..b6aacb4dd1 100644 --- a/src/core_atmosphere/dynamics/mpas_atm_time_integration.F +++ b/src/core_atmosphere/dynamics/mpas_atm_time_integration.F @@ -32,7 +32,6 @@ module atm_time_integration use mpas_atmphys_todynamics use mpas_atmphys_utilities use mpas_stochastic_physics, only : stochastic_physics_pattern_apply, dosppt - use mpas_stochastic_physics, only : tend_names #endif use mpas_atm_boundaries, only : nSpecZone, nRelaxZone, nBdyZone, mpas_atm_get_bdy_state, mpas_atm_get_bdy_tend ! regional_MPAS addition @@ -1083,7 +1082,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) ! apply random perturbation pattern to the tendency if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, tend_names(1:4), ierr) + call stochastic_physics_pattern_apply(domain, 'phys', ierr) endif call physics_get_tend( block, mesh, state, diag, tend, tend_physics, & @@ -1094,7 +1093,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group) ! apply random perturbation pattern to the tendency if (dosppt(domain)) then - call stochastic_physics_pattern_apply(domain, tend_names(5:5), ierr) + call stochastic_physics_pattern_apply(domain, 'prog', ierr) endif #else #ifndef MPAS_CAM_DYCORE From 0c30c07fef5970efefd3292972d1b15ed895aec1 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 23 May 2026 16:45:47 -0600 Subject: [PATCH 175/198] Update hash of stochastic_physics. --- 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 0130d1120d..bc99a24033 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 0130d1120d4adcf01692dc5fd304864a8a5fa23d +Subproject commit bc99a240330d7568f6e81ab1d852e5649be048f5 From 83f67f7fd41e22ca99b0542e6fb2b9259cd1b6cf Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 23 May 2026 17:59:47 -0600 Subject: [PATCH 176/198] Make input files for phys_suite=hrrrv5 CI test as similar as possible to those for phys_suite=convection_allowing test. --- .../stream_list.atmosphere.diagnostics | 26 ++--- .../stream_list.atmosphere.output | 3 +- .../streams.atmosphere | 97 +++++++++++-------- 3 files changed, 74 insertions(+), 52 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics index 048ec8b9d6..5c32a8a1cf 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.diagnostics @@ -1,5 +1,18 @@ initial_time xtime +olrtoa +rainc +rainnc +refl10cm +refl10cm_max +refl10cm_1km +refl10cm_1km_max +precipw +u10 +v10 +q2 +t2m +th2m Time snowncv rainncv @@ -77,19 +90,6 @@ t_iso_levels z_isobaric z_iso_levels meanT_500_300 -olrtoa -rainc -rainnc -refl10cm -refl10cm_max -refl10cm_1km -refl10cm_1km_max -precipw -u10 -v10 -q2 -t2m -th2m cape cin lcl diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output index 35cf85ba9e..6054cba7d4 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/stream_list.atmosphere.output @@ -61,7 +61,6 @@ u_pv v_pv theta_pv vort_pv -iLev_DT depv_dt_lw depv_dt_sw depv_dt_bl @@ -73,6 +72,7 @@ depv_dt_diab depv_dt_fric depv_dt_diab_pv depv_dt_fric_pv +iLev_DT i_rainnc rainnc precipw @@ -123,6 +123,7 @@ ivgtyp isltyp lai sfc_albedo +dzs cldfrac_bl snowc snownc diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere index b076c1bc12..e5d3b0bd81 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/streams.atmosphere @@ -1,59 +1,80 @@ + + + + input_interval="initial_only" + /> + + + output_interval="1_00:00:00" + /> + + + + + + - - + output_interval="00:12:00"> + - - - - - - - + output_interval="00:12:00"> + - - - - - - From a0e7691f1bb3464addb1acc8aaeb8d6ad61f5078 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 23 May 2026 18:01:11 -0600 Subject: [PATCH 177/198] Make namelist files for the two suites (convection_permitting and hrrrv5) as similar as possible. --- .../namelist.atmosphere | 6 ++--- .../namelist.atmosphere | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere index d75d2e09b3..3e893b1402 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.convection_permitting.gfs.winter.stoch/namelist.atmosphere @@ -51,12 +51,12 @@ config_bucket_update = 'none' config_physics_suite = 'convection_permitting' / -&soundings - config_sounding_interval = 'none' -/ &physics_mp_tempo config_tempo_hailaware = true / +&soundings + config_sounding_interval = 'none' +/ &nam_stochy do_sppt = true do_skeb = false diff --git a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere index 4b1284ebf4..7225dd0f3b 100644 --- a/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere +++ b/testing_and_setup/ufs-community/cases/ufscommunity.hrrrv5.gfs.winter.stoch/namelist.atmosphere @@ -1,7 +1,7 @@ &nhyd_model config_time_integration_order = 2 config_dt = 720.0 - config_start_time = '2023-03-10_15:00:00' + config_start_time = '2023-03-10_15:00:00' config_run_duration = '0_01:00:00' config_split_dynamics_transport = true config_number_of_sub_steps = 4 @@ -15,21 +15,21 @@ config_smdiv = 0.1 / &damping - config_mpas_cam_coef = 2.0 - config_rayleigh_damp_u = true - config_zd = 16000.0 - config_xnutr = 0.2 + config_zd = 16000.0 + config_xnutr = 0.2 + config_mpas_cam_coef = 2.0 + config_rayleigh_damp_u = true config_number_cam_damping_levels = 8 / &limited_area config_apply_lbcs = true / &io - config_pio_num_iotasks = 0 - config_pio_stride = 1 + config_pio_num_iotasks = 0 + config_pio_stride = 1 / &decomposition - config_block_decomp_file_prefix = 'graph.info.part.' + config_block_decomp_file_prefix = 'graph.info.part.' / &restart config_do_restart = false @@ -51,11 +51,11 @@ config_radtsw_interval = '00:15:00' config_bucket_update = 'none' config_physics_suite = 'hrrrv5' - num_soil_layers = 9 + num_soil_layers = 9 / &physics_mp_tempo - config_tempo_aerosolaware = .true. - config_tempo_hailaware = .true. + config_tempo_hailaware = true + config_tempo_aerosolaware = true / &soundings config_sounding_interval = 'none' From e9cba01e9ab99945165ff67707b5f10c29825e6f Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sun, 24 May 2026 10:50:29 -0600 Subject: [PATCH 178/198] Update hash of stochastic_physics. --- 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 bc99a24033..ef181706ba 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit bc99a240330d7568f6e81ab1d852e5649be048f5 +Subproject commit ef181706ba1b5eb414199e2adf05f2ce87998d69 From de41c8af2596b9617a1bcef43a945669261a1b25 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 12:13:49 -0600 Subject: [PATCH 179/198] Update hash of stochastic_physics. --- 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 ef181706ba..1f364db35a 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit ef181706ba1b5eb414199e2adf05f2ce87998d69 +Subproject commit 1f364db35a33c7c3b92bda322984d335e57584e3 From 33317b0d4592ba7f257ee9d02aa8cced7e8fbb60 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 14:30:11 -0600 Subject: [PATCH 180/198] Always use mpi_f08 in the cmake build. This is required for compatibility with the use of mpi_f08 in stochastic_physics (where we don't want to have an option like MPAS_USE_MPI_F08 to choose between "use mpi_f08" and "use mpi" because in the UFS, which the stochastic_physics repo is a part of, Fortran 2008 is a required standard). --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 864675f5eb..cd0b5ee808 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,9 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES NVHPC) set(MPI_Fortran_COMPILER mpifort) endif() find_package(MPI REQUIRED COMPONENTS Fortran) +# Always set the MPAS_USE_MPI_F08 macro, which entails using "use mpi_f08" +# instead of the older "use mpi". +add_compile_definitions(MPAS_USE_MPI_F08) find_package(PnetCDF REQUIRED COMPONENTS Fortran) if(MPAS_USE_PIO) From ce29b86add16c1abe36e21738a9e8e65093ddf3e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 14:33:36 -0600 Subject: [PATCH 181/198] Update hash of stochastic_physics. --- 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 1f364db35a..3c2c91928d 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 1f364db35a33c7c3b92bda322984d335e57584e3 +Subproject commit 3c2c91928d1b35f3ab862558beca248aa3ecc01e From ee0e9e555a7390a8b70d9fd3782cda43f7cb8c13 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 14:34:55 -0600 Subject: [PATCH 182/198] Enable original set of CI tests on a branch push. --- .github/workflows/build_mpas.yml | 4 ++-- .github/workflows/build_mpas_intel.yml | 4 ++-- .github/workflows/run_mpas.yml | 4 ++-- .github/workflows/run_mpas_hrrr.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 9566786e9f..8130fc8f78 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,7 +1,7 @@ name: Build (GNU) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: [workflow_dispatch] +on: [pull_request,workflow_dispatch] +#on: [workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index d903603c1c..ca022183e8 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,7 +1,7 @@ name: Build (Intel) MPAS Standalone -#on: [pull_request,workflow_dispatch] -on: [workflow_dispatch] +on: [pull_request,workflow_dispatch] +#on: [workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index 55ee97824b..5fe61ab7c6 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL tests) -#on: [push, pull_request, workflow_dispatch] -on: [workflow_dispatch] +on: [push, pull_request, workflow_dispatch] +#on: [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 e601685fba..821f5f8d2d 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,7 +1,7 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) -#on: [push, pull_request, workflow_dispatch] -on: [workflow_dispatch] +on: [push, pull_request, workflow_dispatch] +#on: [workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From 0262d904b466f8030d9f28d2c6fafd4d49f2e430 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 22:54:51 -0600 Subject: [PATCH 183/198] Merge Dustin's PR#4 changes into gsketefian's later changes (some of which are duplicates). --- .gitmodules | 2 +- src/core_atmosphere/dynamics/mpas_atm_time_integration.F | 4 ++-- 2 files changed, 3 insertions(+), 3 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 b6aacb4dd1..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 the tendency +! 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 tendency +! apply random perturbation pattern to the accumulated (non-hydrostatic) physics tendencies if (dosppt(domain)) then call stochastic_physics_pattern_apply(domain, 'prog', ierr) endif From 8ac2611e13e1a7efb0d77fa905b810ee71776921 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 23:22:51 -0600 Subject: [PATCH 184/198] Temporarily switch to an earlier hash of stochastich_physics to allow Dustin's PR#4 to be merged. --- 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 3c2c91928d..9533f11ed4 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 3c2c91928d1b35f3ab862558beca248aa3ecc01e +Subproject commit 9533f11ed4d93cecb0cdf5e71b9cc9de3375a8b7 From e972b54b6c6c0fafe034c78f953f352863064a61 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 25 May 2026 23:26:56 -0600 Subject: [PATCH 185/198] Update hash of stochastic_physics back to latest now that Dustin's PR#4 has been merged. --- 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 9533f11ed4..3c2c91928d 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 9533f11ed4d93cecb0cdf5e71b9cc9de3375a8b7 +Subproject commit 3c2c91928d1b35f3ab862558beca248aa3ecc01e From 8c5e7e6bb147bfb3ac0310d337326c666b5e969d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 26 May 2026 08:52:13 -0600 Subject: [PATCH 186/198] Update hash of stochastic_physics. --- 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 3c2c91928d..063b1897ce 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 3c2c91928d1b35f3ab862558beca248aa3ecc01e +Subproject commit 063b1897ce960dbac4d5c0f8449ad62d2f7bd12a From 4c4546588125d1afa4801964b1b7d8997781e809 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 26 May 2026 10:03:12 -0600 Subject: [PATCH 187/198] Update name of fortran file name in parent CMakeLists.txt file of stochastic_physics submodule (from mpas_stochastic_physics.F to mpas_stochastic_physics.F90) to reflect change in directory tree. --- src/core_atmosphere/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/CMakeLists.txt b/src/core_atmosphere/CMakeLists.txt index cc447d9474..63da81e1e7 100644 --- a/src/core_atmosphere/CMakeLists.txt +++ b/src/core_atmosphere/CMakeLists.txt @@ -158,7 +158,7 @@ set(ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES stochy_nml_rec.F90 get_stochy_pattern.F90 lndp_apply_perts.F90 - mpas_stochastic_physics.F + mpas_stochastic_physics.F90 ) list(TRANSFORM ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES PREPEND stochastic_physics/) add_library(stochastic_physics ${ATMOSPHERE_CORE_STOCHASTIC_PHYSICS_SOURCES}) From bd441e1b3e2b32c1e5b41f54e8a41376b4a9cee7 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 26 May 2026 14:22:13 -0600 Subject: [PATCH 188/198] Fix stochastic_physics submodule URL to use dtcenter repo. Change the fetch URL from dustinswales/stochastic_physics to dtcenter/stochastic_physics, which is the authoritative upstream that contains the required commit (063b1897). --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index c76c86c8f4..f19f95960e 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/dustinswales/stochastic_physics.git + url = https://github.com/dtcenter/stochastic_physics.git From ec3399f3d7f84677a66f15890c7f1f43c9449779 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 1 Jun 2026 11:30:00 -0600 Subject: [PATCH 189/198] Remove commented-out line (#on: [workflow_dispatch]) used to turn off launching of CI tests on push. --- .github/workflows/build_mpas.yml | 1 - .github/workflows/build_mpas_intel.yml | 1 - .github/workflows/run_mpas.yml | 1 - .github/workflows/run_mpas_hrrr.yml | 1 - .github/workflows/run_mpas_stoch.yml | 1 - 5 files changed, 5 deletions(-) diff --git a/.github/workflows/build_mpas.yml b/.github/workflows/build_mpas.yml index 8130fc8f78..496d97af7e 100644 --- a/.github/workflows/build_mpas.yml +++ b/.github/workflows/build_mpas.yml @@ -1,7 +1,6 @@ name: Build (GNU) MPAS Standalone on: [pull_request,workflow_dispatch] -#on: [workflow_dispatch] jobs: build_mpas_GNU: diff --git a/.github/workflows/build_mpas_intel.yml b/.github/workflows/build_mpas_intel.yml index ca022183e8..c43974b519 100644 --- a/.github/workflows/build_mpas_intel.yml +++ b/.github/workflows/build_mpas_intel.yml @@ -1,7 +1,6 @@ name: Build (Intel) MPAS Standalone on: [pull_request,workflow_dispatch] -#on: [workflow_dispatch] jobs: build_mpas_intel: diff --git a/.github/workflows/run_mpas.yml b/.github/workflows/run_mpas.yml index 5fe61ab7c6..c095907acd 100644 --- a/.github/workflows/run_mpas.yml +++ b/.github/workflows/run_mpas.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone (NOAA GSL tests) on: [push, pull_request, workflow_dispatch] -#on: [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 821f5f8d2d..0ca3591bc3 100644 --- a/.github/workflows/run_mpas_hrrr.yml +++ b/.github/workflows/run_mpas_hrrr.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone (NOAA GSL HRRRv5 tests) on: [push, pull_request, workflow_dispatch] -#on: [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 ef751c695e..beb96d1725 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -1,7 +1,6 @@ name: Run MPAS Standalone with Stochastic Physics (NOAA GSL HRRRv5 tests) on: [push, pull_request, workflow_dispatch] -#on: [workflow_dispatch] ############################################################################################# # Testing script/workflow for ufs-community fork of MPAS-Dev/MPAS-A. From 6f445361350fdc0fc3d115ad154dc222bfd485dc Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 1 Jun 2026 11:36:30 -0600 Subject: [PATCH 190/198] Fix bug/typo. --- .github/workflows/run_mpas_stoch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_mpas_stoch.yml b/.github/workflows/run_mpas_stoch.yml index beb96d1725..738a4da4df 100644 --- a/.github/workflows/run_mpas_stoch.yml +++ b/.github/workflows/run_mpas_stoch.yml @@ -312,7 +312,7 @@ jobs: # checkout_data_files.sh. ln -sf ${srcdir}/${wrf_phys_tables}/{*.TBL,*.DBL,*DATA} . # Links to tables in the testing_and_setup directory of MPAS-Model, e.g. Thompson MP tables. - ln -sf ${srcdir}/{ufscmnty_data}/tables/thompson/MP_THOMPSON_* . + ln -sf ${srcdir}/${ufscmnty_data}/tables/thompson/MP_THOMPSON_* . # Links to UFS physics tables that are under version control, i.e. part of the MPAS-Model # repo or submodules. These are not created in the build step or some other way. They # are present once the repository is cloned (recursively). From 1cdac0f2757a59571d518b88e51b54acf98b9f47 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 2 Jun 2026 11:03:05 -0600 Subject: [PATCH 191/198] Update hash of stochastic_physics. --- 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 063b1897ce..13c80dea10 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 063b1897ce960dbac4d5c0f8449ad62d2f7bd12a +Subproject commit 13c80dea10290cf135e3eb5298ae9c427be1072a From 701ad928dc3ed16b46aab9bf78f054d82be27092 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 2 Jun 2026 12:07:23 -0600 Subject: [PATCH 192/198] Enable the build-time macro CESMENABLED to access the "dgemm" matrix multiplication subroutine. --- CMakeLists.txt | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd0b5ee808..6159b617af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,9 +66,35 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES NVHPC) set(MPI_Fortran_COMPILER mpifort) endif() find_package(MPI REQUIRED COMPONENTS Fortran) +# # Always set the MPAS_USE_MPI_F08 macro, which entails using "use mpi_f08" -# instead of the older "use mpi". +# instead of the older "use mpi" in Fortran source code. +# add_compile_definitions(MPAS_USE_MPI_F08) +# +# When building stochastic_physics under the UFS, by default we use the +# "esmf_dgemm" Fortran matrix multiplication subroutine that the UFS host +# model provides (via its ESMF-based coupling layer). +# +# However, the ufs-community's stand-alone MPAS-Model currently does not +# provide access to "esmf_dgemm", so when building stochastic_physics under +# the stand-alone MPAS-Model, we use the "dgemm" Fortran subroutine that +# is part of the BLAS (Basic Linear Algebra Subprograms) package that is +# commonly available. +# +# Since the NOAA-PSL/stochastic_physics repo is under the purview of the +# UFS, by default it must use the UFS host model's coupling framework, so +# the default in the stochastic_physics Fortran code is to use "esmf_dgemm". +# Fortunately, there is a non-default host model option in the UFS that +# provides access to the "dgemm" subroutine. This is the CESM (Community +# Earth System Model), and the build-time macro CESMCOUPLED can be enabled +# to build using the CESM instead of the UFS as the host model. Here, we +# are only interested in a stand-alone MPAS-Model build (and thus use of +# "dgemm"), so we get the Fortran code to use "dgemm" by enabling CESMCOUPLED +# (which works even though in a stand-alone MPAS-Model build, there isn't +# really a host model to speak of). +# +add_compile_definitions(CESMCOUPLED) find_package(PnetCDF REQUIRED COMPONENTS Fortran) if(MPAS_USE_PIO) From 44b219d229063331ae9d50a81f87c5d6a0064fe3 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 2 Jun 2026 12:08:39 -0600 Subject: [PATCH 193/198] Update hash of stochastic_physics. --- 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 13c80dea10..4ffed2a351 160000 --- a/src/core_atmosphere/stochastic_physics +++ b/src/core_atmosphere/stochastic_physics @@ -1 +1 @@ -Subproject commit 13c80dea10290cf135e3eb5298ae9c427be1072a +Subproject commit 4ffed2a351c15d8193c511235c35ca04688c9ff6 From ba6ce237ad159e0bf43bdd2eaf180b2e9658340e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 2 Jun 2026 14:19:00 -0600 Subject: [PATCH 194/198] Set the CESMCOUPLED build-time macro in the main Makefile so that when building with the stand-alone MPAS-Model, stochastic_physics uses "dgemm" instead of "esmf_dgemm" to perform matrix multiplication. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 7124e96fdc..e54ccd5f67 100644 --- a/Makefile +++ b/Makefile @@ -1613,6 +1613,15 @@ IO_MESSAGE = "Using the SMIOL library." override CPPFLAGS += "-DMPAS_SMIOL_SUPPORT" endif +# In the stochastic_physics code, the build-time macro CESMCOUPLED causes +# the subroutine "dgemm" to be used to perform matrix multiplication instead +# of the default "esmf_dgemm" (which is the default under the UFS, which +# the stochastic_physics repo is part of). When building stochastic_physics +# with the stand-alone MPAS-Model, we don't (currently) have access to the +# "esmf_dgemm" subroutine, so we must enable CESMCOUPLED here to build with +# "dgemm" instead. +override CPPFLAGS += "-DCESMCOUPLED" + mpas_main: $(MAIN_DEPS) cd src; $(MAKE) FC="$(FC)" \ CC="$(CC)" \ From cba720356f4e134861830d3e11f4f27f253a21de Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Tue, 2 Jun 2026 14:25:54 -0600 Subject: [PATCH 195/198] Remove from the main Makefile the recently-added build target "intel-mpi-gaeac6" for building the stand-alone MPAS-Model with stochastic_physics on Gaea C6 because it turns out that the existing "ifort_icx" target can be used for this purpose -- as long as a small modification (addition of LAPACK_LIBS) is made to it, which we also do here. --- Makefile | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/Makefile b/Makefile index e54ccd5f67..0e477e2af7 100644 --- a/Makefile +++ b/Makefile @@ -375,6 +375,7 @@ ifort_icx: # BUILDTARGET Intel Fortran, C, and C++ compiler suite "DEBUG = $(DEBUG)" \ "USE_PAPI = $(USE_PAPI)" \ "OPENMP = $(OPENMP)" \ + "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) jet_ifort: @@ -484,34 +485,6 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) -intel-mpi-gaeac6: # BUILDTARGET for gaea C6 - ( $(MAKE) all \ - "FC_PARALLEL = ftn" \ - "CC_PARALLEL = cc" \ - "CXX_PARALLEL = mpiicpc" \ - "FC_SERIAL = ifort" \ - "CC_SERIAL = cc" \ - "CXX_SERIAL = icpc" \ - "FFLAGS_PROMOTION = -real-size 64" \ - "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \ - "CFLAGS_OPT = -O3" \ - "CXXFLAGS_OPT = -O3" \ - "LDFLAGS_OPT = -O3" \ - "FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \ - "CFLAGS_DEBUG = -g -traceback" \ - "CXXFLAGS_DEBUG = -g -traceback" \ - "LDFLAGS_DEBUG = -g -fpe0 -traceback" \ - "FFLAGS_OMP = -qopenmp" \ - "CFLAGS_OMP = -qopenmp" \ - "PICFLAG = -fpic" \ - "BUILD_TARGET = $(@)" \ - "CORE = $(CORE)" \ - "DEBUG = $(DEBUG)" \ - "USE_PAPI = $(USE_PAPI)" \ - "OPENMP = $(OPENMP)" \ - "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ - "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) - intel-llvm-mpi: # BUILDTARGET Intel LLVM compiler suite with Intel MPI library ( $(MAKE) all \ "FC_PARALLEL = mpiifx" \ From 058d494de5e2bfa7aa09e0121ffe54b4fdf12032 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 3 Jun 2026 08:22:46 -0600 Subject: [PATCH 196/198] Edit comments for clarity. --- CMakeLists.txt | 18 +++++++++++------- Makefile | 13 ++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6159b617af..581581b347 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ add_compile_definitions(MPAS_USE_MPI_F08) # model provides (via its ESMF-based coupling layer). # # However, the ufs-community's stand-alone MPAS-Model currently does not -# provide access to "esmf_dgemm", so when building stochastic_physics under +# provide access to "esmf_dgemm", so when building stochastic_physics with # the stand-alone MPAS-Model, we use the "dgemm" Fortran subroutine that # is part of the BLAS (Basic Linear Algebra Subprograms) package that is # commonly available. @@ -87,12 +87,16 @@ add_compile_definitions(MPAS_USE_MPI_F08) # the default in the stochastic_physics Fortran code is to use "esmf_dgemm". # Fortunately, there is a non-default host model option in the UFS that # provides access to the "dgemm" subroutine. This is the CESM (Community -# Earth System Model), and the build-time macro CESMCOUPLED can be enabled -# to build using the CESM instead of the UFS as the host model. Here, we -# are only interested in a stand-alone MPAS-Model build (and thus use of -# "dgemm"), so we get the Fortran code to use "dgemm" by enabling CESMCOUPLED -# (which works even though in a stand-alone MPAS-Model build, there isn't -# really a host model to speak of). +# Earth System Model). To use the CESM instead of the UFS as the host +# model during a build, the build-time pre-processor macro CESMCOUPLED +# must be enabled. Since here we are only interested in a stand-alone +# MPAS-Model build (and thus must use "dgemm", not "esmf_dgemm"), we enable +# the CESMCOUPLED macro. (Note that both the UFS and the CESM host model +# coupling frameworks are ESMF based, so CESMCOUPED is not a flag to +# choose between an ESMF-based and a non-ESMF-based coupling framework; +# in this specific case, the CESM happens to directly use the BLAS-provided +# "dgemm" subroutine for matrix multiplication while the UFS happens to +# use the "esmf_dgemm" subroutine provided by the ESMF.) # add_compile_definitions(CESMCOUPLED) diff --git a/Makefile b/Makefile index 0e477e2af7..7690e26fc4 100644 --- a/Makefile +++ b/Makefile @@ -1586,13 +1586,12 @@ IO_MESSAGE = "Using the SMIOL library." override CPPFLAGS += "-DMPAS_SMIOL_SUPPORT" endif -# In the stochastic_physics code, the build-time macro CESMCOUPLED causes -# the subroutine "dgemm" to be used to perform matrix multiplication instead -# of the default "esmf_dgemm" (which is the default under the UFS, which -# the stochastic_physics repo is part of). When building stochastic_physics -# with the stand-alone MPAS-Model, we don't (currently) have access to the -# "esmf_dgemm" subroutine, so we must enable CESMCOUPLED here to build with -# "dgemm" instead. +# Enable the build-time pre-processor macro CESMCOUPLED in order to use +# the subroutine "dgemm" to perform matrix multiplication instead of the +# subroutine "esmf_dgemm" that is the default in the UFS. This is necessary +# because currently (as of 20260603), the ufs-community's stand-alone +# MPAS-Model does not provide access to "esmf_dgemm". For further details, +# see the more thorough explanation of this issue in CMakeLists.txt. override CPPFLAGS += "-DCESMCOUPLED" mpas_main: $(MAIN_DEPS) From ba5daf29cee315b66f314f34ae34c8e828829c64 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 4 Jun 2026 23:51:42 -0600 Subject: [PATCH 197/198] Remove -I flag in a linker command since a -I is only needed when compiling, not linking. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index cd133bd373..66905ae87a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,7 @@ else all: mpas mpas: $(AUTOCLEAN_DEPS) externals frame ops dycore drver - $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -I./external/esmf_time_f91 -L./external/esmf_time_f90 -lesmf_time $(LAPACK_LIBS) + $(LINKER) $(LDFLAGS) -o $(EXE_NAME) driver/*.o -L. -ldycore -lops -lframework $(LIBS) -L./external/esmf_time_f90 -lesmf_time $(LAPACK_LIBS) externals: $(AUTOCLEAN_DEPS) ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" all ) From ab7b16006c0ab4a437c406e12ce7bcfdcbc7e0ba Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 6 Jun 2026 06:23:33 -0600 Subject: [PATCH 198/198] Changes to enable a make-based build with stochastic_physics on ursa. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7690e26fc4..489029a0ef 100644 --- a/Makefile +++ b/Makefile @@ -537,6 +537,7 @@ intel-mpi-ursa: # usra "DEBUG = $(DEBUG)" \ "USE_PAPI = $(USE_PAPI)" \ "OPENMP = $(OPENMP)" \ + "LAPACK_LIBS = -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" \ "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" ) gfortran: # BUILDTARGET GNU Fortran, C, and C++ compilers