You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The freqsh diagnostic in CAM4 shallow convection code is incorrectly defined.
! --------------------------------------------------------!
! Calculate fractional occurance of shallow convection !
! --------------------------------------------------------!
! Modification : I should check whether below computation of freqsh is correct.
freqsh(:) =0._r8do i =1, ncol
if( maxval(cmfmc2(i,:pver)) <=0._r8 ) then
freqsh(i) =1._r8end ifend do
That is indeed strange -- a value of 1 should be assigned to the column when there is shallow convection. The comment above it "! Modification : I should check whether below computation of freqsh is correct." suggests we aren't the only one who thinks so (can you git blame this comment?).
I looked through hk_conv.F90 and verified that the array (cmfmc2, which I presume is cmfmc_sh in your code) cannot be negative. There are explicit limiters on the components that are summed and multiplied to give cmfmc2: beta and eta:
if (eta(i) > tmass*rtdt .or. eta(i) <=0.0_r8) eta(i) =0.0_r8
.
And beta is limited using beta(i) = max(0.0_r8,beta(i)) statements anytime it's modified. So I believe this is a bug in this particular diagnostic, and that the logic should be: if (maxval(cmfmc_sh(i,:)) > 0._kind_phys) then
What are the steps to reproduce the bug?
Observe definition of freqsh in a CAM4 model run
What CAM tag were you using?
cam6_4_055
What machine were you running CAM on?
CISL machine (e.g. cheyenne)
What compiler were you using?
Intel
Path to a case directory, if applicable
No response
Will you be addressing this bug yourself?
Yes
Extra info
Found this during CCPPization work of Hack shallow convection.
Will likely address this in a separate PR after the CCPPization, in order to maintain bit-for-bit of the eventual CCPP PR.
The text was updated successfully, but these errors were encountered:
What happened?
The
freqsh
diagnostic in CAM4 shallow convection code is incorrectly defined.From @adamrher:
What are the steps to reproduce the bug?
Observe definition of
freqsh
in a CAM4 model runWhat CAM tag were you using?
cam6_4_055
What machine were you running CAM on?
CISL machine (e.g. cheyenne)
What compiler were you using?
Intel
Path to a case directory, if applicable
No response
Will you be addressing this bug yourself?
Yes
Extra info
Found this during CCPPization work of Hack shallow convection.
Will likely address this in a separate PR after the CCPPization, in order to maintain bit-for-bit of the eventual CCPP PR.
The text was updated successfully, but these errors were encountered: