#!/bin/bash
##############################################################################
# ESG Federation download script
#
# Template version: 1.2
# Generated by esgf-node.ipsl.upmc.fr - 2020/12/16 15:19:34
# Search URL: https://esgf-node.ipsl.upmc.fr/esg-search/wget/?distrib=false&dataset_id=CMIP6.CMIP.CNRM-CERFACS.CNRM-ESM2-1.historical.r1i1p1f2.CFday.va.gr.v20181206|esg1.umr-cnrm.fr
#
###############################################################################
# first be sure it's bash... anything out of bash or sh will break
# and the test will assure we are not using sh instead of bash
if [ $BASH ] && [ `basename $BASH` != bash ]; then
    echo "######## This is a bash script! ##############" 
    echo "Change the execution bit 'chmod u+x $0' or start with 'bash $0' instead of sh."
    echo "Trying to recover automatically..."
    sleep 1
    /bin/bash $0 $@
    exit $?
fi

version=1.3.2
CACHE_FILE=.$(basename $0).status
openId=
search_url='https://esgf-node.ipsl.upmc.fr/esg-search/wget/?distrib=false&dataset_id=CMIP6.CMIP.CNRM-CERFACS.CNRM-ESM2-1.historical.r1i1p1f2.CFday.va.gr.v20181206|esg1.umr-cnrm.fr'

