Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop ugwp stoch phys fix #642

Closed

Conversation

mdtoyNOAA
Copy link
Contributor

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.

  • Will the code updates change regression test baseline? No.
  • Please commit the regression test log files in your ufs-weather-model branch. Done

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.

@jkbk2004
Copy link
Collaborator

jkbk2004 commented Apr 6, 2023

Merged with #639

@jkbk2004 jkbk2004 closed this Apr 6, 2023
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.

Fix issue with level of dividing streamline (rdxzb) being overwritten and affecting stochastic physics in ugwp
2 participants