Skip to content

Commit

Permalink
per #1939, fixed bug when multiple observation files are found by Ens…
Browse files Browse the repository at this point in the history
…embleStat wrapper
  • Loading branch information
georgemccabe committed Nov 14, 2022
1 parent 3265ce2 commit 50a14b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions metplus/wrappers/ensemble_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,19 +438,21 @@ def run_at_time_all_fields(self, time_info):

# get point observation file if requested
if self.c_dict['OBS_POINT_INPUT_TEMPLATE']:
point_obs_path = self.find_data(time_info, first_var_info, 'OBS_POINT')
point_obs_path = self.find_data(time_info, first_var_info, 'OBS_POINT',
return_list=True)
if point_obs_path is None:
return

self.point_obs_files.append(point_obs_path)
self.point_obs_files.extend(point_obs_path)

# get grid observation file if requested
if self.c_dict['OBS_GRID_INPUT_TEMPLATE']:
grid_obs_path = self.find_data(time_info, first_var_info, 'OBS_GRID')
grid_obs_path = self.find_data(time_info, first_var_info, 'OBS_GRID',
return_list=True)
if grid_obs_path is None:
return

self.grid_obs_files.append(grid_obs_path)
self.grid_obs_files.extend(grid_obs_path)

# set field info
fcst_field = self.get_all_field_info(var_list, 'FCST')
Expand Down

0 comments on commit 50a14b2

Please sign in to comment.