Skip to content

Conversation

@ricky-lv426
Copy link

@ricky-lv426 ricky-lv426 commented Jan 8, 2026

PR Summary

Sci/Tech Reviewer: @MetBenjaminWent
Code Reviewer: @ericaneininger

Code Quality Checklist

(Some checks are automatically carried out via the CI pipeline)

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
    style guidelines
  • Comments have been included that aid undertanding and enhance the
    readability of the code
  • My changes generate no new warnings

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 (eg. kgo changes)
  • I have added tests to cover new functionality as appropriate (eg. system
    tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource
    and have tests 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 (eg. PsyKAl-lite, Kernal
    inteface, optimisation scripts, LFRic data structure code) then please
    contact the
    tooscollabdevteam@metoffice.gov.uk

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

@github-actions github-actions bot added the cla-required CLA signature is required for this PR. label Jan 8, 2026
@ricky-lv426
Copy link
Author

Note this PR is a replica of the ticket 788 on MOSRS. Please see previous review comments and CO comments there.

@MetBenjaminWent
Copy link
Contributor

MetBenjaminWent commented Jan 9, 2026

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

Apart from the CLA signing, ticket is in the same status as when I approved it before in the track ticket 788.

CO approval also still stands.

CO further development requests are agreed to be handled in a follow up issue which should be linked with this PR and original Issue.

Approved pending CLA signing, and new issue for CO requests from trac788.

Copy link
Contributor

@MetBenjaminWent MetBenjaminWent left a comment

Choose a reason for hiding this comment

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

Approved

@github-actions github-actions bot added cla-signed This contributor has signed the CLA. and removed cla-required CLA signature is required for this PR. labels Jan 12, 2026
Copy link

@ericaneininger ericaneininger left a comment

Choose a reason for hiding this comment

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

In general, I'm happy with this change.
There are some code styling niggles - comments scattered where appropriate.

"""

from psyclone_tools import redundant_computation_setval, colour_loops, view_transformed_schedule

Choose a reason for hiding this comment

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

Please stick to a line length of 80char.

Comment on lines +1 to +7
##############################################################################
# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer
# For further details please refer to the file LICENCE.original which you
# should have received as part of this distribution.
##############################################################################


Copy link

@ericaneininger ericaneininger Jan 13, 2026

Choose a reason for hiding this comment

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

Please use current Copyright header:

Suggested change
##############################################################################
# Copyright (c) 2025, Met Office, on behalf of HMSO and Queen's Printer
# For further details please refer to the file LICENCE.original which you
# should have received as part of this distribution.
##############################################################################
# -----------------------------------------------------------------------------
# (C) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# -----------------------------------------------------------------------------

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please follow the Momentum template for copyright header: https://github.com/MetOffice/Momentum/blob/main/docs/COPYRIGHT_TEMPLATE

Choose a reason for hiding this comment

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

yes sorry - I did give the correct header everywhere else! NOw corrected here.

"""

from psyclone_tools import redundant_computation_setval, colour_loops, view_transformed_schedule

Choose a reason for hiding this comment

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

Line length exceeds 80char

Copy link
Collaborator

@yaswant yaswant Jan 14, 2026

Choose a reason for hiding this comment

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

We plan to deploy ruff and fortitude for Python and Fortran lint/format, and line-length limits will be 88 and 132 (max) characters, respectively.

# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
##############################################################################

Choose a reason for hiding this comment

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

Please add a description comment for this file.

Working practices require adherence to PEP8 standards please. There are some issues with line length in this file. ruff/black are recommended tools for checking.


[namelist:physics=conv_gr_segment]
compulsory=true
description=Number of segments to be processed in gregory rowntree convection

Choose a reason for hiding this comment

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

Suggested change
description=Number of segments to be processed in gregory rowntree convection
description=Number of segments to be processed in Gregory-Rowntree convection

@@ -1129,12 +1132,12 @@ subroutine conv_gr_code(nlayers, &
delta_smag, tnuc_nlcl_um

! single level integer fields
integer(i_um), dimension(row_length,rows) :: ntml, ntpar, lcbase, &
integer(i_um), dimension(ncells,1) :: ntml, ntpar, lcbase, &

Choose a reason for hiding this comment

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

Please keep & in line to match surrounding code

it_lcbase,it_lctop, it_ccb, it_cct, it_ccb0, it_cct0, it_kterm_deep,&
it_kterm_shall, it_cg_term, it_lcbase0, freeze_lev, ccb, cct, lctop

! single level logical fields
logical, dimension(row_length,rows) :: land_sea_mask, cumulus, &
logical, dimension(ncells,1) :: land_sea_mask, cumulus, &

Choose a reason for hiding this comment

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

Please keep & in line to match surrounding code


real(r_um), dimension(row_length,rows) :: zlcl, t1_sd, q1_sd, w_max, &
real(r_um), dimension(ncells,1) :: zlcl, t1_sd, q1_sd, w_max, &

Choose a reason for hiding this comment

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

Please keep & in line to match surrounding code


! Water tracer fields which are not currently used but are required by
! UM routine
real(r_um), dimension(1,1,1) :: q_wtrac, qcl_wtrac, qcf_wtrac, &
real(r_um), dimension(ncells,nlayers,n_wtrac) :: q_wtrac, qcl_wtrac, qcf_wtrac, &

Choose a reason for hiding this comment

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

Please keep & in line to match surrounding code

conv_snow_3d(map_wth(1) + k) = conv_snow_3d(map_wth(1) + k) + &
it_conv_snow_3d(1,1,k) * &
one_over_conv_calls
do i = 1, ncells

Choose a reason for hiding this comment

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

The recommendation for continuation characters is (a) to match the surrounding style - or alternatively (b) to remove whitespace between the end of the code and the &.
Most of the surrounding code appears to vertically align &s for code blocks.

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

Labels

cla-signed This contributor has signed the CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants