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

Fix initialization of reference pressure for physics when using MPAS dynamical core #317

Merged

Conversation

kuanchihwang
Copy link
Collaborator

Tag name (required for release branches):

None

Originator(s):

PeterHjortLauritzen, nusbaume, kuanchihwang

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

Presently, MPAS dynamical core is not initializing reference pressure for physics in the same way as others. This PR backports the fix from ESCOMP/CAM#1169.

To confirm the fix, observe log entries similar to the following in atm.log.<job-id>.<date>-<time>. The reference pressure at surface now starts from 1000 hPa. Previously, it starts from 1013.25 hPa.

dyn_debug_print (0): Reference layer information:
dyn_debug_print (0): ----- | -------------- | --------------
dyn_debug_print (0): Index |     Height (m) | Pressure (hPa)
dyn_debug_print (0): ----- |   44999.999819 |       1.431394
dyn_debug_print (0):     1 |   43953.595504 |       1.655836
dyn_debug_print (0): ----- |   42907.191189 |       1.880278
dyn_debug_print (0):     2 |   41877.531046 |       2.177235
dyn_debug_print (0): ----- |   40847.870904 |       2.474192
dyn_debug_print (0):     3 |   39835.232205 |       2.867591
dyn_debug_print (0): ----- |   38822.593507 |       3.260989

... (SNIPPED) ...

dyn_debug_print (0): ----- |    1292.109873 |     856.014954
dyn_debug_print (0):    30 |     997.820649 |     887.686997
dyn_debug_print (0): ----- |     703.531425 |     919.359041
dyn_debug_print (0):    31 |     476.271636 |     945.093654
dyn_debug_print (0): ----- |     249.011847 |     970.828267
dyn_debug_print (0):    32 |     124.505924 |     985.414133
dyn_debug_print (0): ----- |       0.000000 |    1000.000000

Closes #315.

Describe any changes made to build system:

None

Describe any changes made to the namelist:

None

List any changes to the defaults for the input datasets (e.g. boundary datasets):

None

List all files eliminated and why:

None

List all files added and what they do:

None

List all existing files that have been modified, and describe the changes:

  • M src/dynamics/mpas/dyn_comp.F90
    • Sort statements
  • M src/dynamics/mpas/dyn_grid.F90
    • Properly call std_atm_pres to initialize reference pressure for physics
    • Wire up history support
    • More explicit memory management
    • Update code comments
  • M src/utils/std_atm_profile.F90
    • Allow custom surface pressure in std_atm_pres
    • Remove unused variable in std_atm_pres

Copy link
Collaborator

@nusbaume nusbaume 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, thanks @kuanchihwang!

Copy link
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

thanks @kuanchihwang !

@kuanchihwang kuanchihwang merged commit 9cc084a into ESCOMP:development Nov 8, 2024
8 checks passed
@kuanchihwang kuanchihwang deleted the staging/fix-init-ref-pres branch November 8, 2024 20:34
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.

4 participants