Skip to content

Commit

Permalink
per #1842, add quotation marks around name/level/units that were read…
Browse files Browse the repository at this point in the history
… from the FCST/OBS_VAR<n> variables and around level values read from FCST/OBS_LEVEL_LIST, ci-run-diff
  • Loading branch information
georgemccabe committed Oct 3, 2022
1 parent 4a9e3ca commit e644194
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions metplus/wrappers/stat_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ def get_level_list(self, data_type):
level = f'{remove_quotes(level)}'
level_list.append(level)

return level_list
return [f'"{item}"' for item in level_list]

def process_job_args(self, job_type, job, model_info,
lists_to_loop_items, lists_to_group_items, runtime_settings_dict):
Expand Down Expand Up @@ -1344,16 +1344,16 @@ def get_c_dict_list(self):
c_dict = {}
c_dict['index'] = var_info['index']
c_dict['FCST_VAR_LIST'] = [
var_info['fcst_name']
f'"{var_info["fcst_name"]}"'
]
c_dict['OBS_VAR_LIST'] = [
var_info['obs_name']
f'"{var_info["obs_name"]}"'
]
c_dict['FCST_LEVEL_LIST'] = [
var_info['fcst_level']
f'"{var_info["fcst_level"]}"'
]
c_dict['OBS_LEVEL_LIST'] = [
var_info['obs_level']
f'"{var_info["obs_level"]}"'
]

c_dict['FCST_THRESH_LIST'] = []
Expand All @@ -1369,9 +1369,9 @@ def get_c_dict_list(self):
c_dict['FCST_UNITS_LIST'] = []
c_dict['OBS_UNITS_LIST'] = []
if fcst_units:
c_dict['FCST_UNITS_LIST'].append(fcst_units)
c_dict['FCST_UNITS_LIST'].append(f'"{fcst_units}"')
if obs_units:
c_dict['OBS_UNITS_LIST'].append(obs_units)
c_dict['OBS_UNITS_LIST'].append(f'"{obs_units}"')

c_dict['run_fourier'] = run_fourier
if pair:
Expand All @@ -1391,8 +1391,7 @@ def add_other_lists_to_c_dict(self, c_dict):
@param c_dict dictionary to add values to
"""
# add group and loop lists
lists_to_add = self.list_categories
for list_category in lists_to_add:
for list_category in self.list_categories:
list_items = self.c_dict[list_category]
if list_category not in c_dict:
c_dict[list_category] = list_items
Expand Down

0 comments on commit e644194

Please sign in to comment.