#!/bin/tcsh -f 
setenv remotedns gridftp.stampede.tacc.utexas.edu 
setenv remotedir /scratch/01178/tg804586/Run/JU2003/WRFV3.4.1/YSU 

@ iday = 26
while ( $iday <= 31 )
 if ( ${iday} != 17 && ${iday} != 18 && ${iday} != 24 && ${iday} != 25 ) then
 	 if ( ${iday} <= 9 ) then
	   set dir_xhu = wrfNARR5dWSM6_UCM_YSU.2003070${iday}00
	  else
	   set dir_xhu = wrfNARR5dWSM6_UCM_YSU.200307${iday}00
 	 endif 
#   mkdir ${dir_xhu}
	  echo ${iday}
  echo ${dir_xhu}
#  scp -pr tg804586@stampede.tacc.utexas.edu:/scratch/01178/tg804586/Run/JU2003/WRFV3.4.1/YSU/${dir_xhu}/namelist.input ${dir_xhu}/.
#  rsync -av tg804586@stampede.tacc.utexas.edu:"/scratch/01178/tg804586/Run/JU2003/WRFV3.4.1/YSU/${dir_xhu}/wrfinput_d0?" ${dir_xhu}/.
#  rsync -av tg804586@stampede.tacc.utexas.edu:"/scratch/01178/tg804586/Run/JU2003/WRFV3.4.1/YSU/${dir_xhu}/wrfout_d0*:00" ${dir_xhu}/.
#globus-url-copy -vb -tcp-bs 4194304 -p 8 -r gsiftp://$remotedns/$remotedir/${dir_xhu}/namelist.wps ./${dir_xhu}/
 globus-url-copy -vb -tcp-bs 4194304 -p 8 -r gsiftp://$remotedns/$remotedir/${dir_xhu}/'wrfout_d0*:00' ./${dir_xhu}/
  else
    echo "I already have ${iday} results"
  endif 
@ iday ++
end 
