#
# Script to automate (global) Objective Analysis.

unset noclobber

set datestr = `date`

#--------------------------
#--- Objective Analysis ---
#--------------------------

echo "Starting time:"
echo " "
date
echo " "

cp /home/projects2/AOSN2/OAG/2003/Apr14/PJH05/oa_gdem_aug.nc .

matlab<<EIEIO
path('/home/afmisops/Matlab/Stabilize',path);
dden = 0.001;
oafile = 'oa_gdem_aug.nc';
gfile = '/home/projects2/AOSN2/Grids/Big9km2/grids_AOSN2_big_nois.nc';
status = stab_oa (oafile,gfile,dden);
clear
exit
EIEIO

echo " "
echo "Ending time:"
echo " "
date
echo " "

#------------------------------------------------
#--- Recompute Dynamic Height from 2D fields. ---
#------------------------------------------------

matlab<<EIEIO
coast_den_local

clear
exit
EIEIO

#---------------------
#--- Plot Results. ---
#---------------------

PlotJob > PlotJob.log

#----------------------------
#--- Create mean profile. ---
#----------------------------

matlab<<EIEIO
make_tsmean

orient tall
print -dps tsmean.ps
delete(1)
clear
exit
EIEIO

#----------------------------------------
#--- Ensure group writing privileges. ---
#----------------------------------------

chmod g+w *

#----------------------------
#--- Announce Completion. ---
#----------------------------

Mail haley <<EIEIO

JOB DONE


The first California Current stabilization job submitted to
`hostname` on $datestr is now complete.
Please examine the gmeta files in the directory

   $cwd

Thanks

Pat
EIEIO
