Skip to content

Conversation

@arporter
Copy link
Member

No description provided.

@arporter arporter added enhancement LFRic Issue relates to the LFRic domain labels Dec 19, 2025
@arporter arporter self-assigned this Jan 5, 2026
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (bc9b4db) to head (66ced99).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3264   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         377      377           
  Lines       53667    53688   +21     
=======================================
+ Hits        53645    53666   +21     
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arporter
Copy link
Member Author

arporter commented Jan 5, 2026

This PR shortens the generated names used for various variables in order to avoid hitting compiler limitations as reported by Tom in #3259. Since we're no longer basing the names on existing variable names (which must be unique) I've had to increase the use of tags to ensure we cope in the face of name collisions.
One for @hiker, @LonelyCat124 or @sergisiso.
I've fired off the integration tests.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

Looks good @arporter. Its good to see more symbols managed by tags. My only suggestion is to see if we can keep short names still readable, but feel free to ignore if it is to much work.

@arporter
Copy link
Member Author

Thanks for those suggestions.
As discussed, I've added a check on the length of variable names into the Fortran writer. Arbitrarily, this checks for consistency with Fortran2008. I guess we may want the ability to disable this check in future?
Ready for another look now @sergisiso

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

It's looking good @arporter but I have a couple further questions.

@arporter
Copy link
Member Author

Ready for another look now.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@arporter Almost there but one more question

type(field_type) :: a, f
type(operator_type) :: b, c, d, e
type(field_type) :: a, a_field_with_a_very_long_name
type(operator_type) :: b, c, an_operator_with_a_very_long_name, e
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was ready to approve but I checked this example (from src/psyclone/tests/lfric_test.py) and the basis_/diff_basis_ /map_/ndf_/undf_ do get shortened to, .e.g: diff_basis_a4_an_or_wh_a_vy_lg_ne_qr
but the proxy and local stencil are still:

  • an_operator_with_a_very_long_name_proxy
  • an_operator_with_a_very_long_name_local_stencil

I know this is not exactly in the title of the PR, but do you want to also solve those?
And why did the new backend check not complain here?

Copy link
Member Author

Choose a reason for hiding this comment

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

My feeling is that those are OK as the bulk of the length is due to the original name chosen by the scientist and they have control over that (and I'd like to get on to new things :-) ). The new backend check did not complain because it is generous and follows the F2008 standard of 63 chars.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah sorry, I didn't realise the limit is 63 and the fs_name max length is set to 21, this is more than enough

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

Labels

enhancement LFRic Issue relates to the LFRic domain under review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants