diff --git a/fms_yaml_tools/diag_table/diag_table_to_yaml.py b/fms_yaml_tools/diag_table/diag_table_to_yaml.py index 135d05e..bd72361 100755 --- a/fms_yaml_tools/diag_table/diag_table_to_yaml.py +++ b/fms_yaml_tools/diag_table/diag_table_to_yaml.py @@ -472,12 +472,12 @@ def construct_yaml(self, # Ensure that the output_name contains "min" # if the reduction method is "min" output_name = tmp_dict['output_name'].lower() - if tmp_dict['reduction'] == "min" and "min" not in output_name: + if tmp_dict['reduction'] == "min" and "min" not in output_name[-3:]: tmp_dict['output_name'] = tmp_dict['output_name'] + "_min" # Ensure that the output_name contains "max" # if the reduction method is "max" - if tmp_dict['reduction'] == "max" and "max" not in output_name: + if tmp_dict['reduction'] == "max" and "max" not in output_name[-3:]: tmp_dict['output_name'] = tmp_dict['output_name'] + "_max" # If the output_name and the var_name are the same