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

Kessler physics using inconsistent reference pressures #802

Closed
nusbaume opened this issue May 4, 2023 · 2 comments
Closed

Kessler physics using inconsistent reference pressures #802

nusbaume opened this issue May 4, 2023 · 2 comments
Assignees
Labels
bug Something isn't working correctly
Milestone

Comments

@nusbaume
Copy link
Collaborator

nusbaume commented May 4, 2023

What happened?

While going through the use of CCPP standard names in our physics code, I saw that Kessler is being given a "reference" pressure that is the US standard atmosphere sea level pressure (i.e. 1013.25 hPa) to convert from the provided Exner function. However, the Exner function itself is calculated using a reference pressure of 1000 hPa (which is also used in Klemp et al. referenced in the Kessler code). Thus when values are calculated using the Exner function in Kessler there is an unphysical ~1.013 offset that occurs.

What are the steps to reproduce the bug?

Look at kessler_cam_init in physics/simple/kessler_cam.F90, kessler_init and kessler_run in atmos_phys/kessler/kessler.F90, and calc_exner_run in atmos_phys/utilities/state_converters.F90.

What CAM tag were you using?

cam6_3_109

What machine were you running CAM on?

Other (please explain below)

What compiler were you using?

Other (please specify below)

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Yes

Extra info

I will fix this issue when I bring in an updated version of the atmospheric_physics external (issue #752)

@nusbaume nusbaume added the bug Something isn't working correctly label May 4, 2023
@nusbaume nusbaume self-assigned this May 4, 2023
@adamrher
Copy link

adamrher commented May 5, 2023

Nice catch, Jesse. Should we also use a shared variable in computing exner in calc_exner_run:

    do i=1,nz
      exner(:ncol,i) = (pmid(:ncol,i)/1.e5_kind_phys)**(rair/cpair)
    end do

since the reference pressure is hard coded here.

@nusbaume
Copy link
Collaborator Author

nusbaume commented May 5, 2023

@adamrher Yes, good call! I've gone ahead and made a new issue in the atmospheric_physics repo to make sure we address this, which can be found here:

ESCOMP/atmospheric_physics#61

I'll hopefully implement the change right before I update the externals here in CAM.

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
Projects
Status: Done
Development

No branches or pull requests

3 participants