Repository navigation
Conversation
TYPE: text only KEYWORDS: license, Apache-2.0, contributor license, doc/licenses SOURCE: Yoel Sevi (Google) DESCRIPTION OF CHANGES: Problem: Following the contributor-license mechanism established in PR wrf-model#2242 (doc/licenses/fraunhofer_license.txt), Google-authored code blocks in subsequent performance pull requests need a standalone permissive license file under doc/licenses/ while leaving WRF's root LICENSE.txt unmodified. Solution: Add doc/licenses/google_license.txt containing the Apache License, Version 2.0 (Copyright 2026 Google LLC), referenced by `! THE FOLLOWING LINES OF CODE ARE LICENSED UNDER doc/licenses/google_license.txt` and `! END LICENSE` comment markers around Google-authored code blocks. If maintainers prefer lower inline marker density on PRs with interleaved edits, I am happy to explore a lighter per-routine notice option. License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt). ISSUE: None LIST OF MODIFIED FILES: A doc/licenses/google_license.txt TESTS CONDUCTED: 1. Documentation-only addition under doc/licenses/; zero source, build, or runtime changes. 2. Pending upstream Jenkins CI. RELEASE NOTE: Add doc/licenses/google_license.txt (Apache-2.0) for Google-contributed performance patches.
TYPE: enhancement KEYWORDS: radiation, RRTMG-SW, shortwave, McICA, clear-sky, two-stream SOURCE: Yoel Sevi (Google) DESCRIPTION OF CHANGES: Problem: In RRTMG shortwave radiation (phys/module_ra_rrtmg_sw.F): - generate_stochastic_clouds_sw runs McICA sub-column generation on clear columns and layers, calls kissvec per g-point, and allocates 3D spread/isCloudy temporaries on cloudy columns. - cldprmc_sw sweeps cloud-free layers across all 112 g-points. - spcvmc_sw runs the second cloudy reftra_sw and vrtqdr_sw two-stream pass even on clear g-points (pcldfmc(1:klev,iw) == 0). Solution: - Return early on clear columns and skip clear layers in generate_stochastic_clouds_sw when irng == 0. - Compute irng == 0 KISS PRNG draws per column in register via module-private kiss_cdf_col (leaving upstream kissvec unmodified) and replace 3D spread/isCloudy temporaries with scalar comparisons. - Skip cloud-free layers in cldprmc_sw. - Guard the cloudy two-stream pass in spcvmc_sw with lhas_cld = any(pcldfmc(1:klev,iw) > 0.0_rb) without re-indenting the existing cloudy block. All public shared_physics interfaces remain unchanged. License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt). ISSUE: None LIST OF MODIFIED FILES: M phys/module_ra_rrtmg_sw.F TESTS CONDUCTED: 1. On gfortran 15.2.0 (x86-64 Linux), verified 0 _gfortran_spread calls and clean -DWRF_CHEM=1 (r4 and -r8) builds, and passed r4 and -r8 standalone tests under -fcheck=all and sNaN FPE traps across clear, fractional, overcast, overlap (icld = 0..5), irng = 0/1, and aer_opt = 0/2 profiles with max_abs_diff = 0.0. Earlier 16-rank x86-64 isolated runs measured ~14.6% less standalone rrtmg_sw kernel time and ~5.1% solo solver time saved on a smaller regional CONUS proxy domain. Built and verified as part of the full optimization series on x86-64 Linux (gfortran 15.2.0, MPICH, 4-core VMs, 5 interleaved repeats across 5 em_real workflows) across Make (serial, dmpar r4 and -r8, dm+sm), CMake (dmpar), and -DWRF_CHEM=1 with 0 new compiler warnings and bit-for-bit identical wrf.exe outputs (diffwrf = 0 with gfortran on x86-64 without fused multiply-add). 2. Pending upstream Jenkins CI (including Intel and non-x86 compilers). RELEASE NOTE: Add exact clear-sky fast paths and eliminate per-g-point kissvec/spread overhead in RRTMG-SW (phys/module_ra_rrtmg_sw.F).
This was referenced Nov 17, 2026
Collaborator
|
The regression test results: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add clear-sky fast paths and inline column KISS PRNG draws in RRTMG-SW.
TYPE: enhancement
KEYWORDS: radiation, RRTMG-SW, shortwave, McICA, clear-sky, two-stream
SOURCE: Yoel Sevi (Google)
DESCRIPTION OF CHANGES:
Problem:
In RRTMG shortwave radiation (phys/module_ra_rrtmg_sw.F):
columns and layers, calls kissvec per g-point, and allocates 3D
spread/isCloudy temporaries on cloudy columns.
on clear g-points (pcldfmc(1:klev,iw) == 0).
Solution:
generate_stochastic_clouds_sw when irng == 0.
kiss_cdf_col (leaving upstream kissvec unmodified) and replace 3D
spread/isCloudy temporaries with scalar comparisons.
lhas_cld = any(pcldfmc(1:klev,iw) > 0.0_rb) without re-indenting the existing
cloudy block. All public shared_physics interfaces remain unchanged.
License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt).
LIST OF MODIFIED FILES:
A doc/licenses/google_license.txt
M phys/module_ra_rrtmg_sw.F
TESTS CONDUCTED:
clean -DWRF_CHEM=1 (r4 and -r8) builds, and passed r4 and -r8 standalone
tests under -fcheck=all and sNaN FPE traps across clear, fractional,
overcast, overlap (icld = 0..5), irng = 0/1, and aer_opt = 0/2 profiles with
max_abs_diff = 0.0. Earlier 16-rank x86-64 isolated runs measured ~14.6%
less standalone rrtmg_sw kernel time and ~5.1% solo solver time saved on a
smaller regional CONUS proxy domain.
Built and verified as part of the full optimization series on x86-64 Linux
(gfortran 15.2.0, MPICH, 4-core VMs, 5 interleaved repeats across 5 em_real
workflows) across Make (serial, dmpar r4 and -r8, dm+sm), CMake (dmpar),
and -DWRF_CHEM=1 with 0 new compiler warnings and bit-for-bit identical
wrf.exe outputs (diffwrf = 0 with gfortran on x86-64 without fused
multiply-add).
RELEASE NOTE: Add exact clear-sky fast paths and eliminate per-g-point kissvec/spread overhead in RRTMG-SW (phys/module_ra_rrtmg_sw.F).
Part of the modular CPU performance series; combined multi-workflow benchmarks, hardware/compiler setup, and per-PR summary table are in the Series Overview comment on PR 01 (#2470).
Prepared with AI assistance (Google Gemini).