Skip to content

Comorph diagnostics - #692

Draft
iboutle wants to merge 7 commits into
MetOffice:mainfrom
iboutle:comorph_diags
Draft

Comorph diagnostics#692
iboutle wants to merge 7 commits into
MetOffice:mainfrom
iboutle:comorph_diags

Conversation

@iboutle

@iboutle iboutle commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer:
Code Reviewer:

All Comorph diagnostics which have equivalent UM stashcodes:

STASH UM name LFRic diagnostic Notes
5-550 average updraught parcel radius (m) convection__par_radius_up D #692
5-551 average downdraught parcel radius(m) convection__par_radius_down D #692
5-552 Frequency of updraught on level convection__freq_up D #692
5-553 Frequency of downdraught on level convection__freq_down D #692
5-554 Up parcel mean virt temp excess (K) convection__par_mean_dtv_up D #692
5-555 Down parcel mean virt temp excess(K) convection__par_mean_dtv_down D #692
5-556 Up parcel mean relative humidity convection__par_mean_rhl_up D #692
5-557 Down parcel mean relative humidity convection__par_mean_rhl_down D #692
5-558 Up parcel mean water vapour (kg/kg) convection__par_mean_q_up D #692
5-559 Down parcel mean water vapour(kg/kg) convection__par_mean_q_down D #692
5-560 Up parcel mean liq cld water (kg/kg) convection__par_mean_qcl_up D #692
5-561 Down par mean liq cld water (kg/kg) convection__par_mean_qcl_down D #692
5-562 Up parcel mean ice cld water (kg/kg) convection__par_mean_qcf_up D #692
5-563 Down par mean ice cld water (kg/kg) convection__par_mean_qcf_down D #692
5-564 Up parcel mean rain water (kg/kg) convection__par_mean_qrain_up D #692
5-565 Down parcel mean rain water (kg/kg) convection__par_mean_qrain_down D #692
5-566 Up parcel mean graupel (kg/kg) convection__par_mean_qgraup_up D #692
5-567 Down parcel mean graupel (kg/kg) convection__par_mean_qgraup_down D #692
5-568 Up parcel mean snow water (kg/kg) convection__par_mean_qsnow_up D #692
5-569 Down parcel mean snow water (kg/kg) convection__par_mean_qsnow_down D #692
5-570 Up parcel mean cloud liq fraction convection__par_mean_cfl_up D #692
5-571 Down parcel mean cloud liq fraction convection__par_mean_cfl_down D #692
5-572 Up parcel mean cloud ice fraction convection__par_mean_cff_up D #692
5-573 Down parcel mean cloud ice fraction convection__par_mean_cff_down D #692
5-574 Up parcel mean cloud bulk fraction convection__par_mean_cfb_up D #692
5-575 Down parcel mean cloud bulk fraction convection__par_mean_cfb_down D #692
5-576 Up parcel mean u wind (m/s) convection__par_mean_u_up D #692
5-577 Down parcel mean u wind (m/s) convection__par_mean_u_down D #692
5-578 Up parcel mean v wind (m/s) convection__par_mean_v_up D #692
5-579 Down parcel mean v wind (m/s) convection__par_mean_v_down D #692
5-580 Up parcel mean w wind (m/s) convection__par_mean_w_up D #692
5-581 Down parcel mean w wind (m/s) convection__par_mean_w_down D #692
5-582 Up parcel mean temperature (K) convection__par_mean_t_up D #692
5-583 Down parcel mean temperature (K) convection__par_mean_t_down D #692
5-584 Up parcel core virt temp excess (K) convection__par_core_dtv_up D #692
5-585 Down parcel core virt temp excess(K) convection__par_core_dtv_down D #692
5-586 Up parcel core relative humidity convection__par_core_rhl_up D #692
5-587 Down parcel core relative humidity convection__par_core_rhl_down D #692
5-594 Turbulent u wind perturbation (m/s) convection__turb_pert_u D #692
5-595 Turbulent v wind perturbation (m/s) convection__turb_pert_v D #692
5-596 Turbulent w wind perturbation (m/s) convection__turb_pert_w D #692
5-597 Turbulent temperature perturb (K) convection__turb_pert_t D #692
5-598 Turbulent water vapour pert (kg/kg) convection__turb_pert_q D #692
5-599 Turbulent radius (m) convection__turb_radius D #692
5-600 Fraction of dry sub region gridbox convection__subreg_dry_frac D #692
5-601 Fraction of liq sub region gridbox convection__subreg_liq_frac D #692
5-602 Fraction of mixed phase sub region convection__subreg_mph_frac D #692
5-603 Fraction of ice rain sub region convection__subreg_icr_frac D #692
5-604 Temperature of dry sub region (K) convection__subreg_dry_t D #692
5-605 Temperature of liq sub region (K) convection__subreg_liq_t D #692
5-606 Temp of mixed phase sub region (K) convection__subreg_mph_t D #692
5-607 Temp of ice rain sub region (K) convection__subreg_icr_t D #692
5-608 Water Vap of dry sub region (kg/kg) convection__subreg_dry_q D #692
5-609 Water Vap of liq sub region (kg/kg) convection__subreg_liq_q D #692
5-610 Water Vap of mix phase subreg (kg/kg) convection__subreg_mph_q D #692
5-611 Water Vap of ice rain sub reg (kg/kg) convection__subreg_icr_q D #692
5-612 Relative humidity of dry sub region convection__subreg_dry_rhl D #692
5-613 Relative humidity of liq sub region convection__subreg_liq_rhl D #692
5-614 Relative humidity of mix phase subreg convection__subreg_mph_rhl D #692
5-615 Relative humidity of ice rain sub reg convection__subreg_icr_rhl D #692
5-616 Downdraught mass flux rho levels Pa/s convection__massflux_down_half D #692

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • I have tested this change locally, using the LFRic Apps rose-stem suite
  • If any tests fail (rose-stem or CI) the reason is understood and acceptable (e.g. kgo changes)
  • I have added tests to cover new functionality as appropriate (e.g. system tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource and have been allocated to an appropriate testing group (i.e. the developer tests are for jobs which use a small amount of compute resource and complete in a matter of minutes)

trac.log

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and confirmed that it builds correctly

PSyclone Approval

  • If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the TCD Team

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

Ubuntu added 7 commits August 4, 2026 09:32
Add the mean updraught and downdraught parcel radius diagnostics to the
CoMorph interface. CoMorph calculates these on rho-levels, in metres, so
they are output on W3 with no unit conversion and no cloud-base masking.

Some of the content of this change has been produced with the assistance
of Anthropic Claude Opus 5 (Claude Code).
Add the frequency of updraught and downdraught on each level to the
CoMorph interface. These are not CoMorph diagnostic requests: they are
derived from the mass fluxes on rho-levels, taken before the cloud-base
masking and unit conversion are applied to the mass flux diagnostics, so
that the complete set of levels with convection is captured.

Some of the content of this change has been produced with the assistance
of Anthropic Claude Opus 5 (Claude Code).
Move the updraught and downdraught frequency diagnostics inside the
outer == outer_iterations test, so that they are only calculated when
they are going to be output, in common with the other optional
convection diagnostics.

Some of the content of this change has been produced with the assistance
of Anthropic Claude Opus 5 (Claude Code).
Port the CoMorph parcel mean property diagnostics (UM 5-554 to 5-583)
into LFRic, for both the updraught and the downdraught: excess virtual
temperature, relative humidity with respect to liquid, water vapour,
liquid water, ice water, rain, graupel, snow, liquid, ice and bulk
cloud fractions, the three wind components and temperature.

As in the UM, the rain, graupel, snow and cloud fraction diagnostics
are only requested from CoMorph when convection is acting on those
fields, so they are output as zero otherwise.

Some of the content of this change has been produced with the
assistance of Anthropic Claude Opus 5 (Claude Code).
Port the CoMorph parcel core property diagnostics (UM 5-584 to 5-587)
into LFRic, for both the updraught and the downdraught: the excess
virtual temperature and the relative humidity with respect to liquid
of the parcel core.

As in the UM, these are only requested from CoMorph when the parcel
core properties are in use.

Some of the content of this change has been produced with the
assistance of Anthropic Claude Opus 5 (Claude Code).
Port the CoMorph turbulence diagnostics (UM 5-594 to 5-599) into
LFRic: the turbulent perturbations to the wind components, the
temperature and the water vapour, and the turbulence-based parcel
radius.

The perturbations are calculated on rho-levels and the parcel radius
on theta-levels.  As in the UM they are only available when
turbulence-based parcel generation is in use, so they are only
requested from CoMorph in that case.

Some of the content of this change has been produced with the
assistance of Anthropic Claude Opus 5 (Claude Code).
Adds the four CoMorph plume-genesis sub-region diagnostics (area
fraction, temperature, water vapour and relative humidity with respect
to liquid) for each of the four sub-regions (clear-sky, liquid-cloud,
mixed-phase and ice/rain) on theta levels, plus the downdraught mass
flux on rho levels.

Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
@github-actions github-actions Bot added the cla-modified The CLA has been modified as part of this PR - added by GA label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ Hello iboutle!

Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR.

Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up.

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

Labels

cla-modified The CLA has been modified as part of this PR - added by GA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants