caio.co/de/chuva

Cleanup old data with a pattern based on latest file

Ensemble dataset has (obviously) a different name. Filled up the disk,
couldn't download newer data.

First outage 🎉🎉
Id
c707094147bda182dbb3501b7ad249369e987055
Author
Caio
Commit time
2025-12-04T13:12:55+01:00

Modified download-dataset/knmi_precip_nowcast_latest.py

@@ -130,8 +130,9

# data files by most-recent-first
# lexy sort is enough due to the naming convention
+ pattern = "{}*".format(latest_file.rsplit("_", 1)[0])
datasets = sorted(
- glob(os.path.join(download_dir, "RAD_NL25_RAC_FM_*.h5")), reverse=True
+ glob(os.path.join(download_dir, pattern)), reverse=True
)
# keep a 2h window of datafiles (a new one every 5min)
for file in datasets[24:]: