Enable SPPT with the MPAS dycore#97
Draft
gsketefian wants to merge 47 commits intoNOAA-PSL:masterfrom
Draft
Conversation
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.
…esolution exceeds the default value.
…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.
… merge master in.
…e master branch in.
…asier to merge master branch in.
… 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.
…that will allow stochastic_physics to be compiled with MPAS settings.
Some refactoring for UWM (Unified Weather Model).
…tells stochastic_physics to build with MPAS settings.
…ch name of file in which it's defined.
…stoch_master_tweaks Adjustments to kinds to get stochastic_physics to build with MPAS-Model.
…pi (older), not mpi_f08 (newer).
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR to enables the
stochastic_physicscode to use the SPPT scheme (but notSPP,SHUM, orSKEB) with the MPAS dycore, as described in Issue #94.Main changes:
Makefilethat are used specifically only when building for MPAS.FV3andMPASto distinguish between whetherstochastic_physicsis being built with FV3 or MPAS as the dycore.STOCH_PHYS_DIAGto allow for extra diagnostics to be printed out.sppt_hgt_top1andsppt_hgt_top2to use for tapering at the top (these are the MPAS counterparts ofsppt_sigtop1andsppt_sigtop2for FV3).kinddef.F90, bring in data types specific toMPAS(e.g.RKIND).There is a companion PR in the
ufs-community'sMPAS-Modelrepo here.Note that at the moment, the combined
MPAS-Model/stochastic_physicscode can be built only withmake, notcmake. Thecmakecapability will come in a future PR.After this PR is merged, when
stochastic_physicsis being built with FV3, the-DFV3compiler flag must be used, and if it is being built with MPAS, the-DMPASflag must be used.