Skip to content

Replace GF with GFL submodule for WRF4.8 release#2269

Merged
weiwangncar merged 9 commits intowrf-model:developfrom
haiqinli:develop-gfl
Feb 20, 2026
Merged

Replace GF with GFL submodule for WRF4.8 release#2269
weiwangncar merged 9 commits intowrf-model:developfrom
haiqinli:develop-gfl

Conversation

@haiqinli
Copy link

@haiqinli haiqinli commented Jan 9, 2026

The Grell-Freitas (GF) cumulus convection is replaced with the Grell-Freitas-Li (GFL) submodule, which is consistent in WRF, MPAS and CCPP.

TYPE: new feature

KEYWORDS: submodule, cumulus, parameterization, scale-aware, aerosol-aware

SOURCE: Haiqin Li (Haiqin.Li@noaa.gov, CIRES/CU Boulder at NOAA/GSL)

DESCRIPTION OF CHANGES: The Grell-Freitas (GF) cumulus convection is replaced with the Grell-Freitas-Li (GFL) submodule, which is consistent in WRF, MPAS and CCPP. It will be easy to access the GFL updates via the hash pointer of submodule.

LIST OF MODIFIED FILES:
M .gitmodules
M Registry/Registry.EM_COMMON
M dyn_em/module_big_step_utilities_em.F
M dyn_em/module_convtrans_prep.F
M dyn_em/module_em.F
M phys/Makefile
M phys/module_cumulus_driver.F
M phys/module_lightning_driver.F
M phys/module_physics_addtendc.F
M phys/module_physics_init.F
M share/module_check_a_mundo.F
M wrftladj/module_cumulus_driver_ad.F
M wrftladj/module_cumulus_driver_tl.F
D module_cu_gf_ctrans.F
D module_cu_gf_deep.F
D module_cu_gf_sh.F
D module_cu_gf_wrfdrv.F
M chem/chem_driver.F
M chem/KPP/compile_wkc

TESTS CONDUCTED:

  1. It was tested with a NWP case and a WRF_Chem case.
  2. It passed regression tests.

RELEASE NOTE: The Grell–Freitas (GF) cumulus convection scheme has been further developed as the Grell–Freitas–Li (GFL) submodule, which is implemented consistently across WRF, MPAS, and CCPP. Major updates include improved aerosol–convection interactions, several simplified approaches for cold-pool parameterization, and a new scale-awareness feature with subsidence spreading.

References:
Li, H., G. Grell, and Freitas, S. (2026): Aerosol-dependence of cumulus convection in the United Forecast System (UFS) Weather Model, to be submitted.

Grell, G., S., Freitas, and Li, H. (2026): A New Scale Aware Technique for Convective Parameterizations, to be submitted.

@haiqinli haiqinli requested review from a team as code owners January 9, 2026 00:07
@weiwangncar
Copy link
Collaborator

@haiqinli Please fill out the PR following the template. The regression appears to fail on a chemistry case. I'm attaching the output here:
output_1.txt

@haiqinli
Copy link
Author

haiqinli commented Jan 9, 2026

@haiqinli Please fill out the PR following the template. The regression appears to fail on a chemistry case. I'm attaching the output here: output_1.txt

Thanks @weiwangncar. The PR description has been updated. From the output_1.txt, it looks like the issue is from checking out the external mmm-physics component.

2401 Checking local status of required & optional components: mmm-physics,
2402 Checking out externals: mmm-physics, ERROR:root:Command '['git', '-C', '/wrf/WRF/phys/physics_mmm', 'remote', 'add', 'NCAR_MMM-physics.git', 'https://github.com/NCAR/MMM-physics.git']' returned non-zero exit status 129.
2403 ERROR:root:Failed with output:

2440 ERROR: In directory
2441 /wrf/WRF
2442 Process did not run successfully; returned status 129:
2443 git -C /wrf/WRF/phys/physics_mmm remote add NCAR_MMM-physics.git https://github.com/NCAR/MMM-physics.git
2444 See above for output from failed command.

@weiwangncar
Copy link
Collaborator

@haiqinli Have you tested this code with a wrf-chem run?

@weiwangncar
Copy link
Collaborator

@haiqinli Also, you listed 4 changed files, but git thinks you change 18 (see the line above the PR box). Use. the following command to list the changed files: git diff --name-status develop.

@haiqinli
Copy link
Author

@haiqinli Also, you listed 4 changed files, but git thinks you change 18 (see the line above the PR box). Use. the following command to list the changed files: git diff --name-status develop.

Thanks @weiwangncar The list of changed files are updated. I will try to find a WRF-Chem case to test it, and will update when the test is done.

@haiqinli haiqinli requested a review from a team as a code owner January 14, 2026 00:52
@haiqinli
Copy link
Author

@weiwangncar It is updated for WRF_Chem, and a WRF_Chem test run was successful. Thanks!

@weiwangncar
Copy link
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : None           for
Number of Builds       : None           WRF-Chem
Number of Simulations  : 23           24         150
Number of Comparisons  : 60           57         86

Failed Simulations are: 
0
Which comparisons are not bit-for-bit: 
0

@weiwangncar
Copy link
Collaborator

@haiqinli Thanks, Haiqin!

dudhia
dudhia previously approved these changes Jan 27, 2026
Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

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

WRF repo changes are mostly just safe name changes.

@weiwangncar
Copy link
Collaborator

