Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capgen in SCM: Fix to allow for scheme subcycling. #633

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

dustinswales
Copy link
Collaborator

@dustinswales dustinswales commented Jan 29, 2025

Overview
This PR contains changes to fix scheme subcycing in Capgen and extends the var_compatability_test to exercise subcycling.
UPDATE: Added bugfix for suite-part list ordering.

Description
Create local group variable for subcycle indexing.
Fix bug (self.loop -> self._loop) in the Subcycle write phase, and in ccpp_datafile.

User interface changes?: No

Fixes: #632
Fixes: #634

Testing:
Added to var_compatibility_test to exercise feature.

This PR contains changes in #631

@dustinswales dustinswales changed the title Fix to allow for scheme subcycling. Capgen in SCM: Fix to allow for scheme subcycling. Jan 29, 2025
scripts/metavar.py Outdated Show resolved Hide resolved
scripts/metavar.py Outdated Show resolved Hide resolved
if gen_unique:
new_lname = self.new_internal_variable_name(prefix=lname)
newvar = newvar.clone(new_lname)
# Local_name needs to be the local_name for the new
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am very confused by this comment. Should the first Local_name be lname?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All instances of lname are replaced, there is no logic to keep the first instance. So for three instances of the same lname, we have lname1, lname2, and lname3, not lname, lname1, lname2.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, this is part of #631 and does not impact the sub-cycling isssue

test/var_compatibility_test/var_compatibility_suite.xml Outdated Show resolved Hide resolved
@dustinswales dustinswales marked this pull request as draft February 6, 2025 16:55
@dustinswales dustinswales changed the base branch from main to develop February 11, 2025 04:05
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.

Suite-part list is wrong Sub-cycling not working properly
2 participants