Skip to content

Cell volume interface for JELF - #705

Open
Josh Colclough (mo-joshuacolclough) wants to merge 16 commits into
MetOffice:mainfrom
mo-joshuacolclough:cell_volume_interface
Open

Cell volume interface for JELF#705
Josh Colclough (mo-joshuacolclough) wants to merge 16 commits into
MetOffice:mainfrom
mo-joshuacolclough:cell_volume_interface

Conversation

@mo-joshuacolclough

@mo-joshuacolclough Josh Colclough (mo-joshuacolclough) commented Aug 10, 2026

Copy link
Copy Markdown

PR Summary

Sci/Tech Reviewer: DrTVockerodtMO
Code Reviewer: mo-lucy-gordon

This PR exposes a get_cell_volumes method for use in JEDI. A prerequisite to call this method is to set up init_fem. In the contexts where this method is required (use of a $J_c$ term in JEDI), this will certainly be called. It did however make this function tricky to unit test, as it would require a lot of science code to be called. It was decided to leave a test out for this subroutine.

  • blocks JEDI MetOffice/lfric-jedi/issues/1324

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)

I have tested this change works with JEDI. A PR is in the works to make use of this new function. See MetOffice/lfric-jedi/issues/1324.

trac.log

Test Suite Results - lfric_apps - jelf_cell_volumes__100826/run5

Suite Information

Item Value
Suite Name jelf_cell_volumes__100826/run5
Suite User joshua.colclough
Workflow Start 2026-08-12T12:17:01
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@2026.07.1 True
lfric_apps mo-joshuacolclough/lfric_apps@cell_volume_interface False
lfric_core MetOffice/lfric_core@60fc29a True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@77a5166 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@9fc2b6d True

Task Information

❌ failed tasks - 3
Task State
rose_ana_lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_fast-debug-64bit failed
run_gungho_model_robert-moist-smag-BiP100x8-10x10_azspice_gnu_fast-debug-64bit failed
run_lfricinputs_um2lfric-protogal-N320L70_C12L70_ex1a_gnu_fast-debug-64bit failed
✅ succeeded tasks - 1211
⌛ waiting tasks - 2
Task State
housekeep_azspice waiting
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

@github-actions github-actions Bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Aug 10, 2026
@github-actions github-actions Bot added cla-signed The CLA has been signed as part of this PR - added by GA and removed cla-required The CLA has not yet been signed by the author of this PR - added by GA labels Aug 11, 2026

@DrTVockerodtMO DrTVockerodtMO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good to me! The logic behind not adding a unit test is also sensible.

@mo-joshuacolclough

Copy link
Copy Markdown
Author

A note to reviewers: A couple of tests have failed. They are unrelated to this change.

@DJDavies2 David Davies (DJDavies2) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Although my usual complaint: I don't like functions that return pointers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code owner (build system) review: No problem with these changes. A couple of observations, to consider.

Comment on lines +93 to 97
$(CORE_ROOT_DIR)/components/driver \
$(CORE_ROOT_DIR)/components/science \
$(CORE_ROOT_DIR)/components/inventory \
$(CORE_ROOT_DIR)/components/lfric-xios \
$(CORE_ROOT_DIR)/components/driver \
$(APPS_ROOT_DIR)/science/gungho

Choose a reason for hiding this comment

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

If you want you can just say IMPORT_PARTS = $(INTERNAL_DEPENDENCIES). Only when they are the same, of course.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks good to know. I'll leave this for now since this doesn't include adjoint

Comment thread science/linear/Makefile Outdated
Comment on lines +79 to +80
$(CORE_ROOT_DIR)/components/science \
$(CORE_ROOT_DIR)/components/inventory \

Choose a reason for hiding this comment

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

Indentation seems to have gone awry. Spaces would be preferred here, rather than tabs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks I've actually reverted this since it was not supposed to be in this change, not sure how it managed to make it in...

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants