#!/bin/csh -f

set MSROOT = $1
set CASENAME = $2
set cpllog = $3
set ypoplog = $4
set outfile = $5
set cpllogpath = $6
set ocnlogpath = $7
set dtfilepath = $8

printf "Files to get using hsi \n" > $outfile

if ($cpllog == 1) then
  hsi -P "ls -1  $cpllogpath/cpl.log*"
  if ($status == 0)then
    hsi -P "ls -1  $cpllogpath/cpl.log*" >> $outfile
  endif
endif

if ($ypoplog == 1) then
  hsi -P "ls -1  $ocnlogpath/ocn.log*"
  if ($status == 0)then
    hsi -P "ls -1  $ocnlogpath/ocn.log*" >> $outfile
  endif

  hsi -P "ls -1  $dtfilepath/*.dt.*"
  if ($status == 0)then
    hsi -P "ls -1  $dtfilepath/*.dt.*" >> $outfile
  endif
endif


