Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Delete unused hist_add_subscript method (no references in the CTSM repo) #2022

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

johnpaulalex
Copy link
Contributor

@johnpaulalex johnpaulalex commented Jun 14, 2023

Description of changes

Delete unused hist_add_subscript method

Specific notes

Contributors other than yourself, if any: none

CTSM Issues Fixed (include github issue #): none

Are answers expected to change (and if so in what way)? no

Any User Interface Changes (namelist or namelist defaults changes)? no

Testing performed, if any: none

@ekluzek ekluzek self-assigned this Jun 16, 2023
@ekluzek
Copy link
Collaborator

ekluzek commented Jun 16, 2023

Interesting that you found this. It does look like you are right this is code that is totally not used. There's also some data that goes along with this that can be removed as well num_)subs, sub_* etc. at the top of the module. It defines these as dimensions, but since num_subs==0 no dimensions get set.

This does go back to code in clm4_0_* so it's quite old. I'm guessing it must be something needed in clm4_0, that we don't need anymore. Since, this seems to be about defining dimensions, maybe these "Subscripts" were dimensions that needed to be defined in the past and were taken out.

Copy link
Collaborator

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

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

This does indeed look like old code that isn't used anymore. There's some data that goes along with it that we should remove as well, that I comment about earlier. That's the only thing to additionally do. I do think we should remove the data, but I can also do that myself.

How did you catch this? Just by looking at the code, or by use of any tools that pointed it out to you?

@ekluzek ekluzek added the code health improving internal code structure to make easier to maintain (sustainability) label Jun 16, 2023
@johnpaulalex
Copy link
Contributor Author

I caught it by accident, I was documenting the hist_add* methods and wanted to know if this method interacted with the other ones.

I've removed the data in a follow-up commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health improving internal code structure to make easier to maintain (sustainability)
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants