diff --git a/satip/app.py b/satip/app.py index 44406f5f..1f01b578 100644 --- a/satip/app.py +++ b/satip/app.py @@ -241,8 +241,11 @@ def run( start_date=start_date.strftime("%Y-%m-%d-%H:%M:%S"), end_date=pd.Timestamp(start_time, tz="UTC").strftime("%Y-%m-%d-%H:%M:%S"), ) + # Check if any RSS imagery is available, if not, fall back to 15 minutely data - if (len(datasets) == 0) or use_hr_serviri: + # We check if there are less than 12 datasets, which is 1 hour of 5 minute data. + # If there is less than this, we move over to the 15 minute data + if (len(datasets) < 12) or use_hr_serviri: log.warn( f"No RSS Imagery available or using backup ({use_hr_serviri=}), " f"falling back to 15-minutely data",