#!/bin/csh
#################################################################
# Csh Script to retrieve 365 online Data files of 'ds313.3',
# total 48.12G. 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/2017/MERRA2_1.9x2.5_20170101.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170102.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170103.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170104.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170105.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170106.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170107.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170108.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170109.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170110.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170111.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170112.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170113.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170114.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170115.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170116.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170117.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170118.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170119.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170120.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170121.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170122.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170123.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170124.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170125.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170126.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170127.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170128.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170129.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170130.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170131.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170201.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170202.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170203.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170204.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170205.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170206.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170207.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170208.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170209.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170210.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170211.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170212.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170213.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170214.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170215.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170216.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170217.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170218.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170219.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170220.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170221.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170222.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170223.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170224.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170225.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170226.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170227.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170228.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170301.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170302.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170303.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170304.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170305.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170306.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170307.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170308.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170309.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170310.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170311.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170312.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170313.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170314.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170315.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170316.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170317.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170318.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170319.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170320.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170321.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170322.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170323.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170324.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170325.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170326.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170327.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170328.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170329.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170330.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170331.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170401.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170402.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170403.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170404.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170405.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170406.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170407.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170408.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170409.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170410.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170411.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170412.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170413.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170414.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170415.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170416.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170417.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170418.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170419.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170420.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170421.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170422.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170423.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170424.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170425.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170426.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170427.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170428.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170429.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170430.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170501.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170502.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170503.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170504.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170505.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170506.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170507.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170508.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170509.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170510.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170511.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170512.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170513.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170514.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170515.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170516.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170517.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170518.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170519.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170520.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170521.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170522.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170523.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170524.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170525.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170526.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170527.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170528.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170529.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170530.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170531.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170601.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170602.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170603.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170604.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170605.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170606.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170607.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170608.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170609.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170610.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170611.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170612.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170613.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170614.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170615.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170616.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170617.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170618.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170619.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170620.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170621.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170622.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170623.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170624.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170625.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170626.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170627.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170628.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170629.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170630.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170701.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170702.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170703.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170704.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170705.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170706.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170707.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170708.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170709.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170710.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170711.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170712.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170713.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170714.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170715.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170716.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170717.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170718.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170719.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170720.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170721.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170722.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170723.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170724.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170725.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170726.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170727.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170728.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170729.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170730.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170731.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170801.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170802.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170803.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170804.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170805.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170806.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170807.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170808.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170809.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170810.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170811.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170812.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170813.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170814.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170815.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170816.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170817.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170818.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170819.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170820.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170821.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170822.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170823.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170824.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170825.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170826.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170827.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170828.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170829.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170830.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170831.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170901.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170902.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170903.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170904.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170905.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170906.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170907.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170908.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170909.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170910.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170911.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170912.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170913.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170914.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170915.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170916.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170917.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170918.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170919.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170920.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170921.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170922.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170923.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170924.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170925.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170926.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170927.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170928.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170929.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20170930.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171001.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171002.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171003.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171004.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171005.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171006.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171007.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171008.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171009.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171010.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171011.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171012.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171013.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171014.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171015.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171016.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171017.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171018.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171019.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171020.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171021.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171022.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171023.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171024.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171025.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171026.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171027.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171028.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171029.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171030.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171031.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171101.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171102.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171103.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171104.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171105.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171106.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171107.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171108.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171109.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171110.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171111.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171112.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171113.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171114.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171115.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171116.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171117.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171118.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171119.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171120.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171121.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171122.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171123.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171124.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171125.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171126.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171127.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171128.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171129.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171130.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171201.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171202.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171203.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171204.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171205.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171206.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171207.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171208.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171209.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171210.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171211.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171212.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171213.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171214.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171215.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171216.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171217.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171218.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171219.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171220.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171221.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171222.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171223.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171224.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171225.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171226.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171227.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171228.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171229.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171230.nc \
  1.9x2.5/2017/MERRA2_1.9x2.5_20171231.nc \
)
while($#filelist > 0)
 set syscmd = "$opt2$filelist[1]"
 echo "$syscmd ..."
 $syscmd
 shift filelist
end

