Skip to content

Diagnose TEMPO 10-cm reflectivity at model initialization - #299

Draft
ywangwof wants to merge 2 commits into
ufs-community:noaa/developfrom
ywangwof:feature/init-reflectivity-diagnostic
Draft

ywangwof wants to merge 2 commits into
ufs-community:noaa/developfrom
ywangwof:feature/init-reflectivity-diagnostic

Conversation

@ywangwof

@ywangwof ywangwof commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Diagnose TEMPO 10-cm reflectivity at model initialization (t=0 refl10cm)

Description

At initialization, refl10cm in the t=0 output is whatever was read from the input file (or zero), not a diagnosis of the initial hydrometeors. For cycled ensemble reflectivity DA (WoFS / RRFS with MPAS-JEDI), the posterior H(xa) for reflectivity should come from refl10cm consistent with the analyzed hydrometeors. The LETKF-updated refl10cm field is never fed back into the model.

This PR:

  • adds init_reflectivity_diagnostic to mpas_atmphys_driver_microphysics.F. It recomputes refl10cm (and refl10cm_max) from the initial state via TEMPO's new tempo_diagnose_refl. It honors hail-aware mode (ng, volg) and the graupel/hail split, so it passes qc and is_first_step=.true. (MPAS always starts at itimestep=1). The call follows the tempo_run conventions: memory and tile bounds, keyword arguments, and errflg/errmsg. Hydrometeors and other state are not modified. It returns immediately unless config_microp_scheme = 'mp_tempo', so other schemes are unaffected.
  • calls it in atm_core_init right after physics_init, so the first output (e.g. an initial_only stream) contains a consistent reflectivity.
  • updates the TEMPO submodule to ywangwof/TEMPO@eed2f33. That commit adds tempo_diagnose_refl / tempo_diagnose_refl_1d on top of tempo_v3.3.0 (4df316e).

Note: this moves MPAS TEMPO from v3.2.4 to v3.3.0. At the TEMPO reviewers' request, NCAR/TEMPO#72 now targets tempo_v3.3.0, so this PR also carries the TEMPO physics changes from 3.2.4 to 3.3.0 (e.g. hail fraction and graupel density tuning).

Dependency: NCAR/TEMPO#72. .gitmodules temporarily points TEMPO to https://github.com/ywangwof/TEMPO (branch feature/tempo-diagnose-refl-v3.2.4, now rebased onto tempo_v3.3.0). This PR stays in draft until NCAR/TEMPO#72 is merged and the submodule can point back to NCAR/TEMPO.

Update: rebased onto the current noaa/develop; the earlier v3.0.3 version is kept on branch backup/init-reflectivity-diagnostic-v3.0.3. The v3.2.4-based TEMPO commit (b721655, used by 011d048) is kept on ywangwof/TEMPO branch backup/tempo-diagnose-refl-v3.2.4.

Credits

  • Code author: Chengsi Liu
  • Testing: Yunheng Wang and David Dowell tested the code changes separately.

