#!/bin/csh
#################################################################
# Csh Script to retrieve 366 online Data files of 'ds313.3',
# total 48.25G. This script uses 'wget' to download data.
#
# Highlight this script by Select All, Copy and Paste it into a file;
# make the file executable and run it on command line.
#
# You need pass in your password as a parameter to execute
# this script; or you can set an environment variable RDAPSWD
# if your Operating System supports it.
#
# Contact chifan@ucar.edu (Chi-Fan Shih) for further assistance.
#################################################################


set pswd = $1
if(x$pswd == x && `env | grep RDAPSWD` != '') then
 set pswd = $RDAPSWD
endif
if(x$pswd == x) then
 echo
 echo Usage: $0 YourPassword
 echo
 exit 1
endif
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 opt = 'wget --no-check-certificate'
else
 set opt = 'wget'
endif
set opt1 = '-O Authentication.log --save-cookies auth.rda_ucar_edu --post-data'
set opt2 = "email=ctrhodes@coastal.edu&passwd=$pswd&action=login"
$opt $opt1="$opt2" https://rda.ucar.edu/cgi-bin/login
set opt1 = "-N --load-cookies auth.rda_ucar_edu"
set opt2 = "$opt $opt1 http://rda.ucar.edu/data/ds313.3/"
set filelist = ( \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160101.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160102.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160103.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160104.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160105.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160106.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160107.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160108.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160109.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160110.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160111.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160112.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160113.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160114.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160115.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160116.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160117.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160118.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160119.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160120.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160121.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160122.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160123.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160124.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160125.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160126.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160127.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160128.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160129.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160130.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160131.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160201.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160202.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160203.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160204.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160205.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160206.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160207.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160208.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160209.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160210.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160211.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160212.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160213.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160214.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160215.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160216.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160217.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160218.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160219.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160220.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160221.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160222.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160223.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160224.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160225.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160226.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160227.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160228.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160229.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160301.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160302.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160303.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160304.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160305.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160306.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160307.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160308.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160309.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160310.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160311.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160312.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160313.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160314.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160315.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160316.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160317.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160318.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160319.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160320.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160321.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160322.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160323.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160324.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160325.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160326.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160327.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160328.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160329.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160330.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160331.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160401.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160402.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160403.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160404.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160405.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160406.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160407.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160408.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160409.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160410.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160411.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160412.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160413.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160414.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160415.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160416.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160417.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160418.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160419.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160420.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160421.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160422.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160423.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160424.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160425.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160426.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160427.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160428.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160429.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160430.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160501.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160502.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160503.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160504.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160505.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160506.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160507.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160508.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160509.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160510.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160511.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160512.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160513.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160514.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160515.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160516.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160517.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160518.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160519.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160520.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160521.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160522.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160523.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160524.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160525.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160526.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160527.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160528.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160529.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160530.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160531.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160601.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160602.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160603.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160604.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160605.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160606.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160607.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160608.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160609.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160610.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160611.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160612.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160613.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160614.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160615.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160616.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160617.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160618.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160619.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160620.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160621.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160622.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160623.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160624.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160625.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160626.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160627.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160628.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160629.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160630.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160701.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160702.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160703.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160704.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160705.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160706.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160707.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160708.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160709.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160710.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160711.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160712.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160713.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160714.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160715.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160716.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160717.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160718.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160719.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160720.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160721.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160722.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160723.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160724.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160725.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160726.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160727.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160728.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160729.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160730.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160731.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160801.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160802.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160803.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160804.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160805.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160806.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160807.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160808.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160809.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160810.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160811.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160812.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160813.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160814.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160815.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160816.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160817.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160818.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160819.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160820.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160821.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160822.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160823.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160824.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160825.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160826.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160827.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160828.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160829.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160830.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160831.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160901.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160902.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160903.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160904.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160905.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160906.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160907.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160908.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160909.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160910.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160911.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160912.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160913.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160914.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160915.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160916.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160917.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160918.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160919.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160920.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160921.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160922.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160923.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160924.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160925.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160926.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160927.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160928.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160929.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20160930.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161001.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161002.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161003.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161004.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161005.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161006.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161007.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161008.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161009.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161010.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161011.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161012.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161013.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161014.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161015.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161016.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161017.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161018.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161019.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161020.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161021.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161022.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161023.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161024.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161025.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161026.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161027.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161028.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161029.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161030.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161031.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161101.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161102.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161103.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161104.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161105.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161106.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161107.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161108.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161109.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161110.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161111.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161112.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161113.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161114.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161115.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161116.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161117.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161118.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161119.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161120.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161121.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161122.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161123.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161124.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161125.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161126.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161127.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161128.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161129.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161130.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161201.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161202.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161203.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161204.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161205.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161206.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161207.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161208.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161209.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161210.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161211.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161212.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161213.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161214.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161215.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161216.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161217.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161218.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161219.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161220.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161221.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161222.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161223.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161224.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161225.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161226.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161227.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161228.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161229.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161230.nc \
  1.9x2.5/2016/MERRA2_1.9x2.5_20161231.nc \
)
while($#filelist > 0)
 set syscmd = "$opt2$filelist[1]"
 echo "$syscmd ..."
 $syscmd
 shift filelist
end

