From c7ed77b8e4f4b0853168dc8c15a9ad48e787c88e Mon Sep 17 00:00:00 2001 From: Alex Leith Date: Thu, 4 Jan 2024 09:11:29 +1100 Subject: [PATCH] Add send_area_to_processor to simple task --- dep_tools/task.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dep_tools/task.py b/dep_tools/task.py index bdeef20..7fe3809 100644 --- a/dep_tools/task.py +++ b/dep_tools/task.py @@ -91,7 +91,10 @@ def run(self): self.logger.info(f"Found {len(input_data.time)} timesteps to load") self.logger.info("Preparing to process data") - output_data = self.processor.process(input_data) + processor_kwargs = {} + if self.processor.send_area_to_processor: + processor_kwargs["area"] = self.area + output_data = self.processor.process(input_data, **processor_kwargs) self.logger.info(f"Processed data will have a result of shape: {[output_data.dims[d] for d in ['x', 'y']]}") self.logger.info("Processing and writing data...")