#!/bin/csh

# set modelruns = (sulf_comp_ndg_ctl1 sulf_comp_ndg_noglbdms1)
  set modelruns = (sulf_comp_ndg_sat45n1)
  set years     = ( 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 )
# set years     = ( 1991 )
  
 foreach n ( `seq ${#modelruns}` )
     set runid = $modelruns[$n]

   foreach m ( `seq ${#years}` )
     set ii    = 1
     set nmon  = 12
     set tmp   = 9
     set year = $years[$m]
     echo .................................................
     echo                Downloading =  $runid
     echo                Run Number   =  $n
     echo                Year           =  $year 
     echo .................................................
      while ($ii <= $nmon)
        if ($ii <= $tmp) then
           set mn = 0${ii}
         else
           set mn = ${ii}
        endif
         ccc2nc -notxt da_${runid}_${year}_m${mn}_gp.009
       @ ii ++
      end
   end
 end
