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 fixes a bug that occurs when running stochastic physics. As part of ccpp-physics PR#22, the order in which subroutines "gwdps_run" and "drag_suite_run" were called by subroutine "unified_ugwp_run" was reversed. Subroutine "drag_suite_run" is called last, but the variable "RDXZB" (the level of the dividing streamline for blocking) is initialized, which zeros out the value that was calculated in "gwdps_run". RDXZB is needed outside of the unified_ugwp subroutine by stochastic physics. This caused stochastic physics runs to crash. The bug was not caught by regression testing.
The problem has been fixed by changing the declaration of "RDXZB" from "intent(out)" to "intent(inout)" in drag_suite.F90 and drag_suite.meta, and initializing it in drag_suite.F90 only when the GSL drag suite blocking is performed, i.e., when "do_gsl_drag_ls_bl" is equal to .true.
*** This fix needs to be done for running the GEFS.v13 reanalysis and reforecasts.
Issue(s) addressed
Link the issues to be closed with this PR, whether in this repository, or in another repository.
Testing
The stochastic physics team (@pjpegion et al) has tested the revised code, and the crashes no longer occur. Regression tests and ORT's have passed (Hera -- Intel) with no changes to the baseline.
What compilers / HPCs was it tested with? Intel
Are the changes covered by regression tests? No change to baseline test results.
Have the ufs-weather-model regression test been run? On what platform? Yes. Hera.
Dependencies
If testing this branch requires non-default branches in other repositories, list them.
https://github.com/mdtoyNOAA/ccpp-physics: ufs/dev_ugwp_stoch_phys_fix branch
CCPP PR#61.