Skip to content

Conversation

@ifenni
Copy link
Collaborator

@ifenni ifenni commented Jan 16, 2026

The goal of these updates is to significantly reduce the current computational cost of cloudiness calculations for both forecasted (future) and archived (historical) data.
The code updates mainly impacted utils/cloudiness.py, and included:

  • batching the set of points into blocks to reduce the number of session calls and leverage the Open-Meteo API’s multi-point input capability.
  • adding multithreading to the loop over these blocks inside the function "get_overpass_cloudines"
  • adding a rate_limiter class to avoid API rate limit issues

We also updated the main py file next_pass.py to include a 1 minute waiting time between Sentinel-1 and Sentinel-2 when cloudiness is requested, to avoid hitting the weather API minute usage limits (600 calls / min).

Without cloudiness, the next-pass computation completes in 3 minutes and 55 seconds. Enabling the cloudiness option (-c) with the previous implementation increased the runtime to 15 minutes and 47 seconds. With the present updates, the runtime is reduced to 4 minutes and 52 seconds (including the mandatory 1-minute wait to avoid rate limiting), corresponding to a gain of approximately 11 minutes, or a ~69% reduction in runtime compared to the previous cloudiness-enabled version.

@ifenni ifenni requested a review from ehavazli January 16, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant