#!/bin/csh

#define run directory
 set run_dir = /Users/hdietze/mom4p1_pubrel_18dec2009/exp/mom_sis_bling_default
 #CAREFUL (1) change to yearly output in diag_table
 #        (2) change integration time to 1 year in input.nml

#define forcing
 set forc_dir = /Users/hdietze/southern/forcing/make_wind_forcing/dat 
 set st = 1010 
 set en = 1050


 set ind = `expr $st - 1` 
while ( $ind < $en )   
 set ind = `expr $ind + 1`
 #define forcing files
  set u_forc_nam = $forc_dir/u_10_mod.clim.$ind.nc
  set v_forc_nam = $forc_dir/v_10_mod.clim.$ind.nc  
 #delete old forcing
  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 $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
