START_MONTH=1995-01
END_MONTH=2026-08

help:     ## Show this help.
	@egrep -h '(\s##\s|^##\s)' $(MAKEFILE_LIST) | egrep -v '^--' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m  %-35s\033[0m %s\n", $$1, $$2}'

ARCHIVE=./hostrada_coarse.zarr
# Optional: older archive (same grid/time axis) whose variables are copied
# instead of downloaded again, e.g. make transpose SEED=./hostrada_coarse_tas_rsds.zarr
SEED=
BUILD=uv run python -m hostrada_transpose.build_archive \
		--start ${START_MONTH} --end ${END_MONTH} \
		--raw-cache-dir ./raw_cache --staging-dir ./staging --archive-path ${ARCHIVE} \
		$(if ${SEED},--seed-from ${SEED})

transpose: ## Download and transpose all variables
	${BUILD}

# Example with screen:
# screen -S "Hostrada transpose" -L -Logfile "hostrada_transpose.log" make transpose

resume: ## Resume already started transpose
	${BUILD} --resume

# TODO: Show available data
# TODO: Show data for given location / date range

