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

Add number concentration calculations to YOG code. #23

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

jatkinson1000
Copy link
Member

@jatkinson1000 jatkinson1000 commented Jul 31, 2024

This PR should close #18 by adding a calculation for number concentration tendency to the YOG code using the updated cloud liquid and ice tendencies.

  • The number concentration calculation is taken from the clubb routines.
  • Number concentration tendency from YOG is allowed to be negative, but cannot reduce total number concentration below zero.
  • Number concentration tendency from YOG is added as an optional output to the statistics files.

@jatkinson1000 jatkinson1000 self-assigned this Jul 31, 2024
@jatkinson1000 jatkinson1000 added the enhancement New feature or request label Jul 31, 2024
@jatkinson1000 jatkinson1000 force-pushed the number-concentration branch from a381697 to 17eb977 Compare July 31, 2024 13:58
Copy link

@paogorman paogorman left a comment

Choose a reason for hiding this comment

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

This code looks good.
Regarding the check that number concentrations not go negative: It may not be necessary because I just noticed that there is already a check for number concentrations to stay non-negative in physics_update:
if (m /= ixnumice .and. m /= ixnumliq .and. &
m /= ixnumrain .and. m /= ixnumsnow ) then
call qneg3(trim(ptend%name), state%lchnk, ncol, state%psetcols, pver, m, m, qmin(m:m), state%q(:,1:pver,m:m))
else
do k = ptend%top_level, ptend%bot_level
! checks for number concentration
state%q(:ncol,k,m) = max(1.e-12_r8,state%q(:ncol,k,m))
state%q(:ncol,k,m) = min(1.e10_r8,state%q(:ncol,k,m))
end do
end if
On the other hand, we have these kind of checks throughout our yog scheme so maybe it is consistent to have it also.

Copy link
Collaborator

@MarionBWeinzierl MarionBWeinzierl 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, only one minor comment

src/physics/cam/yog_intr.F90 Show resolved Hide resolved
…clarify we have another check later in physics_update().
@jatkinson1000 jatkinson1000 merged commit 74cbc69 into CAM-ML Sep 12, 2024
@jatkinson1000 jatkinson1000 deleted the number-concentration branch September 12, 2024 13:43
@jatkinson1000 jatkinson1000 restored the number-concentration branch September 12, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output number concentration from YOG for further diagnostics
3 participants