-
Notifications
You must be signed in to change notification settings - Fork 153
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
Implement positive-definite TVD methods for tracer transport in EDMF-TKE PBL schemes and SAMF convective schemes #754
Conversation
mass-flux schemes for tracer diffusion in the PBL and advection in cumulus convection schemes. Author: Jongil Han <jongil.han@noaa.gov>
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.
These changes are not easy to review, therefore thank you for the link to the document. To me it looks a bit like mixed bag, with a slight improvement for the tvd runs over the mid-latitude NH (PAC skill section). I wanted to add @JongilHan66 as reviewer, but I cannot since he has not yet accepted the invitation to collaborate on ccpp-physics.
From a CCPP coding point of view, the code changes are fine, although it wouldn't hurt to use more self-explanatory variable names internally in the schemes and add a little more documentation.
Just to confirm, this will change the answer for both the non-aerosol runs and thee aerosol runs, correct?
These TVD related changes are made by Jongil Han. Yes, it will change results. |
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.
The changes look good.
@grantfirl @llpcarson Can you please review this PR? We are hoping to merge it next Monday. @SMoorthi-emc @yangfanglin I want to confirm with you that you are ok with the proposed changes. Thanks! |
@rmontuoro I see there is a merge conflict for |
These changes are important not only for the updated schemes themselves but
also for other physics processes like microphysics and atmospheric
compositions. The developers have rigorously tested the impact on
sciences. So I approve this PR if there are no code merging issues.
…On Fri, Nov 5, 2021 at 10:44 AM Dom Heinzeller ***@***.***> wrote:
@grantfirl <https://github.com/grantfirl> @llpcarson
<https://github.com/llpcarson> Can you please review this PR? We are
hoping to merge it next Monday. @SMoorthi-emc
<https://github.com/SMoorthi-emc> @yangfanglin
<https://github.com/yangfanglin> I want to confirm with you that you are
ok with the proposed changes. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#754 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKY5N2KBJM2OGQ2TRFXBW6DUKP3VVANCNFSM5FPYHL5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
*Fanglin Yang, Ph.D.*
*Chief, Model Physics Group*
*Modeling and Data Assimilation Branch*
*NOAA/NWS/NCEP Environmental Modeling Center*
*https://www.emc.ncep.noaa.gov/gmb/wx24fy/fyang/
<https://www.emc.ncep.noaa.gov/gmb/wx24fy/fyang/>*
|
physics/samfdeepcnv.f
Outdated
& (ctro(i,k,kk)+ctro(i,k-1,kk)))/factor | ||
chem_c(i,k,n)=fscav(n)*ecko(i,k,kk) | ||
tem=chem_c(i,k,n)/(1.+c0t(i,k)*dz) | ||
chem_pw(i,k,n)=c0t(i,k)*dz*tem*eta(i,k-1) |
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 would have put blanks arout "=".
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.
Agree.
physics/samfdeepcnv.f
Outdated
@@ -2009,8 +2052,8 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & | |||
dp = 1000. * del(i,1) | |||
dellah(i,1) = edto(i) * etad(i,1) * (hcdo(i,1) | |||
& - heo(i,1)) * grav / dp | |||
dellaq(i,1) = edto(i) * etad(i,1) * (qrcdo(i,1) | |||
& - qo(i,1)) * grav / dp | |||
dellaq(i,1) = edto(i) * etad(i,1) * qrcdo(i,1) |
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.
If you use dpi = grav / (1000.0*del(i,1), then you could eliminate multiple divides
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.
Agree.
@climbfuji - do we still have time to implement these suggestions?
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.
Absolutely!
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.
There are lots of changes in the code and I assume Jongil has checked it well.
I have not verified everything.
Just updated all PRs to the latest code revisions. |
to increase runtime performance as suggested by S. Moorthi.
@SMoorthi-emc - I've implemented your recommendations and added a few more changes to improve performance for the deep & shallow convective schemes. @SMoorthi-emc and @JongilHan66 - could you please take a look at the changes and let me know if you agree with them? |
physics/samfdeepcnv.f
Outdated
dt = to(i,k) | ||
dg = gamma | ||
dh = heso(i,k) | ||
dz = -1.*(zo(i,k+1)-zo(i,k)) |
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.
Not trying to be picky, but we really don't need this multiplication by "-1".
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.
it could be just a "-" or you could reverse the two items inside "( )"
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.
Agree! However, this should not add compute time (the compiler should recognize this).
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.
@SMoorthi-emc - I've implemented your suggested changes.
physics/samfdeepcnv.f
Outdated
dt = to(i,k) | ||
dg = gamma | ||
dh = heso(i,k) | ||
dz = -1.*(zo(i,k+1)-zo(i,k)) |
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.
it could be just a "-" or you could reverse the two items inside "( )"
great.
…On Mon, Nov 8, 2021 at 2:28 PM Raffaele Montuoro ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In physics/samfdeepcnv.f
<#754 (comment)>:
> @@ -1992,18 +1992,18 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, &
do i = 1, im
if (cnvflg(i) .and. k < jmin(i)) then
gamma = el2orc * qeso(i,k) / to(i,k)**2
- dhh=hcdo(i,k)
- dt=to(i,k)
- dg=gamma
- dh=heso(i,k)
- dz=-1.*(zo(i,k+1)-zo(i,k))
+ dhh = hcdo(i,k)
+ dt = to(i,k)
+ dg = gamma
+ dh = heso(i,k)
+ dz = -1.*(zo(i,k+1)-zo(i,k))
@SMoorthi-emc <https://github.com/SMoorthi-emc> - I've implemented your
suggested changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#754 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLVRYQVI4E3EMKJKHTAMDLULAQFVANCNFSM5FPYHL5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Dr. Shrinivas Moorthi
Research Meteorologist
Modeling and Data Assimilation Branch
Environmental Modeling Center / National Centers for Environmental
Prediction
5830 University Research Court - (W/NP23), College Park MD 20740 USA
Tel: (301)683-3718
e-mail: ***@***.***
Phone: (301) 683-3718 Fax: (301) 683-3718
|
@JongilHan66 Are the code changes looking good to you? |
The changes which I agree on look good and would save some computing time. |
This PR introduces positive-definite Total Variation Diminishing (TVD) mass-flux methods recently developed at NOAA/EMC (Jongil Han) to improve tracer transport in EDMF-TKE PBL schemes and SAMF cumulus convective parameterizations.
The included code changes have been tested on Hera/Intel and Orion/Intel platforms.
Please see issue #753 for details. Results of MJO and jet stream diagnostic tests are available in this document.