#These are the embedded files to be downloaded
download_files="$(cat <<EOF--dataset.file.url.chksum_type.chksum
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18500101-18501231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18500101-18501231.nc' 'SHA256' '4c4006571111bfdea55e57952a170b72fc8f3f5f631f59066eae98cd97b3cd2c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18510101-18511231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18510101-18511231.nc' 'SHA256' 'bf96601dc2a5eb85f7505793bd46baf64558ae9082ea80e1e61b3c9fb6cd1015'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18520101-18521231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18520101-18521231.nc' 'SHA256' '0687249e751e36b752cf71a4071035a7c063f1b74f97f0db99a3b5e3c5c04484'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18530101-18531231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18530101-18531231.nc' 'SHA256' 'a7ba86f23696c043a94c7b6d3af9522edae2fa5888b3245e046d234ecf3fa554'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18540101-18541231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18540101-18541231.nc' 'SHA256' '255784bf50f799fe6ec3eee1f1f9a0bf4f0533ad4c838e63914ee7c606697ba7'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18550101-18551231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18550101-18551231.nc' 'SHA256' 'e6edcfc2341ab14a083ee744da03110669aed567953814fd823cb16c8f6cf595'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18560101-18561231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18560101-18561231.nc' 'SHA256' 'cb8b58e5d76ba4ecfb534daa6017f921660e6c6f57a6c9056fd1d946f6ffcdc5'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18570101-18571231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18570101-18571231.nc' 'SHA256' '9efc608c68d85e7d6cec0e0764b9e1a2532ecdce58c6df4de2969496f1dd5d18'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18580101-18581231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18580101-18581231.nc' 'SHA256' '43fe3fd4d0faee09ed41752ca90191c0a0d7f12dafb80a4e09ba2c8f7c4e757d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18590101-18591231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18590101-18591231.nc' 'SHA256' 'c47323645ab9f3199c9eee2ef4c47c21652c778dc961a657351c275dfeeaa21b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18600101-18601231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18600101-18601231.nc' 'SHA256' '62d7ab32f796a7669a83efdd0c3f3797942061723ad6610f20bcf3a284a3d74d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18610101-18611231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18610101-18611231.nc' 'SHA256' '92ade0bc0b7bd5c37897622415580285d25c12e69a7b14f7f841e10dec70c827'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18620101-18621231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18620101-18621231.nc' 'SHA256' 'e9b85e9b11a39599adf0c623aaf8854e4e7bf91e56703ff7dc16f13b7af78cbc'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18630101-18631231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18630101-18631231.nc' 'SHA256' '9a629b11d335dc1c2c40fb600ded6b67e4c9d661c7e562fba6550a66e1f85e51'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18640101-18641231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18640101-18641231.nc' 'SHA256' '20505b351b631cc58907e9a50a8b5a2894e7376eb9cdfd1101fd9ce100f11c90'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18650101-18651231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18650101-18651231.nc' 'SHA256' 'ceb84e52829216c73768f57d742f1fce14707b6b893851c9ddfad1035c4c0b9f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18660101-18661231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18660101-18661231.nc' 'SHA256' 'd274d70faab53661e3679fb4b8066b39dc94f0a02443c05991601a55c74a27a1'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18670101-18671231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18670101-18671231.nc' 'SHA256' '5092cb26e7c8f5097bcfa89c99f9f74003135aab78477697ae6f3cd380866ce6'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18680101-18681231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18680101-18681231.nc' 'SHA256' '357d5683012e62d19bdd778787f2839bf6f85a46efaf0ea55986e91ed0508f18'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18690101-18691231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18690101-18691231.nc' 'SHA256' '62ca2e214fd241b4d883c714b9c29c349beb14140fb32d57d397976f15c6792e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18700101-18701231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18700101-18701231.nc' 'SHA256' 'a39dc23ea99315c23b382eaf6e77993a9393e294a9ee76a1bf0e4e4e81d35d48'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18710101-18711231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18710101-18711231.nc' 'SHA256' '455d0e151d9eea954654e44db79415771c19ce89c54da412334bc13d2e47bb45'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18720101-18721231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18720101-18721231.nc' 'SHA256' '6f5b2022a3682182e0e16d1739bc57d38c6b52d3f43ff5e4e695406e70995036'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18730101-18731231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18730101-18731231.nc' 'SHA256' '03272ae9d555f2a5db46c8d7d36289820554f0ede46cc70761fc99462c16c679'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18740101-18741231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18740101-18741231.nc' 'SHA256' 'b40f6d4248fc7b65bd0a773bb87a084ef57c8ab68453d064688b4ea036e18ab0'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18750101-18751231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18750101-18751231.nc' 'SHA256' 'a00e66845af332c0ff876dae0ae80b290d056a4f9564e1ce50591fa17c5b4dbc'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18760101-18761231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18760101-18761231.nc' 'SHA256' 'b080fb0bd146f9c595405f73bb9996181732a4b1b591d2026860be4fe367e94b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18770101-18771231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18770101-18771231.nc' 'SHA256' '12d31fdb5f2daec9f2428d7e4d3f13b2a0f46bbf32a774ad6c30c6731780e23d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18780101-18781231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18780101-18781231.nc' 'SHA256' '550512b561df741e31776e70ffd9939c35f1e88ddd562a1b32886de2fafdd2ee'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18790101-18791231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18790101-18791231.nc' 'SHA256' '82a8dc6eb557f0467c8df58400d5be89e380a143d0629575ead49a289a0bcf31'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18800101-18801231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18800101-18801231.nc' 'SHA256' '76e2127061c39a00edd5b9b88a2398d079fab6fdf65af3953d1e972a6df854a9'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18810101-18811231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18810101-18811231.nc' 'SHA256' '3b56c746d643252034bafe006ddca19a499df2e81eaa3d77e336e3a2e9323168'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18820101-18821231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18820101-18821231.nc' 'SHA256' '41ddd83a74e69d6f39e7eab24836abf9dd6b390c8b2f52e22ee415adc086c100'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18830101-18831231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18830101-18831231.nc' 'SHA256' 'd28ee33674093a2a911bf7caa0b27dc84f3623e2175fcef022a72293ee4966ca'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18840101-18841231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18840101-18841231.nc' 'SHA256' 'ade81b8d6642bba0c81c7cc9b8bac4f5504500a498d210bf7b9071b3e10cc34e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18850101-18851231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18850101-18851231.nc' 'SHA256' 'fc2b18449a812d0414989eed3bd28dc61a85edf8fda220652d75409886a6e247'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18860101-18861231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18860101-18861231.nc' 'SHA256' '6c89b71693fa7eaf73fd2b5e9611126b95e10670299ce6d1d193d4b40e470084'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18870101-18871231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18870101-18871231.nc' 'SHA256' 'dbe4a2dd2568b8b5751d96cb214e8bddd62caa60c2f95dc7d34367abd2466e73'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18880101-18881231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18880101-18881231.nc' 'SHA256' '1bc809d76ea96e975b263f265edbcf18de2ad7952b5d2a596fc72976819e9a25'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18890101-18891231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18890101-18891231.nc' 'SHA256' '114cdb5fd0f9bace0b756bc395043447430af9c89a71ac5bdc500f230e8c23bd'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18900101-18901231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18900101-18901231.nc' 'SHA256' 'cbd06066869287e43ebe173df4e8f6a0a500c553f4354cc7eaff82cb6681d192'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18910101-18911231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18910101-18911231.nc' 'SHA256' 'ae3daa96c02b16bb8d2a7e1fac4bd5ab0650552a0cae1ef3de57682269530654'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18920101-18921231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18920101-18921231.nc' 'SHA256' '8b9d378e9a4c13a7e33c60198ce979cae2c494db5fcb9be7a42b58d5ea585f10'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18930101-18931231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18930101-18931231.nc' 'SHA256' 'eeabd49e3ecf3cf8d65d9cdce14e92b084ff244f564006a45c7f880afd193133'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18940101-18941231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18940101-18941231.nc' 'SHA256' '402ebf9f539dc384e5a81d94c9978b8c04ae64cb73e069dd78229f58e933943a'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18950101-18951231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18950101-18951231.nc' 'SHA256' 'a6173a2e2cd897108ba7f7b3f79d989f79fe056c8dc2f4a6d93565cb94ce60f9'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18960101-18961231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18960101-18961231.nc' 'SHA256' '66b208c4a77b3fcf2ee52072704f2974144594033cc5b2a338852cc5e3ccc38b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18970101-18971231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18970101-18971231.nc' 'SHA256' '95a2c515c74fdaa4c89fb12525e40f5d7032b155e4e8d707264f9e6b63298d51'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18980101-18981231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18980101-18981231.nc' 'SHA256' 'a7dc974b93cec18432c87b696d40f12cf3a34f425bd84dc4156df6ebbf8b64fb'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18990101-18991231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_18990101-18991231.nc' 'SHA256' '5778fe8f2ca58302a93ea0c90efdab65c1140edfd2e4f4ab3dc7a03dd23cc631'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19000101-19001231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19000101-19001231.nc' 'SHA256' '8ccd2760a224c8807e2ef4f81476e66d7ca1257be25d1a42e5e19b81bce0e05d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19010101-19011231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19010101-19011231.nc' 'SHA256' 'c94ed0f2f682c18ac10d5d775e4411ee551c4cf4d3919178f5c175ddb42daecd'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19020101-19021231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19020101-19021231.nc' 'SHA256' '7968b4d766427d42f86341326de8ca6ae86d87c0332e2db1b4d7e1c47adf93ef'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19030101-19031231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19030101-19031231.nc' 'SHA256' '5825d213bae4cb7bcd4ccfbd4f3d6e06b4fd3f040793800550893b5063839e78'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19040101-19041231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19040101-19041231.nc' 'SHA256' 'af8a3e523d586ee1b46fa8789b29f0a559b0b7b8dd0e7ed0d22d303fa18891c5'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19050101-19051231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19050101-19051231.nc' 'SHA256' '3bddb67b75596e4a901f93f73095b224748c3e8c0d9609047d0c1151b8ae330d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19060101-19061231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19060101-19061231.nc' 'SHA256' 'f6da9c621081d6df33944598ebb654ec4f253918e95884ffafc8ece9eba75e3e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19070101-19071231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19070101-19071231.nc' 'SHA256' 'a708332fb4cc748d042eec572d63d98b5d020cd3966fdedda53cc4a378c091be'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19080101-19081231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19080101-19081231.nc' 'SHA256' '063c364306b7d937db797741c73e1bd8315c9b20f9734c4e39f91f03a780ef97'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19090101-19091231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19090101-19091231.nc' 'SHA256' '455200ed830817993ecfba10c4076e13020b8890f88c15376cff171abcb5a3a8'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19100101-19101231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19100101-19101231.nc' 'SHA256' '162581d590e056abb7f6b8d8928459120d5687f4efd831591e624a7bdb50d951'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19110101-19111231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19110101-19111231.nc' 'SHA256' '0ddecbb826d372fef00c2785ac22e703a8c560e66143b5023cbbd9a076bd233f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19120101-19121231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19120101-19121231.nc' 'SHA256' 'acdcfc51a34446b45d6ab46bab6823b6c7e73df4e2ad2babb32bb3a95444c3ad'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19130101-19131231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19130101-19131231.nc' 'SHA256' '372cb4581906572fdedea13c8fd3c96f1e6ae2589d449fd3437ec80b18ff509b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19140101-19141231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19140101-19141231.nc' 'SHA256' 'a4b17c1a1197e7378755e30a4354714fd8a920b9974773fb6a3eb04a5d6d4d6f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19150101-19151231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19150101-19151231.nc' 'SHA256' '36b27db31028f01ebf11fbff58756c6b047beeb5df3e7871ecc3f28d28d23b55'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19160101-19161231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19160101-19161231.nc' 'SHA256' '10d2224db8d2714c9f4ec0dfdb1c83c16c391e8b4b744584c80eb5062b3034e9'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19170101-19171231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19170101-19171231.nc' 'SHA256' '91ca5f928630a51addc0b34df634acf977e80af0efa542214561d2cc1417f644'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19180101-19181231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19180101-19181231.nc' 'SHA256' 'd35551f280d376ae1b9adc4322b80a8212c93ae604b8459adc6c0511431f0e5d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19190101-19191231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19190101-19191231.nc' 'SHA256' '2a7240c06bb704d86cc2d34aeb1d4a4d23f565cb75f9ead7594c4442db976c1f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19200101-19201231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19200101-19201231.nc' 'SHA256' 'a0c1161fc9a8398cdcf12d537e9d78cbab1cb9212a896c009333149f7408bebe'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19210101-19211231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19210101-19211231.nc' 'SHA256' '0d61023f94e09525a92ab51c5ba65fb8fad32ec2847304b20def3316ad16dee8'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19220101-19221231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19220101-19221231.nc' 'SHA256' 'b447359a0198463d79701ceb9b5dd46e654422cf23762b7756bc025b3156182d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19230101-19231231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19230101-19231231.nc' 'SHA256' '93931fbd32f68458f97cd61c199c3d98406d437007d0124359bf6157bb14a014'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19240101-19241231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19240101-19241231.nc' 'SHA256' '731d8e02924d3f8cc9c171e5eb4ce0e2d355b30bb414cf962959e4a9f28a9e04'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19250101-19251231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19250101-19251231.nc' 'SHA256' '7a22cbd48503250baa5df1617c0fc99755e77dccb77c8e6bf8809ef48c54133c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19260101-19261231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19260101-19261231.nc' 'SHA256' '5fd28aac229478badc387540527d001fc8913d7a54bd12a6507f45416964bc5e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19270101-19271231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19270101-19271231.nc' 'SHA256' 'c883439a64138cca50faba60d4fe0ac79fb19aa162b2f678bb3b4e6f7df48a54'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19280101-19281231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19280101-19281231.nc' 'SHA256' 'ec7d71bfb9a7822b89cc871596d0aea53b85b370f454b49a6996b05d40599c0d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19290101-19291231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19290101-19291231.nc' 'SHA256' '0420f9feff40884def54265ee75e1b2a81dfb029b0eef22c082a32253d81d011'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19300101-19301231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19300101-19301231.nc' 'SHA256' '156a7e5bc791b949ed1087938f23b6feddc80fdf78c1dac3e5d8e855a4d8bcb1'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19310101-19311231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19310101-19311231.nc' 'SHA256' 'c6b8c18aefc20751811394a5b939f57da96c71503ed2d93ee4eddc976a6581e3'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19320101-19321231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19320101-19321231.nc' 'SHA256' '4d207398c9d9bee2d3371cb6e17179a8eb888d31137fadd6177a8bdbbc9c3e4a'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19330101-19331231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19330101-19331231.nc' 'SHA256' 'b754ff63bc4591e5450f604515ec29de36364b33dd2f87cdb21b0a7317b05913'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19340101-19341231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19340101-19341231.nc' 'SHA256' '9441a0ecdacec394ed42b3ed26011ec65c26591eb30a55803f031671fb0c5f1d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19350101-19351231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19350101-19351231.nc' 'SHA256' '86d9416ae580887604b878eb32371afcc3f28e357b29ad326f78b3ec6e42ecea'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19360101-19361231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19360101-19361231.nc' 'SHA256' '039ef54cb132146f92fb7a5b6bc4f3a5993fc5fbaabbf17cda95df1c5131aba3'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19370101-19371231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19370101-19371231.nc' 'SHA256' '79d945b0880a2725905645f59e5c1367345ab07264b737c0bf5fb9e796260e69'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19380101-19381231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19380101-19381231.nc' 'SHA256' 'e00269d34b722c0246f454e8528217b8e6d5c870f8a7d2c97ed5f46b5c3143a1'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19390101-19391231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19390101-19391231.nc' 'SHA256' 'ec6dd5e491ad2a986ba56d44f8fd2f555c1c13aa4b8bda8102f7f017842c2531'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19400101-19401231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19400101-19401231.nc' 'SHA256' '6196d0ca0d0643aa1de205f8531f5ef390debccbcb0367243eade03a99d95220'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19410101-19411231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19410101-19411231.nc' 'SHA256' 'aca4cfe758ede19f297cb69761c28d5a8be49cfac0e571b0b5cbdddeafa32370'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19420101-19421231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19420101-19421231.nc' 'SHA256' '60cac590f6bb70a65ba73416cd1853486ce20b6da454b2af088e8da1dc8ae74d'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19430101-19431231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19430101-19431231.nc' 'SHA256' '6bd1a7771cc005c60f2d7b5f43d45717e2728026c455255bd031a135de16347b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19440101-19441231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19440101-19441231.nc' 'SHA256' 'e66fbcaa006df6a06d1ea82d3b587d0382682beb36ae104c9358e66e86f3f9f4'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19450101-19451231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19450101-19451231.nc' 'SHA256' '68c58870ea41a0f12f3b3c0269ed313ecb330dec65adf65578acebd4ae88115f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19460101-19461231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19460101-19461231.nc' 'SHA256' 'b3142cc11a35eef0b6751bdedebff7878e2afebfe426856398134c0ff0297e92'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19470101-19471231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19470101-19471231.nc' 'SHA256' '74b528c559b8ad27e54777ec37b0c7f35a6b7c66d64c3daa15cb67b7171ca104'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19480101-19481231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19480101-19481231.nc' 'SHA256' '0c5683281c6bddbf18b0649c44de917b1ad9882a4ca30dcbc5bd4a6373337295'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19490101-19491231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19490101-19491231.nc' 'SHA256' '6af84749375e90a7f3cdc9c20647a962b7a6fb40c6f64f25dc5f4281af18977e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19500101-19501231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19500101-19501231.nc' 'SHA256' '6ea7e85a7dbb037e3e32007d3bdf4d6785e404878c6edec16ca5800b946cd6c5'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19510101-19511231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19510101-19511231.nc' 'SHA256' '7676db355c815bdfdcdc9667e00467dbbf5e0e22f6684055f0d111d3e473c560'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19520101-19521231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19520101-19521231.nc' 'SHA256' '0549cf6496ea72f01e8addbfffadf5c26c23daa45e443d33046f30643ee9e00e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19530101-19531231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19530101-19531231.nc' 'SHA256' 'f63df2ef4d42df9d6df79768da94b1629143885fcc0a2db89ab018f4313d336b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19540101-19541231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19540101-19541231.nc' 'SHA256' 'b728e8246f81d0586d29ebec5aef5fb20b34fe15801fa22d619c7645413226e3'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19550101-19551231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19550101-19551231.nc' 'SHA256' '344bf2a8dca2618321c2a5c673cd1ce01946a7afbb4eef8edbdb6d42a9fa9b1b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19560101-19561231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19560101-19561231.nc' 'SHA256' '25b064769bc9fee267acfbde5cb989789bb63afbaf5f3dda0a4bf0e0afd379f4'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19570101-19571231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19570101-19571231.nc' 'SHA256' 'b31f951481f57fe4fe76dbb2d58f9f25be3dc27275e4b1e9c5999202213d4f1f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19580101-19581231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19580101-19581231.nc' 'SHA256' '509522b8b3806246e74767b2e259bc398a7356172bd4818f453680a1b6eac152'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19590101-19591231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19590101-19591231.nc' 'SHA256' '0101f5ec3f0fdc2e7cdf9eb21371f9446756d820294a2a012801132639ec894b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19600101-19601231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19600101-19601231.nc' 'SHA256' 'edf9e81fe3fad51d31b94f9262a37d2f66933fa4e655bc59c311f013ee09b36b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19610101-19611231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19610101-19611231.nc' 'SHA256' 'f859103a7b99532e58768d821f2d123a821fc000a653350d33fd91e035cb30f3'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19620101-19621231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19620101-19621231.nc' 'SHA256' 'd859b558376c068627cc5963e7fdba8398a63399a585631279e0466eb491b0ad'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19630101-19631231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19630101-19631231.nc' 'SHA256' 'c3b6f7922a97dc38e36c17a71c8af13c17a920674fff37794b3574558a9cd559'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19640101-19641231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19640101-19641231.nc' 'SHA256' '03e1027df8eb7b9c3fa65dd6339a2937f0b0a541ae8346d1380bc26fa677ddc4'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19650101-19651231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19650101-19651231.nc' 'SHA256' '906a9841882f29a80b074156706ed13c82b2dc1c899a341f52bf981b2a13e3ed'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19660101-19661231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19660101-19661231.nc' 'SHA256' 'dcc2858e1d4b85fd20269cdd8d02d92261552de9a466c360399430b806840a8b'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19670101-19671231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19670101-19671231.nc' 'SHA256' '09c1a305ad588e7cbd8b95633f4ab12332b5f5f558300c5b64eeab8cc256d56f'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19680101-19681231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19680101-19681231.nc' 'SHA256' '5d5a4099002f90573130bf5aaad2b4060aae4b49c8690c30dad222ac7d3f995e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19690101-19691231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19690101-19691231.nc' 'SHA256' '74f4a92451545fb5e5aabb3a53369ac88c0b167906d9ae718ccfe67b6ef3acd0'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19700101-19701231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19700101-19701231.nc' 'SHA256' '5c09e6640a50b6522fb21a55e13c2135e30a0c5e0dfdaf24ce94146aafc256bb'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19710101-19711231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19710101-19711231.nc' 'SHA256' 'b8d45b5de4e090348b961f04eb273d9136adfd6b5fe8e2bc273672d252b6eac0'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19720101-19721231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19720101-19721231.nc' 'SHA256' '47c7cc9cb38b27ee43eb652f61d3ffdf0b4a8ff21695d1b57ab00a59e5c71dd1'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19730101-19731231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19730101-19731231.nc' 'SHA256' '823fd5010fa43037cf0ae864660040f67faba47842855a5ae50193dcee733f0a'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19740101-19741231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19740101-19741231.nc' 'SHA256' 'd16f6cf4c2fe0a8d34f5842613ded7f0299019ff17c60ffde85604af89752a72'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19750101-19751231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19750101-19751231.nc' 'SHA256' '7c2de5b2b49d2eefb234bb84c9d298903b7daba0e4eb3ef15d0f6c827199c5df'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19760101-19761231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19760101-19761231.nc' 'SHA256' '3d04588c30986c5ef6d7c83edb7a0f9e6a3a6e8e417ac4d4712db57869773010'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19770101-19771231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19770101-19771231.nc' 'SHA256' '85e586c5072742026985a1a92e0145e07fed0e463896e4f55b2bcd6bc99b273c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19780101-19781231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19780101-19781231.nc' 'SHA256' '639c77688e4209486207d2914e339f6d2d8065ce6e71ca28ec148aa96a63ae1e'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19790101-19791231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19790101-19791231.nc' 'SHA256' 'de05028dc15d436b0bf658ea63d3615fc27f06a59de948ec31df2bec96adef20'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19800101-19801231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19800101-19801231.nc' 'SHA256' 'f7648ca88801824803c07883e0d0bde31b0557283b163fd3c1601fe7bf6b149c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19810101-19811231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19810101-19811231.nc' 'SHA256' 'b6ddfe44ab3999d9ef0bb2be3fc751a6b30d5db793c7c0886c2789e95f86b4ba'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19820101-19821231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19820101-19821231.nc' 'SHA256' 'c265676cef136088f6e6227bcea188c8b3a1b11192ffe83151271559879f3698'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19830101-19831231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19830101-19831231.nc' 'SHA256' 'f202408858dfac2452d6b49af4ca82261e6fa437331a0dd8178ebfb910920687'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19840101-19841231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19840101-19841231.nc' 'SHA256' '56e89f5de255bb60ecd15f4863de280aa1fc260e530d06c4b8d5d48884cd6277'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19850101-19851231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19850101-19851231.nc' 'SHA256' 'c2f01e2098ec912a024681146c4fa496568a49c00d37bc9497c1cd7c48b18109'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19860101-19861231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19860101-19861231.nc' 'SHA256' '4488a6ed3aa872227cba32d2a14d24acfa4f62fdf62cc0c2fa1db8fec3fc9096'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19870101-19871231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19870101-19871231.nc' 'SHA256' '5a57a6f8dd3517a8374dd4a429ac4a89c094b3269bb80fff3a9f6d14921ba97c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19880101-19881231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19880101-19881231.nc' 'SHA256' '62a40863428466272a40b49f5aa4669408a334c366a622621087fafc58d761dd'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19890101-19891231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19890101-19891231.nc' 'SHA256' '8a98eba463ec3ddc47d6896b2521cb6a2388572e41933d9711705c1906e7d9a7'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19900101-19901231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19900101-19901231.nc' 'SHA256' '44168b9bb6fa71662f731d7cd44c7f38bd18e13a3ddada3c3e77f63673a1e737'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19910101-19911231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19910101-19911231.nc' 'SHA256' '66e30b93f7f49de7a6526f36ebe459fd572ed9d7441e0ed4d6414b397743e065'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19920101-19921231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19920101-19921231.nc' 'SHA256' 'f32108958246c10f84b95b77599e6159e8f7feb8618ca44dec1cceaf33eb5467'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19930101-19931231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19930101-19931231.nc' 'SHA256' '02971db6cadbc6d046bfd2522c668a4b1bff91d54116e81587d79cc880f338ec'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19940101-19941231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19940101-19941231.nc' 'SHA256' '7100b7bf1dd56d4d4bf796d1e4beb47d26376f2cde6c14c97c4ef652dddd760c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19950101-19951231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19950101-19951231.nc' 'SHA256' '84e964a22a2a48e8dcf1b76e9d4eb2780b461f22a3240f513104a383d4cd8814'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19960101-19961231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19960101-19961231.nc' 'SHA256' '034dd6684b350c860768ceb9f91f7758bfbbf8ebd254b4bb67cd563f143b1f10'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19970101-19971231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19970101-19971231.nc' 'SHA256' '6208286712835ba1a06ea401d35c0fd16d9ccbf3d74f257595ad612c27d52f51'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19980101-19981231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19980101-19981231.nc' 'SHA256' '5d1b39c7159a2ad81e00904561f043ea9a92ef4ffbd8561b810069ad7fc7205c'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19990101-19991231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_19990101-19991231.nc' 'SHA256' '8bdf7a16bd821c66d99fcba7817354c06808ef5439956973d5c3adf4bd5a6424'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20000101-20001231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20000101-20001231.nc' 'SHA256' '8dbf7a52a67268d16f9d8e4f4b6efe8e8024e15ddf901d0eeab9c0bf2126ae97'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20010101-20011231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20010101-20011231.nc' 'SHA256' '91a4827dc1463fe74c820944ac6919323f784c5c5d7ed0607b916e5bfe8692ee'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20020101-20021231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20020101-20021231.nc' 'SHA256' '094425c41ff6071eecbd724fafff899eb0e8c18af83ee2637a2fcead579cc0af'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20030101-20031231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20030101-20031231.nc' 'SHA256' 'd00d809d0627bbe3be2657031ee187b3ff3e65c23be3d418731299ad481b3de9'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20040101-20041231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20040101-20041231.nc' 'SHA256' 'de1aa88e38d1fb5937a225e295bf6d081d576599ac712fb7d4ef2155ead7c013'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20050101-20051231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20050101-20051231.nc' 'SHA256' '371478509c3eb32f2a6e7aefbba5cb97045569510f03675c7f8aaf1aeac8c67a'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20060101-20061231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20060101-20061231.nc' 'SHA256' '24172b14e9eef08a731edd4d0062df6b428025b4cc308384ba38166a80288eae'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20070101-20071231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20070101-20071231.nc' 'SHA256' 'f8d6ea96341bb342aadacb4ebf7edfa38532db605a1dedbbe3b23b7584c27355'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20080101-20081231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20080101-20081231.nc' 'SHA256' 'c16c0fe66c5390d89b75a11b02abe473425d821a552871bfeccdb04bc5486021'
'va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20090101-20091231.nc' 'http://esg1.umr-cnrm.fr/thredds/fileServer/CMIP6_CNRM/CMIP/CNRM-CERFACS/CNRM-ESM2-1/historical/r1i1p1f2/CFday/va/gr/v20181206/va_CFday_CNRM-ESM2-1_historical_r1i1p1f2_gr_20090101-20091231.nc' 'SHA256' 'fe6c9d065c38fd95dc4865f3aeb2f186be4aa89930c8514f1122fb6a9c69122e'
EOF--dataset.file.url.chksum_type.chksum
)"

