#!/usr/bin/env csh
#
# c-shell script to download selected files from gdex.ucar.edu using Wget
# NOTE: if you want to run under a different shell, make sure you change
#       the 'set' commands according to your shell's syntax
# after you save the file, don't forget to make it executable
#   i.e. - "chmod 755 <name_of_script>"
#
# Experienced Wget Users: add additional command-line flags to 'opts' here
#   Use the -r (--recursive) option with care
#   Do NOT use the -b (--background) option - simultaneous file downloads
#       can cause your data access to be blocked
set opts = "-N"
#
# Check wget version.  Set the --no-check-certificate option 
# if wget version is 1.10 or higher
set v = `wget -V |grep 'GNU Wget ' | cut -d ' ' -f 3`
set a = `echo $v | cut -d '.' -f 1`
set b = `echo $v | cut -d '.' -f 2`
if(100 * $a + $b > 109) then
  set cert_opt = "--no-check-certificate"
else
  set cert_opt = ""
endif

set filelist= ( \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250701.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250702.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250703.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250704.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250705.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250706.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250707.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250708.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250709.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250710.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250711.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250712.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250713.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250714.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250715.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250716.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250717.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250718.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250719.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250720.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250721.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250722.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250723.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250724.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250725.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250726.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250727.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250728.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250729.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250730.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250731.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250801.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250802.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250803.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250804.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250805.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250806.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250807.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250808.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250809.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250810.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250811.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250812.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250813.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250814.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250815.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250816.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250817.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250818.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250819.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250820.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250821.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250822.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250823.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250824.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250825.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250826.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250828.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250829.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250830.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250831.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250901.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250902.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250903.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250904.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250905.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250906.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250907.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250908.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250909.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250910.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250911.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250912.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250913.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250914.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250915.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250916.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250917.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250918.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250919.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250920.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250921.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250922.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250923.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250924.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250925.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250926.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250927.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250928.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250929.tar.gz \
  https://osdf-director.osg-htc.org/ncar/gdex/d735000/mtiasi/2025/mtiasi.20250930.tar.gz \
)
while($#filelist > 0)
  set syscmd = "wget $cert_opt $opts $filelist[1]"
  echo "$syscmd ..."
  $syscmd
  shift filelist
end
