Skip to content

Remove bare subroutines - #135

Open
James Bruten (james-bruten-mo) wants to merge 4 commits into
MetOffice:mainfrom
james-bruten-mo:add_modules
Open

Remove bare subroutines#135
James Bruten (james-bruten-mo) wants to merge 4 commits into
MetOffice:mainfrom
james-bruten-mo:add_modules

Conversation

@james-bruten-mo

@james-bruten-mo James Bruten (james-bruten-mo) commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Sci/Tech Reviewer: Erica Neininger (@ericaneininger)
Code Reviewer: Pierre Siddall (@Pierre-siddall)

Convert files which are bare subroutines into fortran modules.

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
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • If editing rose-meta/jules-shared then have you supplied a linked UM and LFRic Apps PR?

Testing

  • I have tested this change locally, using the JULES rose-stem suite
  • If shared files have been modified, I have run the UM and LFRic Apps rose stem suites
  • 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.)

trac.log

Test Suite Results - jules - jules_add_modules/run1

Suite Information

Item Value
Suite Name jules_add_modules/run1
Suite User james.bruten
Workflow Start 2026-08-04T08:17:05
Groups Run all
Dependency Reference Main Like
jules james-bruten-mo/jules@add_modules False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

✅ succeeded tasks - 676

Test Suite Results - um - um_for_jules_mods/run1

Suite Information

Item Value
Suite Name um_for_jules_mods/run1
Suite User james.bruten
Workflow Start 2026-08-04T08:22:04
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules james-bruten-mo/jules@add_modules False
moci MetOffice/moci@2026.07.1 True
mule MetOffice/mule@2026.07.1 True
shumlib MetOffice/shumlib@2026.07.1 True
socrates MetOffice/socrates@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True
ukca MetOffice/ukca@2026.07.1 True
um MetOffice/um@9c139d0 True
um_aux MetOffice/um_aux@2026.07.1 True
um_meta MetOffice/um_meta@2026.07.1 True

Approvals

Code Owners

  • No UM Code Owners Required

Config Owners

No UM Config Owners Required

Task Information

✅ succeeded tasks - 895

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

Approvals

Please request all relevant approvals. See the CodeOwners.txt file for section owners.

Technical

  • JULES Code Owner
  • OpenMP
  • River Routing
  • Rose Stem
  • Rose Metadata
  • Upgrade Macros

Scientific

  • Surface
  • Hydrology
  • Vegetation
  • Veg3 RED Demography
  • Biogeochemistry
  • Biogenic fluxes
  • Fire
  • Lakes
  • Evaluation
  • Imogen

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

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.

Not a lot of issues with this - could you just put a note in the description about the separation of control subroutines for standalone and standalone_rivers please?

Comment thread src/control/imogen/radf_ch4_mod.F90 Outdated

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.

Other files in this tidy up have been renamed as _mod - should this one be? The rivers equivalent is now rivers_control_mod.F90.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point - renamed

@@ -89,7 +89,7 @@ extract.path-incl[river] = $extract_path_incl \
src/initialisation/standalone/init_output_mod.F90 \
src/initialisation/standalone/init_rivers.F90 \

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.

Just an observation on a module tidy up ticket - This is the only file left in this include statement from standalone which is not named _mod.F90.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave this one as there are a few not named with _mod in that directory. They do all contain modules though

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks Erica, mostly sorted

@@ -89,7 +89,7 @@ extract.path-incl[river] = $extract_path_incl \
src/initialisation/standalone/init_output_mod.F90 \
src/initialisation/standalone/init_rivers.F90 \

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave this one as there are a few not named with _mod in that directory. They do all contain modules though

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point - renamed


CONTAINS

SUBROUTINE standalone_control ( &

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I was wondering why it was necessary to rename control -> standalone_control and similarly control -> rivers_control. The fcm make only includes the relevant version. The rivers standalone code shares code where possible with jules standalone and has their own versions where necessary. The control versions are now special cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants