diff --git a/internal/tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py b/internal/tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py index aad6656e24..3737e8ec72 100644 --- a/internal/tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py +++ b/internal/tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py @@ -444,10 +444,16 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, {'METPLUS_INTERP_DICT': 'interp = {shape = CIRCLE;}'}), ({'ENSEMBLE_STAT_INTERP_TYPE_METHOD': 'BILIN', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {method = BILIN;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN];}}'}), ({'ENSEMBLE_STAT_INTERP_TYPE_WIDTH': '2', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {width = 2;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2];}}'}), + # multiple interp type methods + ({'ENSEMBLE_STAT_INTERP_TYPE_METHOD': 'BILIN, NEAREST', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN, NEAREST];}}'}), + # multiple interp type methods + ({'ENSEMBLE_STAT_INTERP_TYPE_WIDTH': '2,3', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2, 3];}}'}), ({ 'ENSEMBLE_STAT_INTERP_VLD_THRESH': '0.8', @@ -457,7 +463,7 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, }, {'METPLUS_INTERP_DICT': ('interp = {vld_thresh = 0.8;' 'shape = CIRCLE;' - 'type = {method = BILIN;width = 2;}}')}), + 'type = {method = [BILIN];width = [2];}}')}), ({'ENSEMBLE_STAT_CLIMO_MEAN_FILE_NAME': '/some/climo_mean/file.txt', }, {'METPLUS_CLIMO_MEAN_DICT': ('climo_mean = {file_name = ' diff --git a/internal/tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py b/internal/tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py index 280103c68e..458c515e3c 100644 --- a/internal/tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py +++ b/internal/tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py @@ -462,10 +462,16 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, {'METPLUS_INTERP_DICT': 'interp = {shape = CIRCLE;}'}), ({'GRID_STAT_INTERP_TYPE_METHOD': 'BILIN', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {method = BILIN;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN];}}'}), ({'GRID_STAT_INTERP_TYPE_WIDTH': '2', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {width = 2;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2];}}'}), + # multiple interp type methods + ({'GRID_STAT_INTERP_TYPE_METHOD': 'BILIN, NEAREST', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN, NEAREST];}}'}), + # multiple interp type methods + ({'GRID_STAT_INTERP_TYPE_WIDTH': '2,3', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2, 3];}}'}), ({ 'GRID_STAT_INTERP_FIELD': 'NONE', @@ -476,7 +482,7 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, }, {'METPLUS_INTERP_DICT': ('interp = {vld_thresh = 0.8;' 'shape = CIRCLE;' - 'type = {method = BILIN;width = 2;}' + 'type = {method = [BILIN];width = [2];}' 'field = NONE;}')}), ({'GRID_STAT_CLIMO_MEAN_FILE_NAME': '/some/climo_mean/file.txt', }, diff --git a/internal/tests/pytests/wrappers/point_stat/test_point_stat_wrapper.py b/internal/tests/pytests/wrappers/point_stat/test_point_stat_wrapper.py index 2e7ef0ef16..a384e1b725 100755 --- a/internal/tests/pytests/wrappers/point_stat/test_point_stat_wrapper.py +++ b/internal/tests/pytests/wrappers/point_stat/test_point_stat_wrapper.py @@ -304,10 +304,16 @@ def test_met_dictionary_in_var_options(metplus_config): {'METPLUS_INTERP_DICT': 'interp = {shape = SQUARE;}'}), ({'POINT_STAT_INTERP_TYPE_METHOD': 'BILIN', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {method = BILIN;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN];}}'}), ({'POINT_STAT_INTERP_TYPE_WIDTH': '2', }, - {'METPLUS_INTERP_DICT': 'interp = {type = {width = 2;}}'}), + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2];}}'}), + # multiple interp type methods + ({'POINT_STAT_INTERP_TYPE_METHOD': 'BILIN, NEAREST', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {method = [BILIN, NEAREST];}}'}), + # multiple interp type methods + ({'POINT_STAT_INTERP_TYPE_WIDTH': '2,3', }, + {'METPLUS_INTERP_DICT': 'interp = {type = {width = [2, 3];}}'}), ({ 'POINT_STAT_INTERP_VLD_THRESH': '0.5', @@ -318,7 +324,7 @@ def test_met_dictionary_in_var_options(metplus_config): { 'METPLUS_INTERP_DICT': ('interp = {' 'vld_thresh = 0.5;shape = SQUARE;' - 'type = {method = BILIN;width = 2;}}')}), + 'type = {method = [BILIN];width = [2];}}')}), ({'POINT_STAT_CLIMO_MEAN_FILE_NAME': '/some/climo_mean/file.txt', }, {'METPLUS_CLIMO_MEAN_DICT': ('climo_mean = {file_name = ' diff --git a/metplus/wrappers/compare_gridded_wrapper.py b/metplus/wrappers/compare_gridded_wrapper.py index 69f6bc5cb0..3631b1d55f 100755 --- a/metplus/wrappers/compare_gridded_wrapper.py +++ b/metplus/wrappers/compare_gridded_wrapper.py @@ -365,8 +365,8 @@ def handle_interp_dict(self, uses_field=False): 'vld_thresh': 'float', 'shape': ('string', 'remove_quotes'), 'type': ('dict', None, { - 'method': ('string', 'remove_quotes'), - 'width': 'int', + 'method': ('list', 'remove_quotes'), + 'width': ('list', 'remove_quotes'), }), } if uses_field: