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

Correction to prog closure (convection) and ugwp stoch phys fix #57

Merged
merged 6 commits into from
Apr 6, 2023

Conversation

lisa-bengtsson
Copy link
Collaborator

@lisa-bengtsson lisa-bengtsson commented Mar 24, 2023

Solves issue: ufs-community/ufs-weather-model#1693 and #62.

This PR combines two updates:

1 - updates the prognostic closure in samfdeepcnv.f and samfshalcnv.f for HR2:

  1. correction (bug-fix) of convective cloud condensate passed to progsigma_calc.F90 routine
  2. Update to only consider positive buoyant levels in integral (to make it general if a convection scheme can have negative buoyant levels between cloud base and cloud top)
  3. Update to make the prognostic closure general to pass in q-tendency due to turbulence from any PBL scheme.
  4. Move out computation of q-tendency due to dynamics from progsigma_clac.F90 (to samfshalcnv and samfdeepcnv) because other convection schemes compute this term in a pre/post step. I will update samf* routines to use pre/post convection in the future.

The impact of these changes on the results are small, two months verification with this update can be seen here (the PR corresponds to the experiment called prog_fix2)
https://www.emc.ncep.noaa.gov/gmb/jhan/vsdbw/progcb/

2- from @mdtoyNOAA and @pjpegion Fixes a bug that occurs when running stochastic physics. As part of ccpp-physics #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.

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.

This fix needs to be done for running the GEFS.v13 reanalysis and reforecasts.

Copy link
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. It highlights a need for cleanup of the vertically-diffused tracer arrays in the future, but that is beyond the scope of this work.

@jkbk2004
Copy link

jkbk2004 commented Apr 5, 2023

@mdtoyNOAA can you confirm? #61 is combined here.

@jkbk2004
Copy link

jkbk2004 commented Apr 5, 2023

@lisa-bengtsson can you update the PR title to reflect #61?

@lisa-bengtsson lisa-bengtsson changed the title Correction of convective cloud condensate in prog closure for HR2 Correction to prog closure (convection) and ugwp stoch phys fix Apr 5, 2023
@lisa-bengtsson
Copy link
Collaborator Author

@lisa-bengtsson can you update the PR title to reflect #61?

done!

@mdtoyNOAA
Copy link
Collaborator

@mdtoyNOAA can you confirm? #61 is combined here.

Confirmed.

@jkbk2004
Copy link

jkbk2004 commented Apr 6, 2023

All tests are done at ufs-community/ufs-weather-model#1677. @grantfirl can you merge in this pr?

@grantfirl grantfirl merged commit 57c444f into ufs-community:ufs/dev Apr 6, 2023
grantfirl pushed a commit that referenced this pull request Jul 18, 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.

6 participants