@haiqinli If you can add a few sentences to summarize the major updates in the new scheme, that would be greatly appreciated. Also please add a description of the PR in the RELEASE NOTE section - this section will be pulled out to make the release note, hence it is a good place to provide information. Thanks!

@haiqinli
Copy link
Author

haiqinli commented Feb 3, 2026

@haiqinli If you can add a few sentences to summarize the major updates in the new scheme, that would be greatly appreciated. Also please add a description of the PR in the RELEASE NOTE section - this section will be pulled out to make the release note, hence it is a good place to provide information. Thanks!

Thanks Wei. The summary of this PR and updates have been added in the RELEASE NOTE section.

@weiwangncar
Copy link
Collaborator

@haiqinli There is at least one failed case for WRF-Chem after moving .F to .F90. Output is attached. Also there is no need for you to merge your branch to develop - git will do that automatically. Failed test below:
output_1.txt

@haiqinli
Copy link
Author

haiqinli commented Feb 4, 2026

@haiqinli There is at least one failed case for WRF-Chem after moving .F to .F90. Output is attached. Also there is no need for you to merge your branch to develop - git will do that automatically. Failed test below: output_1.txt

Thanks for attaching the output_1.txt file. The issue may from line 379 of module_cu_gfl_deep.F90, the inout variables of edto,edtm are not explicitly declared. However, it looks like there are still failed RT cases. How can I check the RT log file? Thanks.

@weiwangncar weiwangncar removed the Retest label Feb 5, 2026
@weiwangncar
Copy link
Collaborator

@haiqinli It still fails one of the WRF-Chem test: test_001s, NML=5, which uses GFL scheme. The output is attached:
output_1.txt
The namelist.input data is followed by the failed run. To repeat the run, you can find the test data on Derecho in /glade/derecho/scratch/weiwang/Data/em_chem/. If you do not have Derecho account, you can get the data by 'wget https://www2.mmm.ucar.edu/wrf/dave/data_smaller.tar.gz', which is described in one of the files contained in wrf_output.zip: email_01.txt.

@haiqinli
Copy link
Author

haiqinli commented Feb 7, 2026

@weiwangncar It looks like the regression test was successful on hash of d5fc9b8. May I revert the HEAD to that hash and then add the code updates? Thanks.

@weiwangncar
Copy link
Collaborator

@weiwangncar It looks like the regression test was successful on hash of d5fc9b8. May I revert the HEAD to that hash and then add the code updates? Thanks.

@haiqinli It may be a reasonable idea. The last commit still fails the same WRF-Chem test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@haiqinli Not sure why your branch shows the path like this. Looking at the standard 4.7.1 or develop branch code, the path is exactly like you've changed to.

Copy link
Author

Choose a reason for hiding this comment

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

This develop-gfl branch was forked from the develop branch, and we changed it when compiled and tested for WRF-Chem.

Copy link
Author

Choose a reason for hiding this comment

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

@weiwangncar I set up the WRF-Chem test run case to test the RT case of em_chem_5, and the test run was successful when turning off mid convection. I just updated the PR and hope this change can pass the RTs. Thanks!

@weiwangncar
Copy link
Collaborator

@haiqinli It looks like the the reg tests have passed, though the output looks misleading (not sure why the one of the output for 'Number of Builds' has WRF-Chem as output):

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : None           for
Number of Builds       : None           WRF-Chem
Number of Simulations  : 23           24         150
Number of Comparisons  : 60           57         86

Failed Simulations are: 
0
Which comparisons are not bit-for-bit: 
0

@haiqinli
Copy link
Author

@weiwangncar Thanks, Wei! Glad to see the regression tests passed. I’ll make a small update to the convection and keep the *F format for WRF.

@weiwangncar
Copy link
Collaborator

@haiqinli Not sure what you've changed inside the GFL repository, but the last commit failed the same chem test as before with the error:

*** Error in `wrf.exe': munmap_chunk(): invalid pointer: 0x000000003bc1e6c0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7f474)[0x150c5dc7c474]

Just wondering if you can run the same test case on your testing system? Can you just do the F to F90 change without changing the GFL repository?

@haiqinli
Copy link
Author

@weiwangncar Thanks Wei. The changes include some tuning for WRF model. I am not familiar with WRF-Chem. I will try to set up and debug with this failed chem case. Will update when I have progress. Thanks!

@weiwangncar
Copy link
Collaborator

@haiqinli It looks like the tests have passed. Thanks for the effort! Do you generally find mid-level convection improves forecasts? Do you plan to investigate why the chemistry case doesn't work with mid-level convection turned on?

To resolve conflicts.
Adding missed 'fi'.
@weiwangncar
Copy link
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar
Copy link
Collaborator

@dudhia @islas I've taken the opportunity to move the order of submodules so that MYNN-sfc is now after MYNN-PBL.

Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

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

Thanks for getting this to work.

@haiqinli
Copy link
Author

@haiqinli It looks like the tests have passed. Thanks for the effort! Do you generally find mid-level convection improves forecasts? Do you plan to investigate why the chemistry case doesn't work with mid-level convection turned on?

@weiwangncar In our previous experience, mid convection has been optional rather than essential. We have not encountered issues with mid-convection in FV3 or MPAS. I will keep this WRF-Chem case and continue to investigate it in the future. Thanks!

@weiwangncar weiwangncar merged commit 0e046a6 into wrf-model:develop Feb 20, 2026
1 check passed
@islas islas mentioned this pull request Mar 5, 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.

3 participants