#!/usr/bin/env bash

syear=$1

eyear=$2

for year in {$eyear..$syear}
do
	months=""
	for mon in {01..12}
	do
		if [ "$months" == "" ]; then
			months="${year}01"
		else
			months="$months,$year$mon"
		fi
	done
	echo -n "Calculating $year :: $months ... "
	(time ipython nc2scores_aeronet_new.py all aeronet $months &> ${year}.log)
	echo "done.";
	rsync -avz --no-links /data/daily_dashboard/obs/aeronet/h5_new/${year}.h5 bscesdust02.bsc.es:/data/daily_dashboard/obs/aeronet/h5/
done
