#! /bin/csh # # usage: xitgc runname # to do an ITG run with runname.in as the input name. # # setenv NCPUS 2 if ( ! -e $1.in) then echo $1.in "input file for ITG doesn't exist" exit(1) endif # move files from an aborted previous run (warning, this will # save that run, but overwrites any previous *_old files): if (-e $1.nc) mv $1.nc $1.nc_old if (-e $1.out) mv $1.out $1.out_old if (-e $1.gin) mv $1.geo $1.gin_old if (-e $1.geo) mv $1.geo $1.geo_old if (-e $1.geo2) mv $1.geo2 $1.geo2_old if (-e $1.fields) mv $1.fields $1.fields_old if (-e $1.dmix) mv $1.dmix $1.dmix_old if (-e $1.ja) mv $1.ja $1.ja_old # # Keep geometry information for this run handy if (-e eik.in) cp eik.in $1.gin if (-e eik.out) cp eik.out $1.geo if (-e eik2.out) cp eik2.out $1.geo2 # echo 'Executing itgc' ja hpm gfbin/itgc $1 ja -st > $1.ja echo 'itgc complete' /bin/rm $1.ins # # exit here if you want to skip the post-processor for now. # exit if (-e $1.post) mv $1.post $1.post_old if (-e $1.freq) mv $1.freq $1.freq_old if (-e $1.mov) mv $1.mov $1.mov_old if (-e $1.m) mv $1.m $1.m_old # echo 'Executing postc' gfbin/postc $1 /bin/rm $1.pins echo 'postc complete' #echo 'compressing output file...' #gzip $1.res