#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 yearly files with monthly mean values!"
#Change the years if needed. Currently downloading only the years 1980..2024.
for YYYY in {1980..2024}; do
    echo "wget ${ADDRESS}/monthlyData/glob_${YYYY}monmean.nc4"
    wget ${ADDRESS}/monthlyData/glob_${YYYY}monmean.nc4
done
cd ${CWDIR}
