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: Multiple instances of local_name in Group Cap #631

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

dustinswales
Copy link
Collaborator

@dustinswales dustinswales commented Jan 29, 2025

Description:
Allow for multiple instances of the same local_name being used in the Group cap for two situations:
a) with different standard_names
b) in different DDTs .

User interface changes?: No

Fixes: #629

Testing:
Added to var_compatibility_test to exercise feature.

This PR contains changes included in #630

Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

I have a suggesting for modifying the test a bit but it looks okay for scalar vars. It would be nice to also implement a DDT test as @peverwhee suggested.

@dustinswales
Copy link
Collaborator Author

I have a suggesting for modifying the test a bit but it looks okay for scalar vars. It would be nice to also implement a DDT test as @peverwhee suggested.

@gold2718 Thanks for the suggestions. I added them to the tests.

@peverwhee There are some various tests in the pipeline for DDTs (e.g. #637 #640), albeit stressing different things. I could extend those or add here. Thoughts?

Copy link
Collaborator

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@peverwhee
Copy link
Collaborator

@peverwhee There are some various tests in the pipeline for DDTs (e.g. #637 #640), albeit stressing different things. I could extend those or add here. Thoughts?

@dustinswales I vote whatever's easiest for you!

Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

👍

@peverwhee
Copy link
Collaborator

hi @dustinswales thanks for this PR! I did run the case that @cacraigucar and I ran into that prompted the issue I opened (#630) and it still failed until I updated an add_variable call in suite_objects.py. Would you like me to open a different PR for that or can we add that fix to this PR? I've included my change below.

adding gen_unique=True on line 2276 of suite_objects.py

self.add_variable(local_var, self.run_env, exists_ok=True, gen_unique=True)

(I confirmed that the fortran tests pass with this change)

@dustinswales
Copy link
Collaborator Author

@peverwhee Thanks for testing this changes out.
I will add the change to suite_objects.py.

@dustinswales
Copy link
Collaborator Author

@peverwhee I added your change. Can you approve and merge when you get a change

Copy link
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

sorry to add another question to your life, @dustinswales

@peverwhee peverwhee self-requested a review February 12, 2025 16:32
Copy link
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

thanks @dustinswales !

@peverwhee peverwhee merged commit 6c494b2 into NCAR:develop Feb 12, 2025
19 checks passed
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.

5 participants