# # QSUB -s /bin/csh # QSUB -lQ 95000000 # SSD requirements in bytes # QSUB -lT 600 # time limit in seconds # QSUB -q prem # queue to be used, prem, reg, econ, sb, sds_test, lm # QSUB -lM 4.0Mw # space used in megawords # QSUB -nr # # Steps to submit this script and make a model run: # # 1) Set QSUB commands above # 2) Set shell vars job, model, mssdir, rmeta, tmpdir as described below # (typically you will need to change only job, rmeta, and maybe tmpdir) # 3) Set INCLUDE statements for mod files as described below # 4) Set lexical read inputs below # 5) To submit via MIGS, use the command "modjob file", where "file" is # the name of this script (there is a modjob script in ~foster/bin) # (modjob inserts the INCLUDE file(s) given below and submits to shavano) # # job = Arbitrary name for this job (e.g., timesgcm.eq) for output, etc. # (might be same as the name of this file) # model = Model version (e.g., tgcm19) # mssdir= Mss directory in which to find model plib ($mssdir.pl) and the # model object ($mssdir.o). (e.g., /FOSTER/$model) # rmeta = Machine:path for rcp of gmeta (may be commented out for no rcp) # (e.g., vishnu.hao:/d/foster/$job.cgm) # tmpdir= Temporary directory on cray in which to save and link files # (e.g., /usr/tmp/TIGCM) # ja cd $TMPDIR set model = tgcm19 set job = ${model}test set mssdir = /FOSTER/$model set rmeta = vishnu.hao:/d/foster/$model/$job.cgm set tmpdir = /usr/tmp/TIGCM batchname $job.$$.out # # The mods file specified after each INCLUDE below should exist in the # local (unix) directory from which this script is submitted. # INCLUDE statements are optional (i.e., no mods). # INCLUDE statments must start in column one. # Shell variable references are not allowed in INCLUDE file names. # There must be no blank lines between the cat statement and the 'EOF' line. # The modjob script will replace each INCLUDE statement with the # given file. (If files may have zero-length, the INCLUDE line is deleted) # cat << 'EOF' >! $job.mods INCLUDE tgcm19.mods 'EOF' # # Get program library: # set plib = $model.pl if (! -e $plib) then if (! -e $tmpdir/$plib) then echo Reading mss $mssdir/$plib to disk file $plib ... msread $plib $mssdir/$plib echo Linking disk file $plib to $tmpdir ... ln $plib $tmpdir else ln $tmpdir/$plib . echo Linked existing file $tmpdir/$plib to cwd endif else echo Using existing disk file $plib endif # # Get model object: # set obj = $model.o if (! -e $obj) then if (! -e $tmpdir/$obj) then echo Reading mss $mssdir/$obj to disk file $obj ... msread $obj $mssdir/$obj echo Linking disk file $obj to $tmpdir ... ln $obj $tmpdir else ln $tmpdir/$obj . echo Linked existing file $tmpdir/$obj to cwd endif else echo Using existing disk file $obj endif # # Run update using $job.mods: # echo Running nupdate ... nupdate -p $plib -i $job.mods -c $job -o "ns um" || goto fail_upd setenv FILENV assign # if (-e $job.f && ! -z $job.f) then echo Compiling mods... cft77 -m 4 -e zi -a static -i 64 $job.f || goto fail_cft set modobj = $job.o else set modobj = " " endif echo Running segldr ... #set segdir = ${HOME}/segdir # segldr directives file set segdir = ${HOME}/segdir.model # segldr directives file segldr -f indef -o $job.x -i $segdir $modobj $obj || goto fail_ldr # # Clean out any temporary files from previous run and execute: # if (-e HISTCPY) rm HISTCPY if (-e HISTCPY) rm SECHIST if (-e SOURCE) rm SOURCE if (-e fort.8) rm fort.8 if (-e fort.9) rm fort.9 if (-e fort.15) rm fort.15 $job.x << 'EOF' || goto fail_exec C C*********************************************************************** C Inputs for timesgcm: C*********************************************************************** LABEL='TIMES DEVELOPMENT MODEL 01/01/92 ' C C EQUINOX STARTING CONDITIONS***************************** C DATE=1992,91,91 DATA='FOSTER','TIMEDATV','EQSM01Z' SOURCE='ROBLE','RGR93','TSEQBS2',2,0,0 OUTPUT='FOSTER','TIMESGCM','TEST' COUTPUT='ROBLE','RGR93','TSEQBD2','ROBLE','RGR93','TSEQBD3', C'ROBLE','RGR93','TSEQBD4','ROBLE','RGR93','TSEQBD5', C'ROBLE','RGR93','TSEQBD6','ROBLE','RGR93','TSEQBD7' START=2,0,0 STOP=2,1,0 HIST=0,0,30 SAVE=0,0,30 C C Secondary histories (comment all SECxxxx out if sec hist not needed): C (these histories contain a max of 29 fields at the current time step) C C SECOUT = mss secondary history output volumes C SECHIST = disk write frequency of secondary histories (day:hr:min) C SECSAVE = mss write frequency of secondary history files (day:hr:min) C SECSTART,STOP = start,stop times for writing secondary histories C (day:hr:min) C CSECOUT = 'FOSTER','TIMESGCM','SECTEST' CSECHIST = 0,0,30 CSECSAVE = 0,0,30 CSECSTART = 91,0,0 CSECSTOP = 91,1,0 C C SECFLDS = set each field to be saved on secondary histories to 1 C (The number of selected fields will influence number of histories C that will fill a volume, however 4 volumes (SECOUT) will always C be enough for 24 secondary histories) C C tn un vn o2 ox n4s noz co co2 h2o h2 hox o+ ch4 o21d CSECFLDS = 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, C no2 no o3 o1 oh ho2 h n2d ti te ne o2+ w z C 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1 C C C MARCH TIDES FORBES(NEW) TIDE=0.,0.,0.,0.,0.,0.,0.,0.,0.,0. TIDE2=16.E+2,11.5 CTIDE2=0.0,0.0 C STEP MUST BE AN INTEGER STEP=360 MAG=-74.5,127.,79.,-70. DIFHOR=1 IUIVI=1 AURORA=1 DISPOSE=0 COLFAC=1.5 ENDOFREAD CF107 = 67. CF107A =72. CAMIVOL='EMERY','PVIEN','S86BG2' OLDALF=0 C H POWER = 2 3 5 7 11 16 23 33 48 82 : 115 155 255 C CTPOTEN = 20 30 40 50 60 70 80 90 100 115 : 130 150 200 CPOWER=3. CCTPOTEN=30. ALFA30=15. E30=1.E-20 ED2=1.E-20 ALFAD2=10. BYIMF = 0. ENDOFREAD 'EOF' # debug -B -s $job.x if ($?rmeta) then rcp gmeta $rmeta endif ja -cslst exit # # Error traps: # fail_upd: echo ' ' echo \>\>\> Nupdate of program lib from mods failed \<\<\< echo ' ' ja -cslst exit # fail_cft: echo ' ' echo \>\>\> Compile of modified code failed \<\<\< echo ' ' ja -cslst exit # fail_ldr: echo ' ' echo \>\>\> Segldr of modified object failed \<\<\< echo ' ' ja -cslst exit # fail_exec: echo ' ' echo \>\>\> Execution of modified model failed \<\<\< echo ' ' debug -B -s $job.x if ($?rmeta) then rcp gmeta $rmeta endif ja -cslst exit