Skip to content

TEMPO Microphysics for NCAR MPAS#1393

Open
AndersJensen-NOAA wants to merge 19 commits intoMPAS-Dev:developfrom
AndersJensen-NOAA:tempo_for_ncar_mpas
Open

TEMPO Microphysics for NCAR MPAS#1393
AndersJensen-NOAA wants to merge 19 commits intoMPAS-Dev:developfrom
AndersJensen-NOAA:tempo_for_ncar_mpas

Conversation

@AndersJensen-NOAA
Copy link
Copy Markdown

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

This PR connects TEMPO microphysics to MPAS.

- adds TEMPO registry
- adds include flags and module use statements to connect tempo to
  microphysics driver
@AndersJensen-NOAA AndersJensen-NOAA marked this pull request as ready for review February 5, 2026 21:01
weiwangncar pushed a commit to wrf-model/WRF that referenced this pull request Feb 12, 2026
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
@mgduda mgduda requested review from jihyeonjang and mgduda April 23, 2026 19:17
@mgduda mgduda changed the base branch from master to develop April 23, 2026 19:19
<package name="met_stage_out" description="Active only if meteorological fields are being interpolated"/>
<package name="first_guess_field" description="3-d atmospheric or land-surface fields on first-guess levels"/>
<package name="mp_thompson_aers_in" description="initialization of GOCART-based Thompson water- and ice-friendly aerosols"/>
<package name="tempo_aerosolaware_in" description="initialization of GOCART-based TEMPO water- and ice-friendly aerosols"/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like tempo_aerosolaware_in is active if and only if mp_thompson_aers_in is active. If this is the case, perhaps we don't need to add a new package for TEMPO? Or, if you'd prefer, we could generalize the name of the existing mp_thompson_aers_in package?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It looks like tempo_aerosolaware_in is active if and only if mp_thompson_aers_in is active. If this is the case, perhaps we don't need to add a new package for TEMPO? Or, if you'd prefer, we could generalize the name of the existing mp_thompson_aers_in package?

I think that generalizing the name should be the way to go for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, this sounds like something I'd be able to take care of with a separate PR. Do you have any suggestions for the name of the package? Maybe microphysics_aerosols with a description of Initialization of GOCART-based water- and ice-friendly aerosols?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Maybe extending the description to Initialization of GOCART-based water- and ice-friendly aerosols for Thompson and TEMPO microphysics?)

@mgduda
Copy link
Copy Markdown
Contributor

mgduda commented Apr 23, 2026

When building with Make using the gnu build target, there are a couple of compilation errors (perhaps because we include the -std=f2008 flag):

src/module_mp_tempo_diags.F90:119:28:

  119 |       dbz(k) = max(-35._wp, 10._wp*log10((ze_rain(k)+ze_snow(k)+ze_graupel(k))*1.e18_dp))
      |                            1
Error: GNU Extension: Different type kinds at (1)
src/module_mp_tempo_diags.F90:53:59:

   53 |         re_qs(k) = max(5.01e-6_wp, min(0.5_wp*(smoc/smob), 999.e-6_wp))
      |                                                           1
Error: GNU Extension: Different type kinds at (1)

@mgduda
Copy link
Copy Markdown
Contributor

mgduda commented Apr 23, 2026

When building with Make, after the physics have all been compiled, we symbolically link physics look-up tables into the top-level MPAS-Model directory (see https://github.com/MPAS-Dev/MPAS-Model/blob/v8.4.0/src/core_atmosphere/Makefile#L49-L54). Should we do this for the ccn_activate.bin file as well?

@mgduda
Copy link
Copy Markdown
Contributor

mgduda commented Apr 23, 2026

@AndersJensen-NOAA From where should users obtain the file freeze_water_data_tempo_v3? This doesn't seem to be present in the TEMPO/tables directory.

Here's the runtime error I'm seeing without this file in my run directory:

ERROR STOP --- file "freeze_water_data_tempo_v3" needed for TEMPO microphysics was not found.


do k = kts,kte
do i = its,ite
rnimpten(k,i) = ni(k,i)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When running with the convection_permitting suite (no TEMPO microphysics enabled), debug builds point to an out-of-bounds array access on this line:

At line 870 of file mpas_atmphys_interface.F
Fortran runtime error: Index '1' of dimension 2 of array 'ni' below lower bound of 22364884

This doesn't seem to occur with the v8.3.1 tag, and so the error seems to be specific to this PR branch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps the new block of code beginning at line 705 is causing the code beginning at line 784 to no longer be executed?

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

@AndersJensen-NOAA From where should users obtain the file freeze_water_data_tempo_v3? This doesn't seem to be present in the TEMPO/tables directory.

Here's the runtime error I'm seeing without this file in my run directory:

ERROR STOP --- file "freeze_water_data_tempo_v3" needed for TEMPO microphysics was not found.

@mgduda you need three tables that are large-ish so they aren't stored on git at the moment.
I keep a copy of the table on noaa servers:
wget https://gsl.noaa.gov/thredds/fileServer/retro/jensen/qr_acr_qg_data_tempo_v3
wget https://gsl.noaa.gov/thredds/fileServer/retro/jensen/qr_acr_qs_data_tempo_v3
wget https://gsl.noaa.gov/thredds/fileServer/retro/jensen/freeze_water_data_tempo_v3

If you need to build the tables, you can compile/run the standalone build_tables program. If you are using gfortran to build the tables you will want to modify the default optimization or use MPI, otherwise the build will take a long time.
https://ncar.github.io/TEMPO/program/build_tables.html

I'm open to suggestions for better ways to deal the lookup tables. Maybe they can be automatically downoaded/linked?

@AndersJensen-NOAA
Copy link
Copy Markdown
Author

When building with Make, after the physics have all been compiled, we symbolically link physics look-up tables into the top-level MPAS-Model directory (see https://github.com/MPAS-Dev/MPAS-Model/blob/v8.4.0/src/core_atmosphere/Makefile#L49-L54). Should we do this for the ccn_activate.bin file as well?

Yes.

@mgduda
Copy link
Copy Markdown
Contributor

mgduda commented Apr 23, 2026

I'm open to suggestions for better ways to deal the lookup tables. Maybe they can be automatically downoaded/linked?

Would it be feasible to incorporate your stand-alone program for computing these tables into MPAS-A's existing src/core_atmosphere/utils directory? If the code is more or less static, we could just place the source file directly in the MPAS-Model repository; otherwise, we could fetch the code from a repository with manage_externals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants