all: \
 input/tz_world.geojson \
 intermed/tz_world_hours.geojson \
 ioapi/tz_world_hours_12US2.IOAPI.nc \
 ioapi/tz_world_hours_12US1.IOAPI.nc \
 ioapi/tz_world_hours_36US3.IOAPI.nc \
 ioapi/tz_world_hours_HEMIS.IOAPI.nc \
 ioapi/tz_world_hours_108NHEMI2.IOAPI.nc \
 ioapi/tz_world_hours_1188NHEMI2.IOAPI.nc

input/tz_world.geojson:
	cd input/; wget https://github.com/candu/efele-tz-world-geojson/raw/master/tz_world.geojson

intermed/tz_world_hours.geojson: scripts/tz_world_hours.py input/tz_world.geojson
	python $<

intermed/tz_world_hours_%.nc: intermed/tz_world_hours.geojson
	scripts/project.sh $*

ioapi/tz_world_hours_%.IOAPI.nc: scripts/toioapi.py intermed/tz_world_hours_%.nc
	./$< $*
