diff --git a/metcalcpy/util/mode_arearat_statistics.py b/metcalcpy/util/mode_arearat_statistics.py index 2ca56f8e..18d453cb 100644 --- a/metcalcpy/util/mode_arearat_statistics.py +++ b/metcalcpy/util/mode_arearat_statistics.py @@ -902,16 +902,16 @@ def calculate_objacsi(input_data, columns_names): try: nominator_data = column_data_by_name_value(input_data, columns_names, nominator_filter) - nominator = sum_column_data_by_name(nominator_data, columns_names, 'area') + nominator = sum_column_data_by_name(nominator_data, columns_names, 'area') / 2 denominator_1_data = \ column_data_by_name_value(input_data, columns_names, denominator_filter_1) - denominator_1 = sum_column_data_by_name(denominator_1_data, columns_names, 'area') + denominator_1 = sum_column_data_by_name(denominator_1_data, columns_names, 'area') / 2 denominator_2_data = \ column_data_by_name_value(input_data, columns_names, denominator_filter_2) denominator_2 = sum_column_data_by_name(denominator_2_data, columns_names, 'area') - result = round_half_up(nominator / (denominator_1 + 2 * denominator_2), PRECISION) + result = round_half_up(nominator / (denominator_1 + denominator_2), PRECISION) except (TypeError, ZeroDivisionError, Warning, ValueError): result = None warnings.filterwarnings('ignore') diff --git a/metcalcpy/util/mode_ratio_statistics.py b/metcalcpy/util/mode_ratio_statistics.py index 39b7571e..a61d2f28 100644 --- a/metcalcpy/util/mode_ratio_statistics.py +++ b/metcalcpy/util/mode_ratio_statistics.py @@ -838,17 +838,17 @@ def calculate_objcsi(input_data, columns_names): or None if some of the data values are missing or invalid """ warnings.filterwarnings('error') - nominator_filter = {'fcst_flag': 1, 'matched_flag': 0} + nominator_filter = {'simple_flag': 1, 'matched_flag': 1} denominator_filter_1 = {'simple_flag': 1, 'matched_flag': 1} denominator_filter_2 = {'simple_flag': 1, 'matched_flag': 0} try: - nominator = nrow_column_data_by_name_value(input_data, columns_names, nominator_filter) + nominator = nrow_column_data_by_name_value(input_data, columns_names, nominator_filter) / 2 denominator_1 = \ - nrow_column_data_by_name_value(input_data, columns_names, denominator_filter_1) + nrow_column_data_by_name_value(input_data, columns_names, denominator_filter_1) / 2 denominator_2 = \ nrow_column_data_by_name_value(input_data, columns_names, denominator_filter_2) - result = round_half_up(nominator / (denominator_1 + 2 * denominator_2), PRECISION) + result = round_half_up(nominator / (denominator_1 + denominator_2), PRECISION) except (TypeError, ZeroDivisionError, Warning, ValueError): result = None warnings.filterwarnings('ignore')