#!/bin/csh

#define run directory
 set run_dir = /Users/hdietze/mom4p1_pubrel_18dec2009/exp/mom_sis_bling_defaultironandwind

#define forcing
 set iron_forc_dir = /Users/hdietze/southern/forcing/make_iron_forcing/dat 
 set wind_forc_dir = /Users/hdietze/southern/forcing/make_wind_forcing/dat
 set st = 1001
 set en = 1050


 set ind = `expr $st - 1` 
while ( $ind < $en )   
 set ind = `expr $ind + 1`
 #define forcing files
  set i_forc_nam = $iron_forc_dir/Soluble_Fe_Flux_PI.$ind.nc
  set u_forc_nam = $wind_forc_dir/u_10_mod.clim.$ind.nc
  set v_forc_nam = $wind_forc_dir/v_10_mod.clim.$ind.nc
 #delete old forcing
  rm -f $run_dir/INPUT/Soluble_Fe_Flux_PI.nc
  rm -f $run_dir/INPUT/u_10_mod.clim.nc
  rm -f $run_dir/INPUT/v_10_mod.clim.nc

 #link new forcing
  ln -s $i_forc_nam $run_dir/INPUT/Soluble_Fe_Flux_PI.nc
  ln -s $u_forc_nam $run_dir/INPUT/u_10_mod.clim.nc
  ln -s $v_forc_nam $run_dir/INPUT/v_10_mod.clim.nc

  cd $run_dir
  ./run.sh
  echo went through $ind
end
