-
Notifications
You must be signed in to change notification settings - Fork 700
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
Bug fix in buoyancy diagnostic function #1430
Bug fix in buoyancy diagnostic function #1430
Conversation
1. Correct the most unstable (MU) layer definition from the max water vapor mixing ratio (w) level to the max equivalent potential temperature (Theta-e) level. Because it is the theta-e rather than mixing ratio that is conserved during the dry/moist adiabatic lifting processes. 2. Correct precipitable water (Pwat) definition from column accumulated mass of water vapor and cloud water to only water vapor. This is based on the AMS glossary https://glossary.ametsoc.org/wiki/Precipitable_water. 3. Supplement equilibrium level (EL) calculation, which is the highest model level when buoyancy turns from positive to negative. Save corrected MU layer height, LCL, EL as output variables. 4. Compute and save MUCAPE, MUCIN and LFC by refined definitions: MUCAPE and MUCIN are defined as the vertically integrated positive and negative buoyant energy between LCL and EL with the air parcel lifted from MU layer. LFC is defined as the highest separation level when buoyancy turns from negative to positive.
@zhixiaozhang
|
phys/module_diag_functions.F
Outdated
FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, & | ||
parcel ) result (ostat) | ||
FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlcl, zlfc, zel, zmu, & | ||
parcel ) result (ostat) !Add declaration of lcl, el, and MU layer. Modified by Zhixiao. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the arguments changed but not the function call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davegill @dudhia Yeah, phys/module_diag_afwa.F and Registry/registry.afwa are recommended to be consistently modified based on this argument changes in buoyancy function. Despite this, we made other frame changes that are specialized for our simulation, but can not be generalized for public use. To less confuse the public, I try to avoid comprehensive frame modifications here and only uploaded the module_diag_functions.F.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davegill @dudhia @zhixiaozhang To clarify, I believe Zhixiao uploaded all of his code changes to module_diag_functions.F but these require changes to the driver and registry files because of new variables (height of most unstable layer (zmu), equilibrium level (zel), and LCL (zlcl). Those new variables are not a bug fix though and are an add on that may or may not be useful. I don't know if those go through a different process to implement added diagnostics. If the bug fixes alone are to be implemented (the most unstable (MU) layer definition and the calculation of precipitable water), then all of the other code related to new variables needs to be removed, and then the file should work. if that is what is wanted, I believe Zhixiao can do that without too much work. If instead, the added variables are also wanted, then Zhixiao can supply the other modified driver and registry files.
Yes, minimizing the changes to just the MU CAPE and PW would be
appreciated. Thanks.
…On Thu, Mar 11, 2021 at 11:01 AM avarble ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In phys/module_diag_functions.F
<#1430 (comment)>:
> @@ -436,8 +439,8 @@ END FUNCTION Pwat
!~ to higher levels. ~!
!~ ~!
!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
- FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, &
- parcel ) result (ostat)
+ FUNCTION Buoyancy ( nz, tk, rh, p, hgt, sfc, cape, cin, zlcl, zlfc, zel, zmu, &
+ parcel ) result (ostat) !Add declaration of lcl, el, and MU layer. Modified by Zhixiao.
@davegill <https://github.com/davegill> @dudhia
<https://github.com/dudhia> @zhixiaozhang
<https://github.com/zhixiaozhang> To clarify, I believe Zhixiao uploaded
all of his code changes to module_diag_functions.F but these require
changes to the driver and registry files because of new variables (height
of most unstable layer (zmu), equilibrium level (zel), and LCL (zlcl).
Those new variables are not a bug fix though and are an add on that may or
may not be useful. I don't know if those go through a different process to
implement added diagnostics. If the bug fixes alone are to be implemented
(the most unstable (MU) layer definition and the calculation of
precipitable water), then all of the other code related to new variables
needs to be removed, and then the file should work. if that is what is
wanted, I believe Zhixiao can do that without too much work. If instead,
the added variables are also wanted, then Zhixiao can supply the other
modified driver and registry files.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1430 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIZ77B3QRXGCP53JQ3XRWDTDDZOVANCNFSM4Y7SKHFQ>
.
|
Since the outputting of extra diagnostics is now removed, I would prefer that related code for these is also removed so that we can see the MU CAPE change by itself in this PR. We may want to have these additional diagnostics in the future, but that should be a separate PR at a later stage. |
Might be good to show an example of how this improves MUCAPE for a given sounding. |
@zhixiaozhang It may be good to add a comment about how much the variables change (and in which direction) because of the modification. Thanks. |
@weiwangncar @dudhia Thanks for the comments. As the sounding example shown by Adam, the max water vapor mixing ratio in original code can not indicate the parcel lifting level with the maximum CAPE. Compared to original code, our modifications define the MU layer as the max theta-e level and refine the MUCAPE and MUCIN definition as the integrated energy between LCL and EL, which will increase MUCAPE, decrease MUCIN, and slightly elevate LFC in specific scenarios. We have contacted our colleague Katelyn to supplement more analysis. We will update her findings later. |
@zhixiaozhang Thanks for providing more test results. |
Correct MU layer and PWAT, refine CAPE, CIN, LFC TYPE: bug fix, enhancement KEYWORDS: Most unstable layer, Precipitable water, CAPE, CIN, LFC SOURCE: Zhixiao Zhang (University of Utah), Adam Varble (PNNL and University of Utah), and Katelyn Barber (PNNL) DESCRIPTION OF CHANGES: Problem: The most unstable (MU) layer and precipitable water(PWAT) are inconsistent with the conventional definitions in meteorological communities. LFC, CAPE and CIN calculations do not work well while dealing with multiple inversion layers. Solution: 1. Correct the MU layer definition from the max water vapor mixing ratio (w) level to the max equivalent potential temperature (Theta-e) level. Because it is the theta-e rather than mixing ratio conserved during the dry/moist adiabatic lifting processes. 2. Correct PWAT definition from column accumulated total mass of water vapor and cloud water to only water vapor. This is based on the AMS glossary https://glossary.ametsoc.org/wiki/Precipitable_water. 3. Calculate MUCAPE, MUCIN and LFC by refined definitions: MUCAPE and MUCIN are defined as the vertically integrated positive and negative buoyant energy between LCL and EL with the air parcel lifted from MU layer. LFC is defined as the highest separation level when buoyancy turns from negative to positive. LIST OF MODIFIED FILES: phys/module_diag_functions.F TESTS CONDUCTED: 1. The modified code has been complied successfully and applied on regional climate simulations for CACTI field campaign. 2. In elevated deep convection regimes when the highest water vapor mixing ratios are still at low levels but the most unstable parcel is at a higher altitude, the differences can be large. An example of such a sounding is attached. The original diagnostic would choose a parcel starting at the surface where the highest water vapor mixing ratio exists. That parcel has no CAPE and obviously a lot of CIN. The most unstable parcel with the highest theta-e (you can find this using the highest dashed green moist adiabat value) is just above the 700-mb level which is a parcel with CAPE and very little CIN. ![upperair DOE_M1_sonde 201811121200 skewT](https://user-images.githubusercontent.com/17436975/111506933-5ffeff80-8707-11eb-89ff-a24590d419c2.png) 3. Jenkins testing is all PASS. OTHER NOTES: The modification is based on WRF 4.1.1. The relevant AFWA module, diagnostic driver and registry require to be consistently modified in the latest source code by maintainers. RELEASE NOTE: A few updates to the diagnostic schemes were added. The most unstable (MU) layer and precipitable water(PWAT) were inconsistent with the conventional definitions used by the meteorological communities. LFC, CAPE and CIN calculations previously did not work well while dealing with multiple inversion layers.
Correct MU layer and PWAT, refine CAPE, CIN, LFC
TYPE: bug fix, enhancement
KEYWORDS: Most unstable layer, Precipitable water, CAPE, CIN, LFC
SOURCE: Zhixiao Zhang (University of Utah), Adam Varble (PNNL and University of Utah), and Katelyn Barber (PNNL)
DESCRIPTION OF CHANGES:
Problem:
The most unstable (MU) layer and precipitable water(PWAT) are inconsistent with the conventional definitions in
meteorological communities. LFC, CAPE and CIN calculations do not work well while dealing with multiple inversion
layers. The vertical buoyancy integration for calculating CAPE is unexpectedly stopped when the lifted parcel is colder than 253.15 K.
Solution:
temperature (Theta-e) level. Because it is the theta-e rather than mixing ratio conserved during the dry/moist
adiabatic lifting processes.
This is based on the AMS glossary https://glossary.ametsoc.org/wiki/Precipitable_water.
integrated positive and negative buoyant energy between LCL and EL with the air parcel lifted from MU layer. LFC
is defined as the highest separation level when buoyancy turns from negative to positive.
LIST OF MODIFIED FILES:
phys/module_diag_functions.F
TESTS CONDUCTED:
campaign.
OTHER NOTES: The modification is based on WRF 4.1.1. The relevant AFWA module, diagnostic driver and registry require to be consistently modified in the latest source code by maintainers.
RELEASE NOTE: A few updates to the diagnostic schemes were added. The most unstable (MU) layer and precipitable water(PWAT) were inconsistent with the conventional definitions used by the meteorological communities. LFC, CAPE and CIN calculations previously did not work well while dealing with multiple inversion layers.