Spaces:
Sleeping
Sleeping
Optimize forecast frequency: every 3 hours for first 2 days
Browse files- First 48 hours: Every 3 hours (0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48)
- Days 3-4: Every 24 hours (72,96)
- Provides high accuracy for short-range forecasts
- Maintains 4-day coverage with efficient longer-range intervals
- Perfect for production weather apps requiring detailed near-term forecasts
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -290,8 +290,8 @@ def fetch_dwd_icon_data(lat, lon):
|
|
| 290 |
nearest_idx = find_nearest_grid_point(lat, lon, grid_lats, grid_lons)
|
| 291 |
print(f"Nearest grid point: {grid_lats[nearest_idx]:.3f}°N, {grid_lons[nearest_idx]:.3f}°E")
|
| 292 |
|
| 293 |
-
# Download and process forecast data for
|
| 294 |
-
forecast_hours = [0, 3, 6, 12, 18, 24, 36, 48, 72, 96] #
|
| 295 |
weather_data = {'times': [], 'data': {param: [] for param in parameters.keys()}}
|
| 296 |
|
| 297 |
for fh in forecast_hours:
|
|
|
|
| 290 |
nearest_idx = find_nearest_grid_point(lat, lon, grid_lats, grid_lons)
|
| 291 |
print(f"Nearest grid point: {grid_lats[nearest_idx]:.3f}°N, {grid_lons[nearest_idx]:.3f}°E")
|
| 292 |
|
| 293 |
+
# Download and process forecast data - high frequency for first 2 days, then longer intervals
|
| 294 |
+
forecast_hours = [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 72, 96] # Every 3hrs for 48hrs, then 24hr intervals
|
| 295 |
weather_data = {'times': [], 'data': {param: [] for param in parameters.keys()}}
|
| 296 |
|
| 297 |
for fh in forecast_hours:
|