# ESG_HOME should point to the directory containing ESG credentials.
#   Default is $HOME/.esg
ESG_HOME=${ESG_HOME:-$HOME/.esg}
[[ -d $ESG_HOME ]] || mkdir -p $ESG_HOME

ESG_CREDENTIALS=${X509_USER_PROXY:-$ESG_HOME/credentials.pem}
ESG_CERT_DIR=${X509_CERT_DIR:-$ESG_HOME/certificates}
MYPROXY_STATUS=$HOME/.MyProxyLogon
COOKIE_JAR=$ESG_HOME/cookies
MYPROXY_GETCERT=$ESG_HOME/getcert.jar
CERT_EXPIRATION_WARNING=$((60 * 60 * 8))   #Eight hour (in seconds)

WGET_TRUSTED_CERTIFICATES=$ESG_HOME/certificates


# Configure checking of server SSL certificates.
#   Disabling server certificate checking can resolve problems with myproxy
#   servers being out of sync with datanodes.
CHECK_SERVER_CERT=${CHECK_SERVER_CERT:-Yes}

check_os() {
    local os_name=$(uname | awk '{print $1}')
    case ${os_name} in
        Linux)
            ((debug)) && echo "Linux operating system detected"
            LINUX=1
            MACOSX=0
            ;;
        Darwin)
            ((debug)) && echo "Mac OS X operating system detected"
            LINUX=0
            MACOSX=1
            ;;
        *)
            echo "Unrecognized OS [${os_name}]"
            return 1
            ;;
    esac
    return 0
}

#taken from http://stackoverflow.com/a/4025065/1182464
vercomp () {
    if [[ $1 == $2 ]]
    then
        return 0
    fi
    local IFS=.
    local i ver1=($1) ver2=($2)
    # fill empty fields in ver1 with zeros
    for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
    do
        ver1[i]=0
    done
    for ((i=0; i<${#ver1[@]}; i++))
    do
        if [[ -z ${ver2[i]} ]]
        then
            # fill empty fields in ver2 with zeros
            ver2[i]=0
        fi
        if ((10#${ver1[i]} > 10#${ver2[i]}))
        then
            return 1
        fi
        if ((10#${ver1[i]} < 10#${ver2[i]}))
        then
            return 2
        fi
    done
    return 0
}

check_commands() {
    #check wget
    local MIN_WGET_VERSION=1.10
    vercomp $(wget -V | sed -n 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/p') $MIN_WGET_VERSION
    case $? in
        2) #lower
            wget -V
            echo
            echo "** ERROR: wget version is too old. Use version $MIN_WGET_VERSION or greater. **" >&2
            exit 1
    esac
}

usage() {
    echo "Usage: $(basename $0) [flags] [openid] [username]"
    echo "Flags is one of:"
    sed -n '/^while getopts/,/^done/  s/^\([^)]*\)[^#]*#\(.*$\)/\1 \2/p' $0
    echo
    echo "This command stores the states of the downloads in .$0.status"
    echo "For more information check the website: http://esgf.org/wiki/ESGF_wget"
}

#defaults
debug=0
clean_work=1

#parse flags
while getopts ':c:pfF:o:w:isuUndvqhHI:T' OPT; do
    case $OPT in
        H) skip_security=1 && use_http_sec=1;; #       : Authenticate with OpenID (username,) and password, without the need for a certificate.
        T) force_TLSv1=1;;              #       : Forces wget to use TLSv1. 
        c) ESG_CREDENTIALS="$OPTARG";;  #<cert> : use this certificate for authentication.
        f) force=1;;                    #       : force certificate retrieval (defaults to only once per day); for certificate-less authentication (see -H option), this flag will force login and refresh cookies.
        F) input_file="$OPTARG";;       #<file> : read input from file instead of the embedded one (use - to read from stdin)
        o) openId="$OPTARG";;           #<openid>: Provide OpenID instead of interactively asking for it.
        I) username_supplied="$OPTARG";;    #<user_id> : Explicitly set user ID.  By default, the user ID is extracted from the last component of the OpenID URL.  Use this flag to override this behaviour.                   
        w) output="$OPTARG";;           #<file> : Write embedded files into a file and exit
        i) insecure=1;;                 #       : set insecure mode, i.e. don't check server certificate
        s) skip_security=1 && use_cookies_for_http_basic_auth_start=1;;            #       : completely skip security. It will only work if the accessed data is not secured at all. -- works only if the accessed data is unsecured or a certificate exists or cookies are saved (latter applies to -H option only).
        u) update=1;;                   #       : Issue the search again and see if something has changed.
        U) update_files=1;;             #       : Update files from server overwriting local ones (detect with -u)
        n) dry_run=1;;                  #       : Don't download any files, just report.
        p) clean_work=0;;               #       : preserve data that failed checksum
        d) verbose=1;debug=1;;          #       : display debug information
        v) verbose=1;;                  #       : be more verbose
        q) quiet=1;;                    #       : be less verbose
        h) usage && exit 0;;            #       : displays this help
        \?) echo "Unknown option '$OPTARG'" >&2 && usage && exit 1;;
        \:) echo "Missing parameter for flag '$OPTARG'" >&2 && usage && exit 1;;
    esac
