#!/bin/bash
# Script to download all data for the history project (~211 GB)
# Update the list below to keep only the files you need to download

 5BASE_URL="http://ige-opendap.univ-grenoble-alpes.fr/opendap/HISTORY/data"
# "https://ige-meom-opendap.univ-grenoble-alpes.fr/thredds/fileServer/meomopendap/extract/HISTORY/data"  # old link

filenames=(casa_grande_aerial_preproc.tgz \
    casa_grande_aerial_raw.tgz \
    casa_grande_aux_data.tgz \
    casa_grande_kh9mc_preproc.tgz \
    casa_grande_kh9mc_raw.tgz \
    casa_grande_kh9pc_preproc.tgz \
    casa_grande_kh9pc_raw.tgz \
    iceland_aerial_preproc.tgz \
    iceland_aerial_raw.tgz \
    iceland_aux_data.tgz \
    iceland_kh9mc_preproc.tgz \
    iceland_kh9mc_raw.tgz \
    iceland_kh9pc_preproc.tgz \
    iceland_kh9pc_raw.tgz
	  )

for f in ${filenames[@]}
do
    echo -e "\n\n### Downloading file $f";
    wget $BASE_URL/$f;
done
