Skip to content

Add TEMPO microphysics and Xu-Randall cloud fraction schemes to convection-permitting suite - #445

Open
kuanchihwang wants to merge 12 commits into
ESCOMP:mainfrom
kuanchihwang-ncar:staging/tempo
Open

kuanchihwang wants to merge 12 commits into
ESCOMP:mainfrom
kuanchihwang-ncar:staging/tempo

Conversation

@kuanchihwang

Copy link
Copy Markdown
Collaborator

Tag name

TBD

Originator(s)

kuanchihwang

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number)

This PR adds the TEMPO microphysics and Xu-Randall cloud fraction schemes to complete the convection-permitting suite.

The main scheme code of TEMPO is pulled directly from its upstream repository via a Git submodule, pinned at the latest available tag (tempo_v3.1.2) as of now. The host model dependent interstitial scheme code is hosted here. The Xu-Randall cloud fraction scheme is CCPP-ized from the MPAS (calc_cldfraction) and WRF (cal_cldfra1) implementations with a slight rewrite to improve readability.

List all namelist files that have been modified

A       schemes/tempo/mp_tempo_namelist.xml
  * Add namelist definition for TEMPO

List all files eliminated and why

None

List all files added and what they do

A       schemes/mmm/cldfra_xu_randall.F90
A       schemes/mmm/cldfra_xu_randall.meta
A       schemes/mmm/cldfra_xu_randall_diag.F90
A       schemes/mmm/cldfra_xu_randall_diag.meta
  * Add Xu-Randall cloud fraction scheme
A       schemes/tempo/machine.F90
  * Add compatibility module for real kind parameters
A       schemes/tempo/module_mp_tempo_cfgs.F90
A       schemes/tempo/module_mp_tempo_cfgs.meta
  * Add default configuration module for TEMPO
A       schemes/tempo/mp_tempo.F90
A       schemes/tempo/mp_tempo.meta
  * Add interstitial schemes for TEMPO
A       schemes/tempo/mp_tempo_diag.F90
A       schemes/tempo/mp_tempo_diag.meta
  * Add diagnostic schemes for TEMPO
A       schemes/tempo/tempo
  * Add git submodule for TEMPO

List all existing files that have been modified, and describe the changes

M       .gitmodules
  * Add git submodule for TEMPO
M       schemes/mmm/ccpp_kind_types.F90
  * Add compatibility module for real kind parameters
M       schemes/mmm/mmm_physics_compat.F90
M       schemes/mmm/mmm_physics_compat.meta
  * Fix build error in debug mode
  * Add interstitial schemes to capture microphysics tendencies
M       schemes/utilities/state_converters.F90
M       schemes/utilities/state_converters.meta
  * Add graupel conversion between dry and wet
M       test/test_suites/suite_convection_permitting.xml
  * Update SDF
M       test/unit-test/tests/mmm/mmm_physics_compat_tests.pf
  * Fix unit tests

List all automated tests that failed, as well as an explanation for why they were not fixed

All pass.

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?

Yes, but only for the convection-permitting suite.

If yes to the above question, describe how this code was validated with the new/modified features

Pending science validation.

@kuanchihwang
kuanchihwang marked this pull request as ready for review September 8, 2026 21:52

@nusbaume nusbaume 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.

Thanks for bringing in the final two convection-permitting schemes @kuanchihwang! I have some questions and change requests, but hopefully nothing too difficult. Of course if you have any questions, concerns, or issues with my requests just let me know!

dimensions = (horizontal_dimension, vertical_layer_dimension)
intent = out
[ rnrmpten ]
standard_name = tendency_of_mass_number_concentration_of_rain_in_dry_air_due_to_microphysics

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.

Can we add the word drops here to match a similar standard name from other microphysics schemes?

Suggested change
standard_name = tendency_of_mass_number_concentration_of_rain_in_dry_air_due_to_microphysics
standard_name = tendency_of_mass_number_concentration_of_rain_drops_in_dry_air_due_to_microphysics

dimensions = (horizontal_dimension, vertical_layer_dimension)
intent = out
[ rngmpten ]
standard_name = tendency_of_mass_number_concentration_of_graupel_in_dry_air_due_to_microphysics

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.

Can you add the word particles here to better match the standard name of similar quantities from other microphysics schemes?

Suggested change
standard_name = tendency_of_mass_number_concentration_of_graupel_in_dry_air_due_to_microphysics
standard_name = tendency_of_mass_number_concentration_of_graupel_particles_in_dry_air_due_to_microphysics

intent = inout
advected = True
[ nr ]
standard_name = mass_number_concentration_of_rain_in_dry_air

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.

Add drops here?

Suggested change
standard_name = mass_number_concentration_of_rain_in_dry_air
standard_name = mass_number_concentration_of_rain_drops_in_dry_air

type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = inout
advected = True

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.

If this is an advected quantity, then should qr (rain_mixing_ratio_wrt_dry_air) be listed as advected as well, or is only the number concentration an advected quantity in this configuration?

intent = inout
advected = True
[ ng ]
standard_name = mass_number_concentration_of_graupel_in_dry_air

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.

I would add particles here:

Suggested change
standard_name = mass_number_concentration_of_graupel_in_dry_air
standard_name = mass_number_concentration_of_graupel_particles_in_dry_air


if (sat_adj) then
if (aerosol_aware .or. hail_aware) then
errmsg = 'sat_adj=.true. should only be run with aerosol_aware=.false. and hail_aware=.false.'

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.

I might specify the physics scheme here as well:

Suggested change
errmsg = 'sat_adj=.true. should only be run with aerosol_aware=.false. and hail_aware=.false.'
errmsg = 'sat_adj=.true. should only be run with aerosol_aware=.false. and hail_aware=.false. for TEMPO microphysics'

else
if (maxval(nwfa2d) < eps) then
do i = 1, ncol
nwfa2d(i) = nwfa(i, 1) * 0.000196_kind_phys * (5.0_kind_phys / dz_r1(i, 1, 1))

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.

I could be misunderstanding what's happening, but won't nwfa have the CAM-SIMA vertical ordering here, as it will have been set by a previous scheme? If so then should we use pver instead of 1 to grab the level closest to the surface?

Suggested change
nwfa2d(i) = nwfa(i, 1) * 0.000196_kind_phys * (5.0_kind_phys / dz_r1(i, 1, 1))
nwfa2d(i) = nwfa(i, pver) * 0.000196_kind_phys * (5.0_kind_phys / dz_r1(i, 1, 1))

Comment on lines +219 to +221
! Flip upside down to be consistent with CAM-SIMA. Index 1 is at the top of atmosphere.
nwfa(:, :) = nwfa(:, pver:1:-1)
nifa(:, :) = nifa(:, pver:1:-1)

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.

Should this only be done if init_water_friendly_aerosols or init_ice_friendly_aerosols has been called? Otherwise I think nwfa and nifa will already have the CAM-SIMA vertical ordering (unless I am missing something)?

intent = in
[ tempo_cfgs ]
standard_name = configuration_for_tempo_microphysics
units = mixed

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.

Just an FYI that for DDTs the units are canonically none, even if variables within the type have real units:

Suggested change
units = mixed
units = none

dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
[ qv ]
standard_name = water_vapor_mixing_ratio_wrt_dry_air

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.

Should all of the mixing ratio variables here and below have advected = True? I realize it's not really necessary for the suite, but it seems better to be safe just in case.

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