Skip to content

Configure LFRic to receive meltpond fields as grid box mean#431

Open
Tim Graham (timgraham-Met) wants to merge 6 commits intoMetOffice:mainfrom
timgraham-Met:meltponds_as_gbm
Open

Configure LFRic to receive meltpond fields as grid box mean#431
Tim Graham (timgraham-Met) wants to merge 6 commits intoMetOffice:mainfrom
timgraham-Met:meltponds_as_gbm

Conversation

@timgraham-Met
Copy link
Copy Markdown
Contributor

@timgraham-Met Tim Graham (timgraham-Met) commented Apr 15, 2026

PR Summary

Sci/Tech Reviewer: Dan Copsey (@DanCopsey)
Code Reviewer: Alistair Pirrie (@mo-alistairp)

LFRic, and previously the UM, uses sea ice melt pond area fraction, and melt pond thickness, for surface albedo calculations (in JULES). Until now, these variables have been passed as mean over sea ice (melt pond area fraction) and as mean over melt pond area (melt pond thickness). Where there is covariance between these variables and sea ice area fraction within ocean cells underlying an LFRic grid cell, this can lead to surface albedo biases. Passing these variables as grid box means (GBM) is preferable, as it lets the atmosphere see a more representative sample of surface types.

A NEMO branch to allow melt pond variables to be sent as GBM has already been written; correspondingly, LFRic must be configured to receive them as such. After receipt, melt pond area fraction must be divided through by sea ice area fraction; melt pond thickness by sea ice area fraction and melt pond area fraction (or alternatively, by GBM melt pond area fraction in a single step). These changes have been applied to the NEMO package branch and the coupled rose stem test has been updated to the later revision of the branch.

Given that this change will be included in the first released coupled configuration using LFRic (GC6) it's suggested that the behaviour is included without a switch. There are no configurations that will need to use the old behaviour.

This code was originally developed by MO-AlexW but as it is a simple change that we have been using in GC workflows, I have picked it up to get on main.

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)

This code has been used in multiple development versions of GC6.

trac.log

Test Suite Results - lfric_apps - mpnds_as_gbm/run1

Suite Information

Item Value
Suite Name mpnds_as_gbm/run1
Suite User tim.graham
Workflow Start 2026-04-14T12:37:50
Groups Run all
Dependency Reference Main Like
casim MetOffice/casim@2026.03.1 True
jules MetOffice/jules@2026.03.1 True
lfric_apps timgraham-Met/lfric_apps@meltponds_as_gbm False
lfric_core MetOffice/lfric_core@2026.03.1 True
moci MetOffice/moci@2026.03.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2026.03.1 True
socrates MetOffice/socrates@2026.03.1 True
socrates-spectral MetOffice/socrates-spectral@2026.03.1 True
ukca MetOffice/ukca@2026.03.1 True

Task Information

❌ failed tasks - 1
Task State
check_lfric_coupled_nwp_gal9-C48_ex1a_cce_fast-debug-64bit failed
✅ succeeded tasks - 1510
⌛ waiting tasks - 1
Task State
housekeep_ex1a waiting

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

@timgraham-Met
Copy link
Copy Markdown
Contributor Author

KGOs for lfric_coupled have been updated and the check now passes.

@github-actions github-actions Bot added the cla-modified The CLA has been modified as part of this PR - added by GA label Apr 15, 2026
@timgraham-Met
Copy link
Copy Markdown
Contributor Author

⚠️ Hello Tim Graham (Tim Graham (@timgraham-Met))!

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.

Mike Hobson (@mike-hobson) This change to the CONTRIBUTORS.md file is because the code change was originally developed by Alex West but I have made the final version of the branch and created the pull request. When I discussed with you, you suggested that Alex should be added as a contributor because he did the original development but that causes this check to fail. Can you comment on the best way forward?

@mike-hobson
Copy link
Copy Markdown
Contributor

Hi Tim Graham (@timgraham-Met), I may have provided poor (or at least misleading) advice about the contributor's file. You are not allowed to add someone who is not yourself to that file. We can get around this, but in this case, GitHub doesn't know that Alex has contributed as it's your PR, so the easiest fix is just to not add Alex's name to the contributor's file.

Remove Alex from contributors file to hopefully pass the CLA check
@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Apr 15, 2026
@timgraham-Met
Copy link
Copy Markdown
Contributor Author

Hi Tim Graham (Tim Graham (@timgraham-Met)), I may have provided poor (or at least misleading) advice about the contributor's file. You are not allowed to add someone who is not yourself to that file. We can get around this, but in this case, GitHub doesn't know that Alex has contributed as it's your PR, so the easiest fix is just to not add Alex's name to the contributor's file.

Thanks Mike Hobson (@mike-hobson). I've now removed Alex from the file and the CLA check is passing again.

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

Labels

KGO This PR contains changes to KGO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure LFRic to receive sea ice melt pond variables as grid box means

4 participants