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 virtual potential temperature in the total energy calculation #326

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

XiaqiongZhou-NOAA
Copy link
Contributor

@XiaqiongZhou-NOAA XiaqiongZhou-NOAA commented Feb 29, 2024

Description
Fix virtual potential temperature (Tv) in the total energy calculation (TE) when hydrostatic=.T. and -DUSE_COND compiling flag on.
This change will not impact non-hydrostatic runs and hydrostatic run with -DUSE_COND flag off.
The "condensate" modification part of Tv is added when -DUSE_COND is on for hydrostatic runs in order to have consistent TE calculation in fv_dynamics.F90 and fv_mapz.F90.
Note that the hydrostatic solver might not function correctly with USE_COND and/or MOIST_CAPPA in other places. Additional testing may be required.

How Has This Been Tested?

It was tested on Orion for SHiELD.

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

… hydrostatic=.T. and -DUSE_COND compiling flag on
@bensonr bensonr requested review from lharris4 and bensonr February 29, 2024 16:35
Copy link
Contributor

@lharris4 lharris4 left a comment

Choose a reason for hiding this comment

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

This is a good find, thank you. Please note that there may be other places in the code where USE_COND and/or MOIST_CAPPA may not work correctly with the hydrostatic solver; further testing may be necessary.

@XiaqiongZhou-NOAA
Copy link
Contributor Author

This is a good find, thank you. Please note that there may be other places in the code where USE_COND and/or MOIST_CAPPA may not work correctly with the hydrostatic solver; further testing may be necessary.

Agree. I added this in the description.

@bensonr bensonr merged commit 5f24469 into NOAA-GFDL:main Feb 29, 2024
74 checks passed
@bensonr
Copy link
Contributor

bensonr commented Feb 29, 2024

@XiaqiongZhou-NOAA - do you need the fix cherry-picked in to the dev/emc branch or can it wait for the reconciliation?

@XiaqiongZhou-NOAA
Copy link
Contributor Author

@XiaqiongZhou-NOAA - do you need the fix cherry-picked in to the dev/emc branch or can it wait for the reconciliation?

I can wait for the reconciliation. In addition, UFS always has -DUSE_COND and -DMOIST_CAPPA on to compile. Perhaps we need to add the option to remove these two flags when compiling hydrostatic runs in the future as SHiELD.

linjiongzhou pushed a commit to linjiongzhou/GFDL_atmos_cubed_sphere that referenced this pull request Feb 28, 2025
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.

3 participants