done
shift $(($OPTIND - 1))

#setup input as desired by the user
if [[ "$input_file" ]]; then
    if [[ "$input_file" == '-' ]]; then
        download_files="$(cat)" #read from STDIN
        exec 0</dev/tty #reopen STDIN as cat closed it
    else
        download_files="$(cat $input_file)" #read from file
    fi
fi

#if -w (output) was selected write file and finish:
if [[ "$output" ]]; then
    #check the file
    if [[ -f "$output" ]]; then
        read -p "Overwrite existing file $output? (y/N) " answ
        case $answ in y|Y|yes|Yes);; *) echo "Aborting then..."; exit 0;; esac
    fi
    echo "$download_files">$output
    exit
fi


#assure we have everything we need
check_commands

if ((update)); then
    echo "Checking the server for changes..."
    new_wget="$(wget "$search_url" -qO -)"
    compare_cmd="grep -vE '^(# Generated by|# Search URL|search_url=)'"
    if diff -q <(eval $compare_cmd<<<"$new_wget") <(eval $compare_cmd $0) >/dev/null; then
        echo "No changes detected."
    else
        echo "Wget was changed. Dowloading. (old renamed to $0.old.#N)"
        counter=0
        while [[ -f $0.old.$counter ]]; do ((counter++)); done
        mv $0 $0.old.$counter
        echo "$new_wget" > $0
    fi
    exit 0      
fi


