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

sending pbl_utils the wrong definition of 'theta' in clubb_intr.F90 #1222

Open
adamrher opened this issue Jan 13, 2025 · 0 comments
Open

sending pbl_utils the wrong definition of 'theta' in clubb_intr.F90 #1222

adamrher opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels
bug Something isn't working correctly CoupledEval3

Comments

@adamrher
Copy link

What happened?

During one of my clubb cleanup PRs, I introduced a bug by changing the calculation of theta that is sent to pbl_utils from clubb_intr.F90.

    ! --------------------------------------------------------------------------------- !
    !  DIAGNOSE THE PBL DEPTH                                                           !
    !  this is needed for aerosol code                                                  !
    ! --------------------------------------------------------------------------------- !
    do i=1,ncol
      do k=1,pver
         !use local exner since state%exner is not a proper exner
         th(i,k) = state1%t(i,k)*inv_exner_clubb(i,k)
         !thv should have condensate loading to be consistent with earlier def's in this module
         thv(i,k) = th(i,k)*(1.0_r8+zvir*state1%q(i,k,ixq) - state1%q(i,k,ixcldliq))
      enddo
    enddo

We should be using state%exner to compute th since that is the pbl version of exner, i.e., "not a proper exner". These vars th / thv are fed into pbl_utils, which requires them to computed using the pbl version of exner. This should impact the PBLH variable used elsewhere in the model (e.g., ZM).

What are the steps to reproduce the bug?

run any compset that uses clubb

What CAM tag were you using?

cam6_4_045

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

No response

@adamrher adamrher added the bug Something isn't working correctly label Jan 13, 2025
@adamrher adamrher self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly CoupledEval3
Projects
Status: To Do
Development

No branches or pull requests

2 participants