diff --git a/internal_tests/pytests/pb2nc/test_pb2nc_wrapper.py b/internal_tests/pytests/pb2nc/test_pb2nc_wrapper.py index 4558b798e2..2b7e9ed0fa 100644 --- a/internal_tests/pytests/pb2nc/test_pb2nc_wrapper.py +++ b/internal_tests/pytests/pb2nc/test_pb2nc_wrapper.py @@ -368,3 +368,14 @@ def test_get_config_file(metplus_config): config.set('config', 'PB2NC_CONFIG_FILE', fake_config_name) wrapper = PB2NCWrapper(config) assert wrapper.c_dict['CONFIG_FILE'] == fake_config_name + +def test_pb2nc_file_window(metplus_config): + begin_value = -3600 + end_value = 3600 + + config = metplus_config() + config.set('config', 'PB2NC_FILE_WINDOW_BEGIN', begin_value) + config.set('config', 'PB2NC_FILE_WINDOW_END', end_value) + wrapper = PB2NCWrapper(config) + assert wrapper.c_dict['OBS_FILE_WINDOW_BEGIN'] == begin_value + assert wrapper.c_dict['OBS_FILE_WINDOW_END'] == end_value diff --git a/metplus/wrappers/command_builder.py b/metplus/wrappers/command_builder.py index a6ce485060..29214acfc2 100755 --- a/metplus/wrappers/command_builder.py +++ b/metplus/wrappers/command_builder.py @@ -349,10 +349,12 @@ def handle_file_window_variables(self, c_dict, dtypes=['FCST', 'OBS']): for dtype in dtypes: for edge in edges: - input_list = [f'{dtype}_{app}_FILE_WINDOW_{edge}', - f'{dtype}_FILE_WINDOW_{edge}', - f'FILE_WINDOW_{edge}', - ] + input_list = [ + f'{dtype}_{app}_FILE_WINDOW_{edge}', + f'{app}_FILE_WINDOW_{edge}', + f'{dtype}_FILE_WINDOW_{edge}', + f'FILE_WINDOW_{edge}', + ] output_key = f'{dtype}_FILE_WINDOW_{edge}' value = self.handle_window_once(input_list, 0) c_dict[output_key] = value