Skip to content

TEMPO microphysics for WRF#2270

Merged
weiwangncar merged 22 commits intowrf-model:developfrom
AndersJensen-NOAA:tempo_for_wrf
Feb 12, 2026
Merged

TEMPO microphysics for WRF#2270
weiwangncar merged 22 commits intowrf-model:developfrom
AndersJensen-NOAA:tempo_for_wrf

Conversation

@AndersJensen-NOAA
Copy link
Copy Markdown

@AndersJensen-NOAA AndersJensen-NOAA commented Jan 9, 2026

Addition of TEMPO microphysics

TYPE: new feature

KEYWORDS: Microphysics, Operational models

SOURCE: Anders Jensen NOAA/GSL

DESCRIPTION OF CHANGES:
Problem:
Microphysics development of a Thompson-Eidhammer based scheme for operational applications has advanced to a submodule, TEMPO. This new development should be made available to WRF users.

Solution:
Connect TEMPO to WRF. A cleaned and refactored version of TEMPO is being tested in the UFS community's MPAS. Additionally, a PR, MPAS-Dev/MPAS-Model#1393, to add TEMPO to NCAR's MPAS is in progress. This current PR will allow the community to use this same microphysics across the UFS, MPAS, and WRF.

LIST OF MODIFIED FILES:
M .gitmodules
M main/depends.common
M Makefile
M clean
M phys/Makefile
M phys/module_physics_init.F
M phys/module_microphysics_driver.F
M Registry.EM_COMMON
M dyn_em/module_initialize_real.F

TESTS CONDUCTED:

  1. compiled and ran em_quarter_ss
  2. restart test with em_quarter_ss
  3. bit-for-bit with different number of processes using em_quarter_ss.
  4. Passed regression tests.

RELEASE NOTE:
TEMPO is the Thompson-Eidhammer Microphysics Parameterization for Operations. TEMPO lives here: https://github.com/NCAR/TEMPO and technical documentation lives here: https://ncar.github.io/TEMPO/.

TEMPO specific release notes are here: https://github.com/NCAR/TEMPO/releases/tag/tempo_v3.0.0
TEMPO version 3.0.0 is the current release version.

