#! /bin/csh # # Job script to run "tgcmproc" on IBM system. # #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # To submit: # 1. Set env vars below (JOB,EXEC,OUTPUT,REMOTE,POSTCLEAN) # (REMOTE might be the only one you have to change) # 2. Include namelist input file (see "$input" below) # 3. Optionally change path to source and Makefile (see INCLUDEs below) # 4. Set class (queue) for loadleveler (see "# @ class" below) # (optionally set other loadleveler commands for IBM job) # 5. Use the "submit" command (/home/tgcm/bld/submit) to submit the job. # # JOB : Job name (will be used in tmpdir name, input file name, etc) # EXEC : Name of executable built by make (see Makefile). # OUTPUT: File name of stdout output file. # REMOTE: Machine:path directory where OUTPUT is to be sent via rcp. # (typically on the local workstation from which this script was submitted) # POSTCLEAN: Set to 1 to remove execution directory after job completion, # or set to 0 to save execution directory. # setenv JOB tgcmproc setenv EXEC tgcmproc_f90 #setenv REMOTE ouray.hao:/home/roble/ntwk setenv REMOTE vishnu.hao:/home/foster/ntwk setenv OUTPUT $JOB.$$ setenv POSTCLEAN 0 #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # Determine operating system (AIX is only OS for this script): # setenv HOST `uname -n` set os = `uname -s` if ($os =~ *'AIX'*) then set os = AIX else echo " " echo ">>> Unknown OS: uname -s = $os" echo "Job $JOB NOT submitted." exit endif setenv OS $os # # Set up a tmpdir and go there: # #set tmpdir = /ptmp/$user/$JOB.$$ set tmpdir = /hao/$user/$JOB.$$ if (! -e $tmpdir) then echo "Making tmpdir $tmpdir" set err = 0 mkdir -p $tmpdir || set err = 1 if ($err == 1) then echo " " echo "WARNING Error making tmpdir $tmpdir." echo "Job $JOB NOT submitted." echo " " endif else echo "NOTE: tmpdir $tmpdir already exists." endif setenv EXECDIR $tmpdir cd $EXECDIR echo "Moved to submit dir $EXECDIR" # # Init output file: # touch $OUTPUT # echo " " echo "JOB = $JOB" echo "OS = $os" echo "HOST = $HOST" echo "EXECDIR = $EXECDIR" echo "DATE = `date`" # echo " " >> $OUTPUT echo "JOB = $JOB" >> $OUTPUT echo "OS = $os" >> $OUTPUT echo "HOST = $HOST" >> $OUTPUT echo "EXECDIR = $EXECDIR" >> $OUTPUT echo "POSTCLEAN = $POSTCLEAN" >> $OUTPUT echo "DATE = `date`" >> $OUTPUT echo " " >> $OUTPUT # # Make loadleveler command file: # #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cat << 'EOF_LL' >! loadlev.job # # Loadleveler job step to build and execute: # # @ job_name = tgcmproc ## @ account_no = 28103032 # @ step_name = exec ## @ class = share # @ class = dv_reg # @ wall_clock_limit = 05:00:00 # @ environment = COPY_ALL # @ requirements = (Machine == "$(hostname)") # @ executable = $(step_name).csh # @ notification = error # @ queue # # Loadleveler job step for cleanup: # # @ step_name = cleanup # @ class = interactive # @ wall_clock_limit = 00:00:30 # @ job_type = serial # @ executable = $(step_name).csh # @ notification = complete # @ requirements = (Machine == "$(hostname)") # @ dependency = (exec == 0) || (exec != 0) # @ queue # 'EOF_LL' #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # Build make and exec script: # cat << 'EXEC_STEP' >! exec.csh #! /bin/csh # # Shell script for loadleveler execution step: # Build and execute tgcmproc. # cd $EXECDIR echo " " echo "Host = $HOST" echo "OS = $OS" echo "Current working directory = $EXECDIR" echo " " # # Get executable from mss and set permissions: # set mss_exec = /TGCM/tgcmproc/tgcmproc_aix set err = 0 msrcp mss:${mss_exec} $EXEC || set err = 1 if ($err == 0) then echo "Acquired $mss_exec from NCAR mss" else echo ">>> Error acquiring $mss_exec from NCAR mss" exit endif chmod u+x $EXEC # # Include user's input file: # set input = $JOB.inp cat << 'EOFINP' >! $input ; ; Input parameters for tgcmproc: ; &proc_input ;tmpdir = '/ptmp/roble/tiegcm1/tmpdir' ;tmpdir = '/hao/tgcm/tiegcm1nyr02/pyr2' ;-------------------------------------------------- ; New (1/04) tiegcm1 runs with fixed advec: ; ;tmpdir = '/hao/tgcm/tiegcm1_yr02/pyr2' tmpdir = '/hao/tgcm/tiegcm1_yr02/syr2' ; ;histvols = '/ROBLE/tiegcm1/pyr2001.nc','to', ; '/ROBLE/tiegcm1/pyr2037.nc','by','1' ;mtimes = 1,0,0,'to', 365,0,0,'by',1440 ; histvols = '/ROBLE/tiegcm1/syr2001.nc','to', '/ROBLE/tiegcm1/syr2377.nc','by','1' mtimes = 1,0,0,'to', 365,0,0,'by',1440 ;-------------------------------------------------- ; ;histvols = '/ROBLE/tiegcm1n/pyr2008.nc','to', ; '/ROBLE/tiegcm1n/pyr2013.nc','by','1' ;mtimes = 90,0,0,'to', 120,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1n/pyr2001.nc','to', ; '/ROBLE/tiegcm1n/pyr2037.nc','by','1' ;mtimes = 1,0,0,'to', 365,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1n/pyt2001.nc','to', ; '/ROBLE/tiegcm1n/pyt2004.nc','by','1' ;mtimes = 1,0,0,'to', 30,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1r/syr2106.nc','to', ; '/ROBLE/tiegcm1r/syr2112.nc','by','1' ;mtimes = 106,0,0,'to', 112,0,0,'by',60 ;histvols = '/ROBLE/tiegcm1r/syt2106.nc','to', ; '/ROBLE/tiegcm1r/syt2112.nc','by','1' ;mtimes = 106,0,0,'to', 112,0,0,'by',60 ;histvols = '/ROBLE/tiegcm1r/pyt0209.nc','to', ; '/ROBLE/tiegcm1r/pyt0212.nc','by','1' ;mtimes = 90,0,0,'to', 120,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1r/pyr0209.nc','to', ; '/ROBLE/tiegcm1r/pyr0212.nc','by','1' ;mtimes = 90,0,0,'to', 120,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/py93t01.nc','to', ; '/ROBLE/tiegcm1/py93t18.nc','by','1' ;mtimes = 1,0,0,'to', 180,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/py93g01.nc','to', ; '/ROBLE/tiegcm1/py93g18.nc','by','1' ;mtimes = 1,0,0,'to', 180,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/pyrb001.nc','to', ; '/ROBLE/tiegcm1/pyrb037.nc','by','1' ;mtimes = 1,0,0,'to', 365,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/pyr9905.nc','to', ; '/ROBLE/tiegcm1/pyr9913.nc','by','1' ;mtimes = 60,0,0,'to', 120,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/pyr0230.nc','to', ; '/ROBLE/tiegcm1/pyr0237.nc','by','1' ;mtimes = 1,0,0,'to', 365,0,0,'by',1440 ;histvols = '/ROBLE/tiegcm1/pyr9901.nc','to', ; '/ROBLE/tiegcm1/pyr9918.nc','by','1' ;mtimes = 1,0,0,'to', 180,0,0,'by',1440 ;------------------------------------------------------------------ ;histvols_cntr = '/ROBLE/tiegcm1n/pyt2003.nc','to', ; '/ROBLE/tiegcm1n/pyt2007.nc','by','1' ;mtimes_cntr = 30,0,0,'to', 60,0,0,'by',1440 ;histvols_cntr = '/ROBLE/tiegcm1r/syt2106.nc','to', ; '/ROBLE/tiegcm1r/syt2112.nc','by','1' ;mtimes_cntr = 106,0,0,'to', 112,0,0,'by',60 ;histvols_cntr = '/ROBLE/tiegcm1r/pyt0209.nc','to', ; '/ROBLE/tiegcm1r/pyt0212.nc','by','1' ;mtimes_cntr = 90,0,0,'to', 120,0,0,'by',1440 ;histvols_cntr = '/ROBLE/tiegcm1/py93t01.nc','to', ; '/ROBLE/tiegcm1/py93t12.nc','by','1' ;mtimes_cntr = 1,0,0,'to', 120,0,0,'by',1440 ;histvols_cntr = '/ROBLE/KIB22MT/PEQN445','to','/ROBLE/KIB22MT/PEQN455','by','1' ;mtimes_cntr = 180,0,0,'to', 220,0,0,'by',1440 ;------------------------------------------------------------------ ; maxdiskvols = 380 isearch = 0 ; ; Request fields: cfields is string array with the following valid values: ; TN UN VN O2 OX N4S NOZ CO ; CO2 H2O H2 HOX O+ CH4 AR HE ; O21D NO2 NO O3 O1 OH HO2 H ; N2D TI TE NE O2+ W Z POTEN ; UI VI WI N2 RHO UN+VN UI+VI FOF2 ; HMF2 O/O2 O/N2 N2/O O2/N2 O/O2+N2 E6300 E5577 ; EO200 EOH83 ECO215u ENO53u OHB-XX OHV-X ; ; 'NaS ','NaO ','NaO3 ','NaO2 ','NaOH ', ; 'NaCO3 ','NaHCO3 ','NaS+ ','NaN2+ ','NaCO2+ ', ; 'NaH2O+ ','NaO+ ','NaEMIS ' ; ; cfields = NO ; cfields = TN,UN,VN,O1,NO,NE cfields = TN,UN,VN,O1,NO,NE,O/O2+N2,FOF2,HMF2,O2,N4S,POTEN ; fscale = 'NO',1.E-7 ; fmnmxint = 'NO',1.,0.,5. ; fscale = 'O1',1.E-11 ; fmnmxint = 'TN',1.,0.,10., 'UN',1.,0.,10.,'O1',1.,0.,0.5, ; 'E5577',1.,0.,50. iden = 1 ; Species density conversion flag: ; iden=0 -> leave species as on history (most are mass mix ratios) ; iden=1 -> convert species to number densities (cm3) ; iden=2 -> convert species to number density mixing ratios ; iden=3 -> convert species to mass density (gm/cm3) ionvel = 1 ; ionvel = 1 -> ExB only ; ionvel = 2 -> ExB+unvn (total) ; ionvel = 3 -> ExB+unvn, with E=0 ; ionvel = 4 -> ExB+unvn, with unvnwn=0. ;------------------------------------------------------------------ ;---------------------------------------------------------------------- ; Volume Emissions (airglow) fields: ; (note: these fields are calculated only from time-gcm histories) ; (note: iden must be 1 (cm3 species) for these calculations) ; (fmnmxint and fscale will work for E-fields, but not ht-integrations) ; ; (add SR63) ie6300 = 0 ; ; The following fields are required on the history for e5577: ; if ie5577(1) > 0 -> need tn,o2,o,n2 ; if ie5577(2) > 0 -> need te,o2p,ne,o21d ; if ie5577(3) > 0 -> need tn,ht,o2,o,n2,o21d and call solred ; if ie5577(4) > 0 -> need tn,ht,o2,o,n2,o21d and call solred ; if ie5577(5) > 0 -> need tn,ht,o2,o,n2,o21d and call solred ; (if o21d is needed but is not available, it will be set to 1.e-20) ; (if te is needed but it not available, will use te = tn) ; ; (o1 recomb) (o2+ recomb) (photoe) (airglow) (o2 ly-beta) ie5577 = 1, 0, 0, 0, 0 ; ; idoppler=1 -> generate doppler t,u,v for each emissions field except ; ECO215u and ENO53u. (ipltxyut type line plots only) idoppler = 1 ; ; iyd,f107a,f107d are needed for solred calculation, i.e., if ; ie5577(3, 4, or 5) > 0, or ie6300 = 1. ; (if not provided here, will use values from history header) ;iyd = 94080 ;f107d = 67. ;f107a = 72. ; ; ieohv = plot flags for 10 oh vibrational states (ieohv(1) is ground) ; (each state plotted as separate field if iehov(i) > 0 ; for plot types ipltutvert and/or ipltxyut (ht-integrations)) ; (fmnmxint and fscale not implemented for ieohv) ; ;ieohv = 0,1,1,1,1,1,1,1,1,1 ;ieohv = 0,1,0,0,0,0,0,0,0,0 ;ieohv = 0,0,1,0,0,0,0,1,0,0 ;ieohv = 0,0,0,0,0,0,0,0,0,0 ; ; ibohv = plot flags for oh-v bands (9-8 to 9-3, 8-7 to 8-3, etc) ; (these will be in kilo-Rayleighs). The following are valid bands ; (ibohv = 2-digit number giving high and low range, e.g. 98 for 9-8) ; ; 1-0 2-1 3-2 4-3 5-4 6-5 7-6 8-7 9-8 ; 2-0 3-1 4-2 5-3 6-4 7-5 8-6 9-7 ; 3-0 4-1 5-2 6-3 7-4 8-5 9-6 ; 4-0 5-1 6-2 7-3 8-4 9-5 ; 5-0 6-1 7-2 8-3 9-4 ; 6-0 7-1 8-2 9-3 ; ibohv = 62 ; icolor = 1 outplt = 'cgm','ps' ;outplt = 'cgm' ;outplt = 'ps' multiplt = 0 ipltrowcol = 2,2 multiadvfr = 1 iwr_label = 1,1,1,1,0,0 ;------------------------------------------------------------------ ipltmaps = 0 ; plot flag for maps map_global = 1 ; CE projections (cyl equidistant) map_global_cenlon = 0 ; center x-axis longitude for CE ; map_global_censlt = 12 ; center x-axis local time for CE map_polar = 0 ; ST projections (polar stereographic) fmap_polar_perimlat = -45.,45. map_satview = 0 ; SV projections (sat view) fmap_satview_latlon = -60.,-90. ; fmap_satview_latslt = -55.,12. fmap_satview_eradii = 10.0 map_mollweide = 0 ; MO projections (mollweide) fmap_mollweide_latlon = 65.,0. ; fmap_mollweide_latslt = -55.,12. map_continents = 0 ; continental outlines map_tn_unvn = 1 ; 1 int: add unvn to tn map_ht_unvn = 1 ; 1 int: add unvn to ht (z) map_ep_uivi = 1 ; 1 int: add uivi to epot map_log10 = 0 ; log10 of densities fmap_zpht = 60.,80.,95.,100.,110. ;------------------------------------------------------------------ ipltxyut = 0 xyut_locname ='Bear Lake', 'Haute Provence', 'Stockholm', 'Fritz Peak','Mt.Johns' xyut_locs = 41.9,-111.4, 41.0, 6.0, 60.0, 20.0, 40.5,-105.5, -44.0,170.4 ixyut_log10 = 0 xyut_zpht = 95. ;------------------------------------------------------------------ ipltutlat = 1 iutlat_log10=0 ; log10 flag ; utlat_zphtlon =90.,'zm',100.,'zm',110.,'zm',120.,'zm', ; 200.,'zm',300.,'zm' ; utlat_zphtlon = 35.,'zm',50.,'zm',60.,'zm',70.,'zm',80.,'zm', ; 90.,'zm',100.,'zm',120.,'zm',300.,'zm' ; utlat_zphtlon = -17.,'zm',-15.,'zm',-13.,'zm',-10.,'zm',-9.,'zm', ; -7.,'zm',-4.,'zm' ; utlat_zphtlon = -7.,'zm',-4.,'zm',-1.,'zm',+2.,'zm',+5.,'zm' ; utlat_zphtlon = 100.,-150., 120.,-150., 140.,-150., 180.,-150., ; 400.,-150. ; utlat_zphtlon = 110.,-150., 120.,-150, 150.,-150.,200.,-150., ; 300.,-150.,450.,-150. utlat_zphtlon = 110.,'zm', 120.,'zm', 150.,'zm' ,200.,'zm' 300.,'zm',500.,'zm' utlat_zphtlon = -7.,'zm', -4.,'zm', -1.,'zm' ,+2.,'zm', ; +5.,'zm' ; utlat_zphtlon = 100.,-70., 120.,-70., 150.,-70., 200.,-70., ; 400.,-70. ; utlat_zphtlon = 120.,LT15.. ;sendcgm = 'ouray.hao:/e/roble/tiegcmyr02/stack.2002r.zm.d1-365' ;sendps = 'ouray.hao:/e/roble/tiegcmyr02/stack.2002r.zm.d1-365ps' ;sendcgm = 'vishnu.hao:/e/foster/tiegcm1/stack.2002r.zm.d1-365.cgm' ;sendps = 'vishnu.hao:/e/foster/tiegcm1/stack.2002r.zm.d1-365.ps' ; sendcgm = 'vishnu.hao:/e/foster/tiegcm1/pyr2.stack.zm.d1-365.cgm' sendps = 'vishnu.hao:/e/foster/tiegcm1/pyr2.stack.zm.d1-365.ps' &end 'EOFINP' # # Execute: # set err = 0 timex $EXEC < $JOB.inp >>& $OUTPUT || set err = 1 if ($err == 0) then echo "Completed execution of $EXEC." >> $OUTPUT else echo ">>> Error executing $EXEC." >> $OUTPUT endif 'EXEC_STEP' chmod u+x exec.csh #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # Build cleanup script: # cat << 'EOF_CLEANUP' >! cleanup.csh #! /bin/csh # # Remote copy output and remove submitdir. # echo " " >> $OUTPUT echo "Execution directory submitdir = $EXECDIR" >> $OUTPUT ls -l $OUTPUT >> $OUTPUT echo "Preparing to rcp output $OUTPUT from submitdir to remote $REMOTE" >> $OUTPUT if ($POSTCLEAN == 1) then echo "NOTE: submitdir and its contents will be removed after the rcp" endif # set err = 0 rcp $OUTPUT $REMOTE >>& $OUTPUT || set err = 1 #/usr/bsd/rcp $OUTPUT $REMOTE || set err = 1 if ($err != 0) then echo " " >> $OUTPUT echo ">>> WARNING: error from rcp of output $OUTPUT to $REMOTE" >> $OUTPUT echo " Will save $OUTPUT to /home/$user" cp $OUTPUT /home/$user || \ echo ">>> WARNING: error copying $OUTPUT to /home/$user" endif # # Clean submit directory: # if ($POSTCLEAN == 1) then cd rm -r $EXECDIR endif exit 'EOF_CLEANUP' chmod u+x cleanup.csh #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # Submit the job: # llsubmit loadlev.job