Skip to content

Commit

Permalink
Bugfix #2762 part 2 -- fix PCPCombine leap year issue (#2766)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
georgemccabe authored Nov 4, 2024
1 parent d35402d commit fb73473
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion metplus/wrappers/pcp_combine_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions ush/run_metplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fb73473

Please sign in to comment.