TEMPO is being tested in the ufs-community fork of MPAS for next-generation convection-allowing forecast systems (https://github.com/ufs-community/MPAS-Model). Thus, TEMPO is being continually evaluated for improvement.

Additionally, there is a PR in progress to connect TEMPO (v3.0.0) to NCAR's MPAS (MPAS-Dev/MPAS-Model#1393). The version of TEMPO currently in the CCPP (https://github.com/ufs-community/ccpp-physics) will be updated to v3.0.0 soonish. TEMPO is connected to WRF, MPAS, and CCPP as a submodule, and the same v3.0.0 code will be connected to WRF (this PR), MPAS, and CCPP.

In WRF, supported namelist options include tempo_aerosolaware==1 to use the aerosol-aware version, and tempo_hailaware==1 to use the hail-aware version. Both options are on by default.

Key improvements include:

  • TEMPO is in a submodule that allows for flexibility when connecting TEMPO to dynamical cores
  • Code modularity was been improved and technical documentation has been added
  • Bux fix for cloud droplet number concentration during evaporation
  • Surface emissions of water-friendly aerosols have been reduced based on a sensitivity simulation that aimed to better constrain water-friendly aerosol concentrations over 24-36 hour forecast periods and reduce the accumulation of aerosols in the atmosphere
  • A few modifications were made to graupel number concentration tendencies (when using the hail-aware option) for processes that cause rain to freeze to increase reflectivity in deep convective storms
  • Added simple sedimentation tests
  • Added unit tests
  • Added a program to build lookup tables with MPI capability
  • Lookup tables have been unified

@weiwangncar
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Can you compile your code on your system with manage_externals? It is showing some errors doing the regression tests.

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@AndersJensen-NOAA Can you compile your code on your system with manage_externals? It is showing some errors doing the regression tests.

@weiwangncar I think that I have the code now working with manage_externals pulling a specific tag of TEMPO.

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

AndersJensen-NOAA commented Jan 9, 2026

@AndersJensen-NOAA Can you compile your code on your system with manage_externals? It is showing some errors doing the regression tests.

@weiwangncar I think that I have the code now working with manage_externals pulling a specific tag of TEMPO.

Actually, maybe not. Thanks for the email though -- I will check things again. Note that this compiles on my machine, but the regression tests are still failing.

@AndersJensen-NOAA AndersJensen-NOAA marked this pull request as ready for review January 14, 2026 19:53
@AndersJensen-NOAA AndersJensen-NOAA requested review from a team as code owners January 14, 2026 19:53
@weiwangncar
Copy link
Copy Markdown
Collaborator

The regression tests have passed:

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

@islas islas changed the base branch from master to develop January 15, 2026 19:03
@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@weiwangncar

Output from dmpar compile with intel and em_quarter_ss case with 1 versus 4 processors
Simulation time = 1 hour with output every 30 mins
Last timestep timing information:
4 processors: 0.05787 elapsed seconds
1 processor: 0.14520 elapsed seconds

Screenshot 2026-01-15 at 4 04 16 PM

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

Restart test: em_quarter_ss case, 2-h simulation with restart files written every hour compared to 1-h simulation started from a restart file at 1 hour:

Screenshot 2026-01-15 at 4 49 29 PM

@weiwangncar
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Thanks for doing these tests!

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

Might consider making it option 48 instead of 88, to keep it within the lower numbers.

@dudhia I realized that TEMPO is 88 in the CCPP, so it probably makes sense to keep those the same.

@dudhia
Copy link
Copy Markdown
Collaborator

dudhia commented Feb 3, 2026

I didn't think the CCPP had numbers. Is it the UFS option?

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

I didn't think the CCPP had numbers. Is it the UFS option?

Yes, UFS.

@weiwangncar
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Thanks for updating the git repository. I would still like to see a few key improvements outlined in the PR message, possibly under the RELEASE NOTE section. Thanks!

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@AndersJensen-NOAA Thanks for updating the git repository. I would still like to see a few key improvements outlined in the PR message, possibly under the RELEASE NOTE section. Thanks!

@weiwangncar I have some RELEASE notes -- let me know if you have questions.

@dudhia
Copy link
Copy Markdown
Collaborator

dudhia commented Feb 3, 2026

I resolved conflicts related to being in the same places as MYNN SFC additions.

@weiwangncar
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA The updated PR looks good. Thanks!

@weiwangncar
Copy link
Copy Markdown
Collaborator

@dudhia Is option number 88 or or should it be changed?

@dudhia
Copy link
Copy Markdown
Collaborator

dudhia commented Feb 4, 2026

Anders gave us a reason to keep 88.

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

Anders gave us a reason to keep 88.

@dudhia @weiwangncar
If you are okay with using 88, then I am as well. That way I don't have to change things in the UFS :). The number 88 is still in the spirit of Thompson/Thompson-Eidhammer (8, 28, 38).

@weiwangncar weiwangncar merged commit 3c76c8b into wrf-model:develop Feb 12, 2026
2 checks passed
islas added a commit to islas/WRF that referenced this pull request Mar 5, 2026
@islas islas mentioned this pull request Mar 5, 2026
islas added a commit that referenced this pull request Mar 18, 2026
TYPE: bugfix

KEYWORDS: cmake

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
New files were added with PR #2270, but were not added to the CMake
build

Solution:
Fix the CMake build issue caused by PR #2270
islas pushed a commit that referenced this pull request Mar 19, 2026
Modification from tempo v3.0.0 to v3.0.4 (that pertain to WRF)

TYPE: enhancement

KEYWORDS: tempo

SOURCE: Anders Jensen NOAA/GSL

DESCRIPTION OF CHANGES:
Bugfixes:
- Bug fix for initialization of precipitation diagnostic

Modifications (mostly for speedup and better memory useage)
- global dt variable was removed and replaced with local variables to
prevent parallel compute issues
- 3D diagnostics data type was changed to `intent(inout)` from
`intent(out)` to reduce the number of calls to `allocate`
- microphysical process tendencies data type was changed from
allocatable to a pointer contiguous in memory for better memory handling
and efficiency

ISSUE:
Related to PR #2270
@smileMchen
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA

Would you please share the three tables: qr_acr_qs_data_tempo_v3, qr_acr_qg_data_tempo_v3, and freeze_water_data_tempo_v3? Thanks.

@weiwangncar
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA Perhaps you can provide the instruction on how to generate the tables. Thanks!

@smileMchen
Copy link
Copy Markdown
Collaborator

@weiwangncar @@AndersJensen-NOAA

The instruction on code compiling is given in the code build_tables.F90.

The issue is that, running this program takes too much time. I am not sure whether it is normal.

I am trying to create the tables but the program has been running more than 1.5 hours and has not finished yet.

@weiwangncar
Copy link
Copy Markdown
Collaborator

@smileMchen I don't see a build_tables.F90 file. But I hear that the tables can be built with MPI. Is that what you are compiling and running the code?

@dudhia
Copy link
Copy Markdown
Collaborator

dudhia commented Apr 3, 2026

@weiwangncar Ming found that F90 file in the TEMPO/tools directory.

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@weiwangncar @smileMchen

Info on table building can be found here:
https://ncar.github.io/TEMPO/program/build_tables.html

If you don't want to build tables, you can grab on from the tempo/tables directory:
tempo/tables/ccn_activate.bin

And then the three bigger tables are on a NOAA server, and can be obtained with wget:
wget -q https://gsl.noaa.gov/thredds/fileServer/retro/jensen/qr_acr_qg_data_tempo_v3
wget -q https://gsl.noaa.gov/thredds/fileServer/retro/jensen/qr_acr_qs_data_tempo_v3
wget -q https://gsl.noaa.gov/thredds/fileServer/retro/jensen/freeze_water_data_tempo_v3

@smileMchen I'm curious to know more about your build issue? Table building should not take 1.5 hours. Did you use intel or gnu?

@smileMchen
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA

I compiled the code using gfortran v14.3.0.

It takes more than 1.5hour to finish running the program (I run interactively with a single processor). It would be much faster if we run with multi-processors, I guess?

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@smileMchen: You can either use mpi or change the optimization in Makefile.gfortran. Changing -O0 to -O2 should give a large speed up.

@smileMchen
Copy link
Copy Markdown
Collaborator

@AndersJensen-NOAA

Thank you for the kind information.

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