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

Implement positive-definite TVD methods for tracer transport in EDMF-TKE PBL schemes and SAMF convective schemes #754

Merged
merged 10 commits into from
Nov 9, 2021

Conversation

rmontuoro
Copy link
Contributor

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.

Copy link
Collaborator

@climbfuji climbfuji left a 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?

@SMoorthi-emc
Copy link
Collaborator

These TVD related changes are made by Jongil Han. Yes, it will change results.

@climbfuji climbfuji requested a review from JongilHan66 October 30, 2021 01:37
Copy link
Collaborator

@JongilHan66 JongilHan66 left a 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.

@climbfuji
Copy link
Collaborator

@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!

@climbfuji
Copy link
Collaborator

@rmontuoro I see there is a merge conflict for physics/satmedmfvdifq.meta. I guess you will have to pull in the latest updates from the authoritative repositories for all your PRs (note the upcoming ufs-weather-model HAFS doc update for the top-level repository, fv3atm and ccpp-physics won't change before your PR).

@yangfanglin
Copy link
Collaborator

yangfanglin commented Nov 5, 2021 via email

& (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)
Copy link
Collaborator

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 "=".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree.

@@ -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)
Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Absolutely!

Copy link
Collaborator

@SMoorthi-emc SMoorthi-emc left a 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.

@rmontuoro
Copy link
Contributor Author

@rmontuoro I see there is a merge conflict for physics/satmedmfvdifq.meta. I guess you will have to pull in the latest updates from the authoritative repositories for all your PRs (note the upcoming ufs-weather-model HAFS doc update for the top-level repository, fv3atm and ccpp-physics won't change before your PR).

Just updated all PRs to the latest code revisions.

@rmontuoro
Copy link
Contributor Author

@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?

dt = to(i,k)
dg = gamma
dh = heso(i,k)
dz = -1.*(zo(i,k+1)-zo(i,k))
Copy link
Collaborator

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".

Copy link
Collaborator

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 "( )"

Copy link
Contributor Author

@rmontuoro rmontuoro Nov 8, 2021

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).

Copy link
Contributor Author

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.

dt = to(i,k)
dg = gamma
dh = heso(i,k)
dz = -1.*(zo(i,k+1)-zo(i,k))
Copy link
Collaborator

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 "( )"

@SMoorthi-emc
Copy link
Collaborator

SMoorthi-emc commented Nov 8, 2021 via email

@junwang-noaa
Copy link
Collaborator

@JongilHan66 Are the code changes looking good to you?

@JongilHan66
Copy link
Collaborator

The changes which I agree on look good and would save some computing time.

@climbfuji climbfuji merged commit d189642 into NCAR:main Nov 9, 2021
hannahcbarnes pushed a commit to hannahcbarnes/ccpp-physics that referenced this pull request Aug 3, 2022
…chemes (NCAR#408)

This PR implements changes supporting TVD methods for PBL and cumulus convective parameterizations introduced by ccpp/physics PR NCAR#754 (Jongil Han, NOAA/EMC).
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