NCAR / DART

Data Assimilation Research Testbed
https://dart.ucar.edu/
Apache License 2.0
196 stars 145 forks source link

Remove loops over calendar types where not needed #767

Closed mjs2369 closed 1 week ago

mjs2369 commented 2 weeks ago

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

Documentation changes needed?

Tests

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

Checklist for merging

Checklist for release

Testing Datasets

hkershaw-brown commented 2 weeks ago

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.