From d15510a0c359becf974410a474184f0287d619f8 Mon Sep 17 00:00:00 2001
From: jws52 <jws52@cam.ac.uk>
Date: Mon, 17 Apr 2023 14:01:26 +0100
Subject: [PATCH] feat: Extend source calc time window to T0+9 days

This will be helpful in cases when a given day's source calculation
fails as it allows the NAME spore dispersion model to run with the
previous day's calculation, provided there are no new surveys on
the latest day (which will only be known about once there is a
successful download again).
---
 coordinator/ProcessorSurveys.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/coordinator/ProcessorSurveys.py b/coordinator/ProcessorSurveys.py
index 4e95636..48889d0 100644
--- a/coordinator/ProcessorSurveys.py
+++ b/coordinator/ProcessorSurveys.py
@@ -1057,7 +1057,12 @@ def process_in_job_survey(jobPath,status,config,component):
                 config_path = config['Survey']['pySourcesConfigFilename'],
                 survey_path = processed_surveys_filepath,
                 reference_date = config['StartString'],
-                day_offsets = [-2,7],
+                # Day 0 (current day) is always included
+                # Days -2,-1 and 0 are needed to initialise spores in NAME
+                # days 1-7 are forecast days
+                # days 8 and 9 are buffers in case NAME needs to run with the 
+                # previous day's source job
+                day_offsets = [-2,9],
                 output_dir = output_directory)
 
     logger.debug('Placing copy of result in job directory with conventional name')
-- 
GitLab