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

Remove loops over calendar types where not needed #767

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mjs2369
Copy link
Contributor

@mjs2369 mjs2369 commented Nov 5, 2024

Description:

The subroutines set_calendar_type_string and get_calendar_string in the time_manager_mod have unnecessary loops over the number of max_types (calendar types). This PR removes these loops for improved code efficiency and readability

Fixes issue

fixes #653

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Ran model_mod_check and filter with print statements to ensure the correct calendar_type was being set/used

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

@hkershaw-brown
Copy link
Member

For commits like these, where you've just missed something from the commit (removing the loop variable) and there aren't a bunch of people working with the pull request, you can rebase and squash the commits together.
I'll go ahead an squish them.

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

Successfully merging this pull request may close these issues.

loops over calendar types are unneeded
2 participants