Skip to content

UGWP_v0: Scale cdmbgwd(1:2) by inverse square root of dx#1218

Merged
grantfirl merged 7 commits into
NCAR:mainfrom
matusmartini:cdmbgwd_scale_ugwp_v0
Jun 17, 2026
Merged

UGWP_v0: Scale cdmbgwd(1:2) by inverse square root of dx#1218
grantfirl merged 7 commits into
NCAR:mainfrom
matusmartini:cdmbgwd_scale_ugwp_v0

Conversation

@matusmartini

@matusmartini matusmartini commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes:

This aims to generalize the UGWP version 0 gravity wave drag scheme based on tuning experiments at NRL. This scheme is effectively only used by NEPTUNE.

  • Scale mountain blocking (MB) and orographic gravity wave (OGW) drag multiplication factors by the inverse square root of grid spacing:
cdmb4 = cdmbgwd(1) / sqrt(dx)   ! MB multiplication factor
cleff = cdmbgwd(2) / sqrt(dx)   ! OGW multiplication factor

where cdmbgwd(1:2) are namelist parameters specified by host model. We found that the relationship holds across different resolutions. The tuning experiments with NEPTUNE were conducted over four months of simulations with dx at ~16, 32, and 64 km.

Basic idea

Different cdmbgwd(1:2) factors for different grid spacings dx are no longer needed. A single parameter cdmbgwd(1) is now used to scale MB, and another single parameter cdmbgwd(2) is used to scale OGW drag.


Note that the UGWP_v0 scaling does not work across different dx, as users have to adjust the multiplication factors based on resolution. In the UGWP_v0, the original scaling is expressed as:

cdmb4 = constant_1 * cdmbgwd(1) / lonr
cleff = constant_2 * cdmbgwd(2) / sqrt(lonr)

where lonr is the number of points on the equator. Since dx is approximately length_of_equator / lonr, the original relationship for cdmb4 was roughly a linear function of dx while for cleff it was roughly a function of sqrt(dx); however, cdmbgwd(1:2) multiplication factors are still a function of dx (namelist specified based on dx).

Caveat

This version 0 of GWD scheme is still used in some of the older systems based on: #1202 (comment) so this PR will affect current operational models, including GFSv16, GEFSv12 etc. However, "all the upcoming implementations will not use this scheme anymore." At minimum cdmbgwd(1:2) will need to be reconfigured in all namelists that use gwdps_v0.

  • This PR also includes minor fix to replace the non-ascii "1/2" with its ascii representation to satisfy NEPTUNE ci test requirement.

Tests Conducted:

  • Extensive tests with NEPTUNE for months Apr, July, Oct, and Jan (47 cold starts) at E96P6, E48P6, E24P6.
  • Verification results were presented at CCPP Physics meeting on May 20, 2026.
  • The results are not b4b identical because this is the best fit.

Dependencies:

None.

Matus Martini added 2 commits May 18, 2026 17:54
* Scale cdmb with the inverse square root of dxres in ugwp_v0

* Scale cleff with the inverse square root of dxres in ugwp_v0

* Replace the non-ascii 1/2 with its ascii representation to satisfy ci
test requirement.
* Make cdmbgwd0 to be rank 4

* Unify cdmbgwd0 and cdmbgwd
Comment thread physics/GWD/ugwp_driver_v0.F90 Outdated
@@ -485,6 +485,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, &
sigres = max(sigmin, sigma(J))
if (hprime(J)/sigres > dxres) sigres = hprime(J)/dxres

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

One cleanup comment: This line (L486) is unnecessary because it is always .false. and can be removed. It also appears to be a leftover from earlier code, as dxres — used in the loop above — depends on j. Reassuringly, this if check has been removed in the corresponding section of the UGWP_v1 code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in 7ff8e06
More cleanup could be done but I will leave the rest as is.

@mdtoyNOAA mdtoyNOAA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Based on the success of your tuning experiments with NEPTUNE, I approve this pull request.

!!!
!!! Create the momentum height (layer interface) array. The original momentum layers are used above the canopy height.
!!! Below the canopy height, the "momentum" layers are assumed to be ½ way between the thermodynamic layers.
!!! Below the canopy height, the "momentum" layers are assumed to be 1/2 way between the thermodynamic layers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is fixed in an upcoming PR from the ufs/dev branch already. It will get merged before this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thank you. I see it in. It's the same change and can be merged cleanly.

@grantfirl

Copy link
Copy Markdown
Collaborator

Note to self: add @matusmartini @areinecke to CODEOWNERS for the v0 scheme.

@climbfuji

Copy link
Copy Markdown
Collaborator

@matusmartini Can you update the PR description, please, to show the change in the cdmbgwd coefficients in the host model? Because we now divide by sqrt(dxres), they must be a lot larger than they were before. Thanks!

@matusmartini

Copy link
Copy Markdown
Collaborator Author

@matusmartini Can you update the PR description, please, to show the change in the cdmbgwd coefficients in the host model? Because we now divide by sqrt(dxres), they must be a lot larger than they were before. Thanks!

I added one more commit (should be the last) to multiply the coefficients with a power of 10 so the namelist parameter for each MB and OGW from host model are within [0, 10]. For NEPTUNE the resulting cdmb is a factor of ~10 larger than before, and the resulting cleff is several 100 times larger than before. Note that with NEPTUNE, the before setting used cdmbwd=3.5,0.25 for all resolutions which was inappropriate.

@grantfirl grantfirl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was discussed in a meeting and all stakeholders for this scheme approve of the science changes.

@grantfirl

Copy link
Copy Markdown
Collaborator

@matusmartini Please accept the GitHub invitation for this repo. You're being added as a collaborator with write permissions so that you can correctly be notified as a CODEOWNER whenever there is a PR for the ugwp_v0 scheme.

@matusmartini

Copy link
Copy Markdown
Collaborator Author

@matusmartini Please accept the GitHub invitation for this repo. You're being added as a collaborator with write permissions so that you can correctly be notified as a CODEOWNER whenever there is a PR for the ugwp_v0 scheme.

Thank you. I will. I need to set up a 2-factor authenticator app first.

@grantfirl grantfirl merged commit ef0211a into NCAR:main Jun 17, 2026
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