#!/bin/csh -f 
set echo

@ i=3 
while (${i} < 11)
 if (${i} < 10) then 
 set folder=wrfNARR3dWSM6_CONUS_UCM_BouLac.2011080${i}00
 else 
 set folder=wrfNARR3dWSM6_CONUS_UCM_BouLac.201108${i}00
 endif 
 foreach file ( `ls ${folder}/*d0*.eps` ) 
  echo $file
#  convert -trim ${file} ${file/.eps}.png  # bash
  convert -trim ${file} "${folder}/`basename $file .eps`.png" 
 rm ${file} 
 end 
@ i++
end 
