Skip to content

Enable SPPT with the MPAS dycore#97

Draft
gsketefian wants to merge 47 commits intoNOAA-PSL:masterfrom
dtcenter:gsl/MPAS_stoch_physics_try_merge_stoch_master
Draft

Enable SPPT with the MPAS dycore#97
gsketefian wants to merge 47 commits intoNOAA-PSL:masterfrom
dtcenter:gsl/MPAS_stoch_physics_try_merge_stoch_master

Conversation

@gsketefian
Copy link
Copy Markdown

@gsketefian gsketefian commented Mar 14, 2026

Description

This PR to enables the stochastic_physics code to use the SPPT scheme (but not SPP, SHUM, or SKEB) with the MPAS dycore, as described in Issue #94.

Main changes:

  • Introduce several new fortran files as well as a Makefile that are used specifically only when building for MPAS.
  • Introduce the pre-processor macros FV3 and MPAS to distinguish between whether stochastic_physics is being built with FV3 or MPAS as the dycore.
  • Introduce the pre-processor macro STOCH_PHYS_DIAG to allow for extra diagnostics to be printed out.
  • Introduce the new variables sppt_hgt_top1 and sppt_hgt_top2 to use for tapering at the top (these are the MPAS counterparts of sppt_sigtop1 and sppt_sigtop2 for FV3).
  • In kinddef.F90, bring in data types specific to MPAS (e.g. RKIND).

There is a companion PR in the ufs-community's MPAS-Model repo here.

Note that at the moment, the combined MPAS-Model/stochastic_physics code can be built only with make, not cmake. The cmake capability will come in a future PR.

After this PR is merged, when stochastic_physics is being built with FV3, the -DFV3 compiler flag must be used, and if it is being built with MPAS, the -DMPAS flag must be used.

willmayfield and others added 30 commits October 9, 2024 17:31
changes to build stochastic physics with mpas
…osphere model.

This implementation assumes that each MPI task has only one block.
…ption to transform the pattern to

a bounded interval [-1.0, 1.0] , and to include a shift of the pattern’s mean from 0.0 to 1.0.

(These two computations were previously excluded for debugging purposes.)
…ted and no perturbation is applied.

Added sanity check for SPPT namelist variables; if their values are not set correctly, reset do_sppt to false.
Changed module name stochastic_physics_mpas to mpas_stochastic_physics.
…PT implementation.

If SPPTINT = 0 perturbation pattern advances every time step; if SPPTINT = t > 0 pattern advances after t seconds.
The tapering is specified with two namelist variables, config_sppt_hgt_top1 and config_sppt_hgt_top2;
the default values for the two variables are 15000 and 27000 meters respectively.

Fixed some logics for the SPPT seeds generation.
…ong with the Registry file that defines the namelist variables, was updated to allow for reading 8-byte integer values of namelist variables that are provided as character strings.

Replace print statements with mpas_log_write, and wrap debug/diag print statements with #ifdef directives.
… the "gsl/MPAS_stoch_physics_try_merge_stoch_master" branch. Details:

* Add new variable declarations needed in latest master branch.
* Remove some unneeded variable declarations.
* Add new subroutines needed in latest master branch.
* Add new arguments to existing subroutines and/or functions (some optional).
* Add some code modifications in if-statements required by latest "master" branch.
* Add new code for new optional argument "normalize".
* Limit kmax in k-loop for sppt tapering in PBL.
* Bug fix(es) from master branch.
* Add new file macros.h that defines preprocessor macros using macros defined via the -DMY_MACRO flag to the CPPFLAGS variable in the makefile of MPAS-Model.
… as the dycore; add back variable declarations that were accidentally removed during the merge of the master branch.
Comment thread kinddef.F90
Comment thread Makefile Outdated
Comment thread Makefile Outdated
…pi vs mpi_f08; these should be using the MPAS_USE_MPI_F08 macro.
…consistent with the way it is calculated for the DTC 2026 MPAS Stochastic Physics project's retro runs, which uses the formula: seed = YYYYMMDDHH*1000 + ensmem_num*10 + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants