#! /bin/csh -f
#-------------------------------------------------------------------------------
# gather mss data to create datm7 TN460 multi-year input stream data
# History: B. Kauffman, Sept 2006
#-------------------------------------------------------------------------------

set echo on
mkdir -p PRECIP/orig
mkdir -p RADFLX/orig
mkdir -p STATES/orig

cd PRECIP/orig

foreach YEAR (2000 2001 2002 2003 2004)
   echo getting data for YEAR = $YEAR

   cd ../../PRECIP/orig
   msrcp  mss:/CSM/DATA/ATM/T62/GXGXS/MONTHLY/PRECIP/prec.$YEAR.nc . &

   cd ../../RADFLX/orig
   msrcp mss:/CSM/DATA/ATM/T62/GISS/DAILY/RADFLX/lwdn.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/GISS/DAILY/RADFLX/swdn.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/GISS/DAILY/RADFLX/swup.$YEAR.nc . &

   cd ../../STATES/orig
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/dn10.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/q_10.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/slp_.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/sst_.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/t_10.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/u_10.$YEAR.nc . &
   msrcp mss:/CSM/DATA/ATM/T62/NCEP/4XDAILY/STATES/v_10.$YEAR.nc . &

   wait
end
echo DONE
