#!/bin/tcsh
#
# Make seasonal climatology runs of tiegcm (equinox, solstice, solar min,max)
#
# $home:      Base working directory
# $modelroot: Model root directory (with src, scripts, etc)
# $tgcmrun:   Path to tgcmrun executable (python)
#
 set home      = /glade/p/hao/tgcm/tiegcm2.0/benchmarks
 set modelroot = /glade/p/hao/tgcm/tiegcm2.0/tiegcm2.0
 set tgcmdata  = /glade/p/hao/tgcm/data/tiegcm2.0
 set tgcmrun   = $modelroot/tgcmrun/tgcmrun
 set queue     = regular # for LSF jobs
 set submit    = yes     # if yes, execute or submit, as appropriate

 set resolutions = ( \
   '5.0' \
   '2.5' \
 )

 set runs = ( \
   decsol_smax \
   decsol_smin \
   junsol_smax \
   junsol_smin \
   mareqx_smax \
   mareqx_smin \
   sepeqx_smax \
   sepeqx_smin \
 )

foreach res ($resolutions)

  set case   = tiegcm_res${res}_seasons
  set work   = $home/$case
 
  foreach run ($runs)
    echo "------------------ $run --------------------"
    set stdout  = $work/tiegcm_res${res}_$run/stdout
    set histdir = $work/tiegcm_res${res}_$run/hist
    set execdir = $work/tiegcm_res${res}_$run/exec
   
   $tgcmrun -q $queue -run_name $run -model_name tiegcm -model_res $res \
     -model_root $modelroot -stdout_dir $stdout -execdir $execdir \
     -hist_dir $histdir -submit $submit -tgcmdata $tgcmdata
  end # foreach run

end # foreach res