##############################################################################
check_java() {
    if ! type java >& /dev/null; then
        echo "Java could not be found." >&2
        return 1
    fi
    if java -version 2>&1|grep openjdk >/dev/null; then
        openjdk=1;
    else
        openjdk=0;
    fi
    jversion=($(jversion=$(java -version 2>&1 | awk '/version/ {gsub("\"","");print $3}'); echo ${jversion//./ }))
    mVer=${jversion[1]}
    if [ $openjdk -eq 1 ]; then
        mVer=${jversion[0]}
        if ((mVer<5)); then
            echo "Openjdk detected. Version 9+ is required for retrieving the certificate." >&2
            echo "Current version seems older: $(java -version | head -n1) " >&2
            return 1
        fi
    else
    
        if ((mVer<5)); then
            echo "Java version 1.5+ is required for retrieving the certificate." >&2
            echo "Current version seems older: $(java -version | head -n1) " >&2
            return 1
        fi
    fi
}

check_myproxy_logon() {
    if ! type myproxy-logon >& /dev/null; then
	echo "myproxy-logon could not be found." >&2
	return 1
    fi
    echo "myproxy-logon found" >&2
}

proxy_to_java() {
    local proxy_user proxy_pass proxy_server proxy_port
    eval $(sed 's#^\(https\?://\)\?\(\([^:@]*\)\(:\([^@]*\)\)\?@\)\?\([^:/]*\)\(:\([0-9]*\)\)\?.*#proxy_user=\3;proxy_pass=\5;proxy_server=\6;proxy_port=\8#'<<<$http_proxy)
    local JAVA_PROXY=
    [[ "$proxy_server" ]] && JAVA_PROXY=$JAVA_PROXY" -Dhttp.proxyHost=$proxy_server"
    [[ "$proxy_port" ]] && JAVA_PROXY=$JAVA_PROXY" -Dhttp.proxyPort=$proxy_port"
    eval $(sed 's#^\(https\?://\)\?\(\([^:@]*\)\(:\([^@]*\)\)\?@\)\?\([^:/]*\)\(:\([0-9]*\)\)\?.*#proxy_user=\3;proxy_pass=\5;proxy_server=\6;proxy_port=\8#'<<<$https_proxy)
    [[ "$proxy_server" ]] && JAVA_PROXY=$JAVA_PROXY" -Dhttps.proxyHost=$proxy_server"
    [[ "$proxy_port" ]] && JAVA_PROXY=$JAVA_PROXY" -Dhttps.proxyPort=$proxy_port"
    
    echo "$JAVA_PROXY"
}

# get certificates from github
get_certificates() {
    # don't if this was already done today
    [[ -z $force && "$(find $ESG_CERT_DIR -type d -mtime -1 2>/dev/null)" ]] && return 0
    echo -n "Retrieving Federation Certificates..." >&2

    if ! wget -O $ESG_HOME/esg-truststore.ts --no-check-certificate https://github.com/ESGF/esgf-dist/raw/master/installer/certs/esg-truststore.ts; then
        echo "Could not fetch esg-truststore";
        return 1
    fi
    
    if ! wget --no-check-certificate https://raw.githubusercontent.com/ESGF/esgf-dist/master/installer/certs/esg_trusted_certificates.tar -O - -q | tar x -C $ESG_HOME; then
        #certificates tarred into esg_trusted_certificates. (if it breaks, let the user know why
        wget --no-check-certificate https://raw.githubusercontent.com/ESGF/esgf-dist/master/installer/certs/esg_trusted_certificates.tar
        echo "Could't update certs!" >&2
        return 1
    else
        #if here everythng went fine. Replace old cert with this ones    
        [[ -d $ESG_CERT_DIR ]] && rm -r $ESG_CERT_DIR || mkdir -p $(dirname $ESG_CERT_DIR)
        mv $ESG_HOME/esg_trusted_certificates $ESG_CERT_DIR
        touch $ESG_CERT_DIR
        echo "done!" >&2
    fi

}

# Retrieve ESG credentials
unset pass
get_credentials() {
    if check_java
    then
	use_java=1
    else	
	use_java=0
	echo "No suitable java for obtaining certificate - checking for myproxy-logon instead" >&2
	check_myproxy_logon || exit 1
    fi
    #get all certificates
    get_certificates

    if [[ -z "$(find $MYPROXY_GETCERT -type f -mtime -1 2>/dev/null)" ]]; then
        echo -n "(Downloading $MYPROXY_GETCERT... "
        mkdir -p $(dirname $MYPROXY_GETCERT)
        if wget -q --no-check-certificate https://raw.githubusercontent.com/ESGF/esgf-dist/master/installer/certs/getcert.jar -O $MYPROXY_GETCERT;then
            echo 'done)'
            touch $MYPROXY_GETCERT
        else
            echo 'failed)'
        fi
    fi

    #if the user already defined one, use it
    if [[ -z $openId ]]; then
        #try to parse the last valid value if any
        [[ -f "$MYPROXY_STATUS" ]] && openId=$(awk -F= '/^OpenID/ {gsub("\\\\", ""); print $2}' $MYPROXY_STATUS)
        if [[ -z $openId ]]; then
            #no OpenID, we need to ask the user
            echo -n "Please give your OpenID (Example: https://myserver/example/username) ? "
        else
            #Allow the user to change it if desired
            echo -n "Please give your OpenID (hit ENTER to accept default: $openId)? "
        fi
        read -e
        [[ "$REPLY" ]] && openId="$REPLY"
    else
        ((verbose)) && echo "Using user defined OpenID $openId (to change use -o <open_id>)"
    fi

    if grep -q ceda.ac.uk <<<$openId; then
        username=${openId##*/}
        echo -n "Please give your username if different [$username]: "
        read -e
        [[ "$REPLY" ]] && username="$REPLY"
    fi
    


    if [ $use_java -eq 1 ]
    then
        local args=
        #get password
	[[ ! "$pass" ]] && read -sp "MyProxy Password? " pass
        [[ "$openId" ]] && args=$args" --oid $openId"
        [[ "$pass" ]] && args=$args" -P $pass"
        [[ "$username" ]] && args=$args" -l $username"
        
        echo -n $'\nRetrieving Credentials...' >&2
        if ! java $(proxy_to_java) -jar $MYPROXY_GETCERT $args --ca-directory $ESG_CERT_DIR --output $ESG_CREDENTIALS ; then        
            echo "Certificate could not be retrieved"
            exit 1
        fi
        echo "done!" >&2
    else
        args=`openid_to_myproxy_args $openId $username` || exit 1
        if ! myproxy-logon $args -b -o $ESG_CREDENTIALS
	then
            echo "Certificate could not be retrieved"
	    exit 1
        fi
	cp $HOME/.globus/certificates/* $ESG_CERT_DIR/	
    fi
}

openid_to_myproxy_args() {
  python - <<EOF || exit 1
import sys
import re
import xml.etree.ElementTree as ET
import urllib2
openid = "$1"
username = "$2" or re.sub(".*/", "", openid)
e = ET.parse(urllib2.urlopen(openid))
servs = [el for el in e.getiterator() if el.tag.endswith("Service")]
for serv in servs:
    servinfo = dict([(re.sub(".*}", "", c.tag), c.text)
                     for c in serv.getchildren()])
    try:
        if servinfo["Type"].endswith("myproxy-service"):
            m = re.match("socket://(.*):(.*)", servinfo["URI"])
            if m:
                host = m.group(1)
                port = m.group(2)
                print "-s %s -p %s -l %s" % (host, port, username)
                break
    except KeyError:
        continue
else:
    sys.stderr.write("myproxy service could not be found\n")
    sys.exit(1)
EOF
}

# check the certificate validity
check_cert() {
    if [[ ! -f "$ESG_CERT" || $force ]]; then
        #not there, just get it
        get_credentials
    elif which openssl &>/dev/null; then
        #check openssl and certificate
        if ! openssl x509 -checkend $CERT_EXPIRATION_WARNING -noout -in $ESG_CERT 2>/dev/null; then
            echo "The certificate expires in less than $((CERT_EXPIRATION_WARNING / 60 / 60)) hour(s). Renewing..."
            get_credentials
        else
            #ok, certificate is fine
            return 0
        fi
    fi
}

#
# Detect ESG credentials
#
find_credentials() {

    #is X509_USER_PROXY or $HOME/.esg/credential.pem
    if [[ -f "$ESG_CREDENTIALS" ]]; then
        # file found, proceed.
        ESG_CERT="$ESG_CREDENTIALS"
        ESG_KEY="$ESG_CREDENTIALS"
    elif [[ -f "$X509_USER_CERT" && -f "$X509_USER_KEY" ]]; then
        # second try, use these certificates.
        ESG_CERT="$X509_USER_CERT"
        ESG_KEY="$X509_USER_KEY"
    else
        # If credentials are not present, just point to where they should go 
        echo "No ESG Credentials found in $ESG_CREDENTIALS" >&2
            ESG_CERT="$ESG_CREDENTIALS"
            ESG_KEY="$ESG_CREDENTIALS"
            #they will be retrieved later one
    fi


    #chek openssl and certificate
    if (which openssl &>/dev/null); then
        if ( openssl version | grep 'OpenSSL 1\.0' ); then
            echo '** WARNING: ESGF Host certificate checking might not be compatible with OpenSSL 1.0+'
        fi
        check_cert || { (($?==1)); exit 1; }
    fi
    
    if [[ $CHECK_SERVER_CERT == "Yes" ]]; then
        [[ -d "$ESG_CERT_DIR" ]] || { echo "CA certs not found. Aborting."; exit 1; }
        PKI_WGET_OPTS="--ca-directory=$ESG_CERT_DIR"
    fi

    #some wget version complain if there's no file present
    [[ -f $COOKIE_JAR ]] || touch $COOKIE_JAR

    PKI_WGET_OPTS="$PKI_WGET_OPTS --certificate=$ESG_CERT --private-key=$ESG_KEY --save-cookies=$COOKIE_JAR --load-cookies=$COOKIE_JAR --ca-certificate=$ESG_CERT"

}

check_chksum() {
    local file="$1"
    local chk_type=$2
    local chk_value=$3
    local local_chksum=Unknown

    case $chk_type in
        md5) local_chksum=$(md5sum_ $file | cut -f1 -d" ");;
        sha256) local_chksum=$(sha256sum_ $file|awk '{print $1}'|cut -d ' ' -f1);;
        *) echo "Can't verify checksum." && return 0;;
    esac

    #verify
    ((debug)) && echo "local:$local_chksum vs remote:$chk_value" >&2
    echo $local_chksum
}

#Our own md5sum function call that takes into account machines that don't have md5sum but do have md5 (i.e. mac os x)
md5sum_() {
    hash -r
    if type md5sum >& /dev/null; then
        echo $(md5sum $@)
    else
        echo $(md5 $@ | sed -n 's/MD5[ ]*\(.*\)[^=]*=[ ]*\(.*$\)/\2 \1/p')
    fi
}

#Our own sha256sum function call that takes into account machines that don't have sha256sum but do have sha2 (i.e. mac os x)
sha256sum_() {
    hash -r
    if type sha256sum >& /dev/null; then
        echo $(sha256sum $@)
    elif type shasum >& /dev/null; then
        echo $(shasum -a 256 $@)
    else
        echo $(sha2 -q -256 $@)
    fi
}

get_mod_time_() {
    if ((MACOSX)); then
        #on a mac modtime is stat -f %m <file>
        echo "$(stat -f %m $@)"
    else
        #on linux (cygwin) modtime is stat -c %Y <file>
        echo "$(stat -c %Y $@)"
    fi
    return 0;
}

remove_from_cache() {
    local entry="$1"
    local tmp_file="$(grep -ve "^$entry" "$CACHE_FILE")"
    echo "$tmp_file" > "$CACHE_FILE"
    unset cached
}

#Download data from node using cookies and not certificates.
download_http_sec()
{
  #The data to be downloaded.
  data=" $url"
  filename="$file"  

  #Wget args.
  if ((insecure)) 
  then
   wget_args=" --no-check-certificate --cookies=on  --keep-session-cookies --save-cookies $COOKIES_FOLDER/wcookies.txt " 
  else
   wget_args=" --ca-directory=$WGET_TRUSTED_CERTIFICATES --cookies=on --keep-session-cookies --save-cookies $COOKIES_FOLDER/wcookies.txt "  
  fi 

  if ((use_cookies_for_http_basic_auth_start)) || ((use_cookies_for_http_basic_auth)) 
  then
   wget_args=" $wget_args"" --load-cookies $COOKIES_FOLDER/wcookies.txt"    
  fi
  
  if((force_TLSv1))
  then
   wget_args=" $wget_args"" --secure-protocol=TLSv1 "
  fi
  
  
  if [[ ! -z "$ESGF_WGET_OPTS" ]]
  then
    wget_args="$wget_args $ESGF_WGET_OPTS"
  fi  
  

  #use cookies for the next downloads
  use_cookies_for_http_basic_auth=1;
   
  #Debug message.
  if  ((debug))
  then
   echo -e "\nExecuting:\n"
   echo -e "wget $wget_args $data\n"
  fi


  #Try to download the data. 
  command="wget $wget_args -O $filename $data"
  http_resp=$(eval $command  2>&1) 
  cmd_exit_status="$?"
  
  if ((debug))
  then
   echo -e "\nHTTP response:\n $http_resp\n"
  fi
      
  #Extract orp service from url ?
  #Evaluate response.
  #redirects=$(echo "$http_resp" | egrep -c ' 302 ')
  #(( "$redirects" == 1 )) && 
  if  echo "$http_resp" | grep -q "/esg-orp/"      
  then
   urls=$(echo "$http_resp" | egrep -o 'https://[^ ]+' | cut -d'/' -f 3)
   orp_service=$(echo "$urls" | tr '\n' ' ' | cut -d' ' -f 2)


   #Use cookies for transaction with orp.
   wget_args=" $wget_args"" --load-cookies $COOKIES_FOLDER/wcookies.txt"    
   
   #Download data using either http basic auth or http login form.
   if [[ "$openid_c" == */openid/  || "$openid_c" == */openid ]]
   then
    download_http_sec_open_id
   else
    download_http_sec_decide_service
   fi
  else  
   if    echo "$http_resp" | grep -q "401 Unauthorized"  \
      || echo "$http_resp" | grep -q "403: Forbidden"  \
      || echo "$http_resp" | grep -q "Connection timed out."  \
      || echo "$http_resp" | grep -q "no-check-certificate"  \
      || (( $cmd_exit_status != 0 ))      
   then 
    echo "ERROR : http request to OpenID Relying Party service failed."
    failed=1
   fi
  fi
}


#Function that decides which implementaion of idp to use.
download_http_sec_decide_service()
{
  #find claimed id

  pos=$(echo "$openid_c" | egrep -o '/' | wc -l)
  username_c=$(echo "$openid_c"  | cut -d'/' -f "$(($pos + 1))")
  esgf_uri=$(echo "$openid_c" | egrep -o '/esgf-idp/openid/')

  host=$(echo "$openid_c"  | cut -d'/' -f 3)
  #test ceda first.

  if [[ -z "$esgf_uri" ]]
  then
   openid_c_tmp="https://""$host""/openid/"
  else
   openid_c_tmp="https://""$host""/esgf-idp/openid/" 
  fi

  command="wget "$openid_c_tmp" --no-check-certificate ${force_TLSv1:+--secure-protocol=TLSv1} -O-"
        
  if [[ ! -z "$ESGF_WGET_OPTS" ]]
  then
   command="$command $ESGF_WGET_OPTS"
  fi  
          
  #Debug message.
  if  ((debug))
  then
   echo -e "\nExecuting:\n"
   echo -e "$command\n"
  fi
            

  #Execution of command.
  http_resp=$(eval $command  2>&1)
  cmd_exit_status="$?"
  
  
  if ((debug))
  then
   echo -e "\nHTTP response:\n $http_resp\n"
  fi 
  

  if    echo "$http_resp" | grep -q "[application/xrds+xml]"  \
     && echo "$http_resp" | grep -q "200 OK"  \
     && (( cmd_exit_status == 0 ))       
  then
   openid_c=$openid_c_tmp
   download_http_sec_open_id
  else
   if [[ -z "$esgf_uri" ]]
   then
    echo "ERROR : HTTP request to OpenID Relying Party service failed."
    failed=1
   else
   download_http_sec_cl_id
   fi
  fi
}


download_http_sec_retry()
{
  echo -e "\nRetrying....\n"
  #Retry in case that last redirect did not work, this happens with older version of wget.
  command="wget $wget_args $data"
      
  #Debug message.
  if  ((debug))
  then
   echo -e "Executing:\n"
   echo -e "$command\n"
  fi   
   
  http_resp=$(eval $command  2>&1) 
  cmd_exit_status="$?"

  if ((debug))
  then
   echo -e "\nHTTP response:\n $http_resp\n"
  fi
   
  if    echo "$http_resp" | grep -q "401 Unauthorized"  \
     || echo "$http_resp" | grep -q "403: Forbidden"  \
     || echo "$http_resp" | grep -q "Connection timed out."  \
     || echo "$http_resp" | grep -q "no-check-certificate"  \
     || (( $cmd_exit_status != 0 ))      
  then 
   echo -e "\nERROR : Retry failed.\n"
   #rm "$filename"
   failed=1
  fi #if retry failed.
}

#Function for downloading data using the claimed id.
download_http_sec_cl_id()
{
  #Http request for sending openid to the orp service.
  command="wget --post-data \"openid_identifier=$openid_c&rememberOpenid=on\"  $wget_args -O- https://$orp_service/esg-orp/j_spring_openid_security_check.htm "

  #Debug message.
  if  ((debug))
  then
   echo -e "Executing:\n"
   echo -e "wget $command\n"
  fi 
  
  
  #Execution of command.
  http_resp=$(eval $command  2>&1)
  cmd_exit_status="$?"

  
  if ((debug))
  then
   echo -e "\nHTTP response:\n $http_resp\n"
  fi 
    
  
  #Extract orp service from openid ?
  #Evaluate response.If redirected to idp service send the credentials.
  #redirects=$(echo "$http_resp" | egrep -c ' 302 ')
  #(( redirects == 2  )) && 
  if  echo "$http_resp" | grep -q "login.htm"  && (( cmd_exit_status == 0 ))   
  then 
  
   urls=$(echo "$http_resp" | egrep -o 'https://[^ ]+' | cut -d'/' -f 3)
   idp_service=$(echo "$urls"  | tr '\n' ' ' | cut -d' ' -f 2) 
      
   command="wget --post-data  password=\"$password_c\" $wget_args ${quiet:+-q} ${quiet:--v} -O $filename https://$idp_service/esgf-idp/idp/login.htm"
   

   #Debug message.
   if  ((debug))
   then
    echo -e "Executing:\n"
    echo -e "wget $command\n"
   fi 

   #Execution of command.
   http_resp=$(eval $command  2>&1)
   cmd_exit_status="$?"
      
   if ((debug))
   then
    echo -e "\nHTTP response:\n $http_resp\n"
   fi 
        
   #Evaluate response. 
   #redirects=$(echo "$http_resp" | egrep -c ' 302 ')
   #(( "$redirects" != 5 )) \ 
   if    echo "$http_resp" | grep -q "text/html"  \
      || echo "$http_resp" | grep -q "403: Forbidden"  \
      || (( cmd_exit_status != 0 ))        
   then 
    rm "$filename"
    download_http_sec_retry
   fi
 
  else
   echo "ERROR : HTTP request to OpenID Provider service failed."
   failed=1
  fi #if redirected to idp.  
}



download_http_sec_open_id()
{
  #Http request for sending openid to the orp web service.
  command="wget --post-data \"openid_identifier=$openid_c&rememberOpenid=on\" --header=\"esgf-idea-agent-type:basic_auth\" --http-user=\"$username_c\" --http-password=\"$password_c\"  $wget_args ${quiet:+-q} ${quiet:--v} -O $filename https://$orp_service/esg-orp/j_spring_openid_security_check.htm "


  #Debug message.
  if  ((debug))
  then
   echo -e "Executing:\n"
   echo -e "$command\n"
  fi 

  #Execution of command.
  http_resp=$(eval $command  2>&1)
  cmd_exit_status="$?"
  
  
  if ((debug))
  then
   echo -e "\nHTTP response:\n $http_resp\n"
  fi 

  #Evaluate response.
  #redirects=$(echo "$http_resp" | egrep -c ' 302 ')
  #(( "$redirects" != 7 )) ||
  if   echo "$http_resp" | grep -q "text/html"  ||  (( $cmd_exit_status != 0 ))   
  then
   rm "$filename"
   download_http_sec_retry     
  fi #if error during http basic authentication. 
  
}


download() {
    wget="wget ${insecure:+--no-check-certificate} ${quiet:+-q} ${quiet:--v} -c ${force_TLSv1:+--secure-protocol=TLSv1} $PKI_WGET_OPTS"
    
    while read line
    do
        # read csv here document into proper variables
        eval $(awk -F "' '" '{$0=substr($0,2,length($0)-2); $3=tolower($3); print "file=\""$1"\";url=\""$2"\";chksum_type=\""$3"\";chksum=\""$4"\""}' <(echo $line) )

        #Process the file
        echo -n "$file ..."

        #get the cached entry if any.
        cached="$(grep -e "^$file" "$CACHE_FILE")"
        
        #if we have the cache entry but no file, clean it.
        if [[ ! -f $file && "$cached" ]]; then
            #the file was removed, clean the cache
            remove_from_cache "$file"
            unset cached
        fi
        
        #check it wasn't modified
        if [[ -n "$cached" && "$(get_mod_time_ $file)" == $(echo "$cached" | cut -d ' ' -f2) ]]; then
                    if [[ "$chksum" == "$(echo "$cached" | cut -d ' ' -f3)" ]]; then
                echo "Already downloaded and verified"
                continue
            elif ((update_files)); then
                #user want's to overwrite newer files
                rm $file
                remove_from_cache "$file"
                unset cached
            else
                #file on server is different from what we have. 
                echo "WARNING: The remote file was changed (probably a new version is available). Use -U to Update/overwrite"
                continue
            fi
        fi
        unset chksum_err_value chksum_err_count
        
        while : ; do
            # (if we had the file size, we could check before trying to complete)
            echo "Downloading"
            [[ ! -d "$(dirname "$file")" ]] && mkdir -p "$(dirname "$file")"
            if ((dry_run)); then
                #all important info was already displayed, if in dry_run mode just abort
                #No status will be stored
                break
            else
                if ((use_http_sec))
                then
                 download_http_sec
                 if ((failed))
                 then
                  break
                 fi
                else
                 $wget -O "$file" $url || { failed=1; break; }  
                fi                
            fi

            #check if file is there
            if [[ -f $file ]]; then
                ((debug)) && echo file found
                if [[ ! "$chksum" ]]; then
                    echo "Checksum not provided, can't verify file integrity"
                    break
                fi
                result_chksum=$(check_chksum "$file" $chksum_type $chksum)
                if [[ "$result_chksum" != "$chksum" ]]; then
                    echo "  $chksum_type failed!"
                    if ((clean_work)); then
                        if !((chksum_err_count)); then
                                chksum_err_value=$result_chksum
                                chksum_err_count=2
                            elif ((checksum_err_count--)); then
                                if [[ "$result_chksum" != "$chksum_err_value" ]]; then
                                    #this is a real transmission problem
                                    chksum_err_value=$result_chksum
                                    chksum_err_count=2
                                fi
                            else
                                #ok if here we keep getting the same "different" checksum
                                echo "The file returns always a different checksum!"
                                echo "Contact the data owner to verify what is happening."
                                echo
                                sleep 1
                                break
                            fi
                        
                            rm $file
                            #try again
                            echo -n "  re-trying..."
                            continue
                    else
                            echo "  don't use -p or remove manually."
                    fi
                else
                    echo "  $chksum_type ok. done!"
                    echo "$file" $(get_mod_time_ "$file") $chksum >> $CACHE_FILE
                fi
            fi
            #done!
            break
        done
        
        if ((failed)); then
            echo "download failed"
            # most common failure is certificate expiration, so check this
            #if we have the pasword we can retrigger download
            ((!skip_security)) && [[ "$pass" ]] && check_cert
            unset failed
        fi
        
done <<<"$download_files"

}

dedup_cache_() {
    local file=${1:-${CACHE_FILE}}
    ((debug)) && echo "dedup'ing cache ${file} ..."
    local tmp=$(LC_ALL='C' sort  -r -k1,2 $file | awk '!($1 in a) {a[$1];print $0}' | sort -k2,2)
    ((DEBUG)) && echo "$tmp"
    echo "$tmp" > $file
    ((debug)) && echo "(cache dedup'ed)"
}

http_basic_auth_func_info_message()
{
  echo  "********************************************************************************"
  echo  "*                                                                              *"
  echo  "* Note that new functionality to allow authentication without the need for     *"
  echo  "* certificates is available with this version of the wget script.  To enable,  *"
  echo  "* use the \"-H\" option and enter your OpenID and password when prompted:        *"
  echo  "*                                                                              *"
  echo  "* $ "$(basename "$0")" -H [options...]                                     *"
  echo  "*                                                                              *"
  echo  "* For a full description of the available options use the help option:         *"
  echo  "*                                                                              *"
  echo  "* $ "$(basename "$0")" -h                                                  *"
  echo  "*                                                                              *"
  echo  "********************************************************************************"
}

#
# MAIN
#

if ((!use_http_sec))
then 
 http_basic_auth_func_info_message
fi

echo "Running $(basename $0) version: $version"
((verbose)) && echo "we use other tools in here, don't try to user their proposed 'options' directly"
echo "Use $(basename $0) -h for help."$'\n'

((debug)) && cat<<EOF
** Debug info **
ESG_HOME=$ESG_HOME
ESG_CREDENTIALS=$ESG_CREDENTIALS
ESG_CERT_DIR=$ESG_CERT_DIR
** -- ** -- ** -- ** --

EOF


cat <<'EOF-MESSAGE'
Script created for 160 file(s)
(The count won't match if you manually edit this file!)



EOF-MESSAGE
sleep 1

check_os
((!skip_security)) && find_credentials

if ((use_http_sec))
then 
     
 if (( ! insecure))
 then 
  get_certificates
 fi

 #Cookies folder.
 COOKIES_FOLDER="$ESG_HOME/wget_cookies"
 
 if (( force ))
 then
  if [ -d $COOKIES_FOLDER ] 
  then
   rm -rf $COOKIES_FOLDER
  fi
 fi

 #Create cookies folder. 
 if [[ ! -d $COOKIES_FOLDER ]] 
 then
  mkdir $COOKIES_FOLDER
 fi
 
 if((! use_cookies_for_http_basic_auth_start))
 then

  #Read openid.
  if [[ ! -z "$openId" ]]
  then
   openid_c="$openId"
  elif ( (("$#" > 1)) || (("$#" == 1)) ) 
  then
   openid_c=$1
  else
   read -p    "Enter your openid : " openid_c
  fi
  
  
  #Read username.
  if [[ ! -z "$username_supplied" ]]
  then
   username_c="$username_supplied"
  elif (("$#" == 2))
  then
   username_c=$2
  elif [[ "$openid_c" == */openid/ || "$openid_c" == */openid ]]
  then
   read -p    "Enter username : " username_c
  fi
  
  #Read password.
  read -s -p "Enter password : " password_c
  echo -e "\n"

 fi #use cookies

fi #use_http_sec 


#do we have old results? Create the file if not
[ ! -f $CACHE_FILE ] && echo "#filename mtime checksum" > $CACHE_FILE && chmod 666 $CACHE_FILE

#clean the force parameter if here (at htis point we already have the certificate)
unset force

download

dedup_cache_


echo "done"
