Skip to content

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

Merged
ekluzek merged 5 commits into
ESCOMP:b4b-devfrom
johnpaulalex:remove_unused
Jan 15, 2025
Merged

Delete unused hist_add_subscript method (no references in the CTSM repo)#2022
ekluzek merged 5 commits into
ESCOMP:b4b-devfrom
johnpaulalex:remove_unused

Conversation

@johnpaulalex

@johnpaulalex johnpaulalex commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

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

ekluzek commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

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.

@ekluzek ekluzek left a comment

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.

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
Copy Markdown
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.

@ekluzek ekluzek changed the base branch from master to b4b-dev November 7, 2024 18:42
@ekluzek ekluzek merged commit 6fddf3c into ESCOMP:b4b-dev Jan 15, 2025
@ekluzek ekluzek deleted the remove_unused branch January 15, 2025 22:44
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: Done

Development

Successfully merging this pull request may close these issues.

2 participants