#!/bin/bash # Convert newly downloaded GRIB to NetCDF while the download is still running, # so conversion does not become a long serial tail at the end. Already-converted # years are skipped by convert_ec15.py, so re-running is cheap. cd /home/tanpv/Progs/claude/HW_EC_10 PY=/home/tanpv/.conda/envs/ehd/bin/python while true; do for g in txtm srf_daily srf_24h plev wide_plev wide_olr; do [ -d "data/grib/$g" ] || continue ls data/grib/$g/*.grib >/dev/null 2>&1 || continue $PY src/convert_ec15.py "$g" --jobs 6 2>&1 | tail -n 1 done # stop once the downloader has exited and everything is converted if ! pgrep -f "run_all_downloads" >/dev/null 2>&1; then echo "downloader gone; final conversion pass done $(date '+%F %T')" break fi sleep 600 done