Enable SPPT with the MPAS dycore#97
Draft
gsketefian wants to merge 27 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.
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 is the PR to enable
stochastic_physicsto use SPPT with the MPAS dycore, as described in Issue #94.Note that I created a new branch in our (
dtcenter) for ofstochastic_physicsnamedgsl/MPAS_stoch_physics_try_merge_stoch_masterspecifically for the PR. Once the PR is merged, we can merge the result back intogsl/MPAS_stoch_physics.This code can be built under MPAS with
makebut not yetcmake. I did not have time to merge in Guoqing'scmakePRs (PR into stochastic_physics and PR into MPAS-Model) into our code.Unfortunately I did not have time to create a parallel PR into the
ufs-community/MPAS-Modelrepo. That needs to be created using the branchgsl/MPAS_stoch_physics_try_merge_stoch_masterin our (dtcenter) fork ofMPAS-Model. But I do have working code on hera at:(which itself is under
mpas_app, but still valid). Feel free to look at that and/or clone thegsl/MPAS_stoch_physics_try_merge_stoch_masterbranches from our forks ofstochastic_physicsandMPAS-Model(and compare tomasterandgsl/develop, respectively; I still need to update ourgsl/developwith the latest fromufs-community). I ran this code successfully on our CONUS 15km grid. The result is on hera at:I included new macros (
FV3_STOCHandMPAS_STOCH) in this PR to indicate whetherstochastic_physicsis being used by FV3 or MPAS (see the new filemacros.hthat is now#included in several other files).To enable running with FV3, the weather model must set
-DFV3_STOCHin the build commands to indicate thatstochastic_physicsis being used with FV3. I have not tested this code with FV3, so even after-DFV3_STOCHis included, there may be other things that are broken with FV3. Similarly, during the MPAS-Model build, the flag-DMPAS_STOCHmust be specified in the build commands sostochastic_physicsknows it needs to be build for MPAS, not FV3. The-DMPAS_STOCHflag is now in the top-levelMakefileinufs-community:MPAS-Model(but as stated above, I haven't created the PR for those changes).So, to-do's (in no particular order):
cmakebuild.FV3.ufs-community:gsl/developintodtcenter:gsl/develop. Then merge the resultingdtcenter:gsl/developintodtcenter:gsl/MPAS_stoch_physics_try_merge_stoch_master. Finally, create a new PR intoufs-community/MPAS-Model:gsl/developfromdtcenter:gsl/MPAS_stoch_physics_try_merge_stoch_master.I could not find Dustin's handle in this repo. If anyone knows, can you add him to the list below?
@JeffBeck-NOAA @NingWang325 @willmayfield @CPKalb