Testing

  • ./build.sh -f -j 16 on Ursa (Intel, single precision, CMake) on this branch (TEMPO v3.3.0): passed (exit 0, no compile errors).
  • TEMPO side: gfortran 12.4 full-debug builds and tests in DP and SP (see Add tempo_diagnose_refl to diagnose 10-cm reflectivity from a given state NCAR/TEMPO#72).
  • Standalone check: tempo_diagnose_refl matches the refl10cm from tempo_run (turn_off_micro_flag, dt = 1e-4 s) to within 3e-4 dBZ, with hailhyperaware on/off and with/without graupel_init.
  • Runtime with this branch (TEMPO v3.3.0): a 3 km WoFS forecast (2026-05-18 21 UTC, 96 tasks, mp_tempo hail-aware) ran successfully. The log shows TEMPO t=0 reflectivity diagnostic, and the t=0 refl10cm ranges from −35 to 72.9 dBZ.
  • Runtime: the v3.0.3 version of this code (on an earlier ufs-community base, 1d6e370) was run in MPAS-WoFS 15-min LETKF cycling (30 members, 3 km, 2026-05-18 case, 1515–1615 UTC) with an initial_only stream writing refl10cm. The t=0 refl10cm ranges from −35 to about 75 dBZ, with an echo coverage fraction similar to the background (≈6.3% ≥ 20 dBZ). It was used successfully by the MPAS-JEDI posterior observer.

Mandatory Questions

  • Does this PR include any additions or changes to external inputs (e.g., microphysics lookup tables, static data for gravity-wave drag -- things like that)?
    • no
  • Does this PR require updating one or more baselines for the CI tests? If so, what?
    • likely. For mp_tempo configurations, refl10cm/refl10cm_max in t=0 output will change. The TEMPO 3.2.4 -> 3.3.0 update also changes mp_tempo results in general.

Reviews

  • Is this PR currently draft, still being worked on, or ready for review?
    • draft (pending the TEMPO change upstream)
  • For when this PR begins review, please list the developers/collaborators you'd like to prioritize for review; e.g.,:
    • TBD

@ywangwof
ywangwof force-pushed the feature/init-reflectivity-diagnostic branch from 0f1dcf8 to 0fb26fc Compare October 8, 2026 20:29
@dustinswales dustinswales moved this from Not assigned to DRAFT in MPAS-A PRs to process Oct 14, 2026
@clark-evans

Copy link
Copy Markdown
Collaborator

@ywangwof just wanted to give you a heads up that the TEMPO v3.2.4 update has been merged.

At initialization, refl10cm in the t=0 output is whatever was read from the
input file (or zero), not a diagnosis of the initial hydrometeors. For
cycled DA (e.g. WoFS/RRFS ensemble reflectivity DA), the posterior H(xa)
for reflectivity should be computed from refl10cm consistent with the
analyzed hydrometeors.

Port of ufs-community#299 to the TEMPO v3.2.4 baseline.

- mpas_atmphys_driver_microphysics.F: add init_reflectivity_diagnostic,
  which recomputes refl10cm (and refl10cm_max) from the initial state via
  TEMPO's tempo_diagnose_refl. Hydrometeors are not modified. It is a
  no-op unless config_microp_scheme = 'mp_tempo'. Compared with MPAS-Dev#299 it
  also passes qc (needed for the v3.2.4 graupel/hail split) and
  is_first_step=.true. (MPAS always starts with itimestep=1).
- mpas_atm_core.F: call it right after physics_init in atm_core_init.
- Update the TEMPO submodule to a commit on top of tempo_v3.2.4 adding
  tempo_diagnose_refl. .gitmodules temporarily points TEMPO to
  ywangwof/TEMPO until the TEMPO change is merged upstream.

Co-authored-by: chengsiliu <61298443+chengsiliu@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ywangwof

Copy link
Copy Markdown
Collaborator Author

@clark-evans Thanks for the heads-up! This PR is now rebased onto the current noaa/develop with TEMPO v3.2.4. The TEMPO side (tempo_diagnose_refl) was ported to v3.2.4 and submitted upstream as NCAR/TEMPO#72. Once #72 is merged, I'll point the TEMPO submodule back to NCAR/TEMPO and mark this PR ready for review.

…-style interface

- TEMPO submodule -> ywangwof/TEMPO@eed2f33 (tempo_diagnose_refl on top of
  NCAR/TEMPO tempo_v3.3.0, see NCAR/TEMPO#72).
- init_reflectivity_diagnostic: allocate work arrays with memory bounds
  (ims:ime,kms:kme,jms:jme) as for tempo_run, pass memory and tile bounds
  with keyword arguments, and abort via physics_error_fatal on errflg.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ywangwof

ywangwof commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

@clark-evans @daviddowellNOAA, an update on this PR:

At the request of @AndersJensen-NOAA, NCAR/TEMPO#72 (the tempo_diagnose_refl dependency) now targets tempo_v3.3.0 instead of tempo_v3.2.4. Two changes followed:

  • tempo_diagnose_refl now uses the same argument conventions as tempo_run: memory and tile bounds, t or th/pii, and errflg/errmsg.
  • This PR (Diagnose TEMPO 10-cm reflectivity at model initialization #299) is updated to the new interface and points the TEMPO submodule at the v3.3.0-based commit. It builds, and a 3 km WoFS test run gives a sensible t=0 refl10cm.

This means that, as it stands, #299 would also upgrade MPAS from TEMPO v3.2.4 to v3.3.0, which changes mp_tempo results beyond the t=0 reflectivity. I'd suggest keeping these separate:

  1. Upgrade MPAS-Model to TEMPO v3.3.0 in its own PR (or as part of your planned TEMPO update).
  2. Once that lands and Add tempo_diagnose_refl to diagnose 10-cm reflectivity from a given state NCAR/TEMPO#72 is merged, rebase Diagnose TEMPO 10-cm reflectivity at model initialization #299 so it only moves the TEMPO pin to the merge commit and adds the t=0 diagnostic. Then I'll mark it ready for review.

Does this plan work for you, or would you prefer to bring in the v3.3.0 upgrade through this PR?

@clark-evans

Copy link
Copy Markdown
Collaborator

@ywangwof I concur with your proposal. Let's update to TEMPO v3.3.0 first, then rebase this PR.

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

Labels

None yet

Projects

Status: DRAFT

Development

Successfully merging this pull request may close these issues.

3 participants