Skip to content

Commit

Permalink
clean up unused code after bugfix for #2705
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Sep 30, 2024
1 parent 140647b commit ff5dfc6
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions metplus/wrappers/series_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,7 @@ def build_and_run_series_request(self, time_info, fcst_path, obs_path):
add_field_info_to_time_info(time_info, var_info)

# get formatted field dictionary to pass into the MET config file
fcst_field, obs_field = (
self.get_formatted_fields(var_info, time_info, fcst_path, obs_path)
)
fcst_field, obs_field = self.get_formatted_fields(var_info, time_info)
if fcst_field is None:
continue

Expand Down Expand Up @@ -1035,14 +1033,12 @@ def _get_netcdf_min_max(filepath, variable_name):
except (FileNotFoundError, KeyError):
return None, None

def get_formatted_fields(self, var_info, time_info, fcst_path, obs_path):
def get_formatted_fields(self, var_info, time_info):
"""! Get forecast and observation field information for var_info and
format it so it can be passed into the MET config file
@param var_info dictionary containing info to format
@param time_info dictionary containing time information
@param fcst_path path to file list file for forecast data
@param obs_path path to file list file for observation data
@returns tuple containing strings of the formatted forecast and
observation information or (None, None) if something went wrong
"""
Expand Down Expand Up @@ -1077,7 +1073,6 @@ def _get_field_list(self, data_type, var_info, time_info):
@param time_info dictionary containing time information
@returns list containing formatted field info to pass to MET config
"""
other = 'OBS' if data_type == 'fcst' else 'FCST'
# if there are no time tags (init/valid/lead) in the field level
# or if init, valid, and lead have values in time_info,
# get field info for a single field to pass to the MET config file
Expand All @@ -1087,12 +1082,7 @@ def _get_field_list(self, data_type, var_info, time_info):

field_list = []

# handle multiple templates
templates = []
for template in self.c_dict[f'{other}_INPUT_TEMPLATE'].split(','):
templates.append(os.path.join(self.c_dict[f'{other}_INPUT_DIR'], template.strip()))

# loop through fcst/obs files to extract time info
# loop through fcst/obs files to read time info
# for each file apply time info to field info and add to list
for file_dict in self.c_dict['ALL_FILES']:
file_time_info = file_dict['time_info']
Expand Down

0 comments on commit ff5dfc6

Please sign in to comment.