From fb7347399b54b4ac5d0ecba21b921aef13d78548 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:34:16 -0700 Subject: [PATCH] Bugfix #2762 part 2 -- fix PCPCombine leap year issue (#2766) * remove check if script is master_metplus.py because it has been deprecated * per #2762, fix bug that caused failure depending on valid time relating to leap years --- metplus/wrappers/pcp_combine_wrapper.py | 2 +- ush/run_metplus.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/metplus/wrappers/pcp_combine_wrapper.py b/metplus/wrappers/pcp_combine_wrapper.py index 3324f519f..e916813d3 100755 --- a/metplus/wrappers/pcp_combine_wrapper.py +++ b/metplus/wrappers/pcp_combine_wrapper.py @@ -649,7 +649,7 @@ def get_accumulation(self, time_info, accum, data_src, accum_relative = get_relativedelta(accum, 'S') # using 1 hour for now smallest_input_accum = min( - [ti_get_seconds_from_relativedelta(lev['amount'], search_time) + [ti_get_seconds_from_relativedelta(lev['amount'], search_time - accum_relative) for lev in self.c_dict['ACCUM_DICT_LIST']] ) if smallest_input_accum == 9999999: diff --git a/ush/run_metplus.py b/ush/run_metplus.py index 6f329867a..b7a99274a 100755 --- a/ush/run_metplus.py +++ b/ush/run_metplus.py @@ -45,12 +45,6 @@ def main(): if not config: return False - # warn if calling master_metplus.py - if basename(__file__) == 'master_metplus.py': - msg = ("master_metplus.py has been renamed to run_metplus.py. " - "This script name will be removed in a future version.") - config.logger.warning(msg) - total_errors = run_metplus(config) return post_run_cleanup(config, 'METplus', total_errors)