Skip to content

Commit

Permalink
switch to 15 mintues data, if less than 1 hour of 5 min data
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 7, 2024
1 parent 36c876f commit d9113c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion satip/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d9113c7

Please sign in to comment.