#Download script for the GLOREA-125 v1.0 dataset.
#Contact: Risto.Hanninen(at)fmi.fi 
#

ADDRESS="https://glorea125-reanalysis-v1-0.lake.fmi.fi"

#Current working directory:
CWDIR=$(pwd)

#Folder to put the data.
LDIR=GLOREA125
mkdir -p ${LDIR}
cd ${LDIR}
echo "Downloading the monthly files with daily mean values!"
#Change the years if needed. Currently downloading only the years 1980..2024.
for YYYY in {1980..2024}; do
    for MM in {01..12}; do
	echo "wget ${ADDRESS}/glob_${YYYY}${MM}.nc4"
	wget ${ADDRESS}/glob_${YYYY}${MM}.nc4
    done
done
cd ${CWDIR}
