#!/bin/csh
#
#  This script combines HydroBase and GMT commands to produce  theta-s and
#  theta-ox plots from a 5 deg Marsden Square...
#
#  Start out by sorting the ten-degree Marsden Square into 5-deg files:
#
unset noclobber
#
ms5sort /d1/hbase/data/7205.qc -N.qc -T
#
#  Next, compute the necessary properties:
#
propcalc 7205_2.qc -Ppr/de/te/th/sa/ox > 7205_2.prop
#
#  Now extract property pairs :
xy4gmt -Xsa -Yth -I7205_2.prop > 7205_2.ts
xy4gmt -Xox -Yth -I7205_2.prop > 7205_2.to
#
#  GMT part:
#
#
set plotfile = script2.ps
#
if (-f $plotfile) then
  rm $plotfile
endif
#
echo "creating basemap ..."
psbasemap -JX4/4 -R34/38/0/30 -Ba1f.1:Salt:/a5f1:Theta:WeSn -X1 -Y2 -K > $plotfile
#
echo "ts .."
psxy 7205_2.ts -JX -R -St.04 -L -W2/250/0/255 -K -O >> $plotfile
#
echo "basemap..."
psbasemap -JX4/4 -R0/8/0/30 -Ba1f.1:Oxygen:/a5f1:Theta:WeSn -X5 -O -K >> $plotfile
#
echo "to ..."
psxy 7205_2.to  -JX -R -St.04 -L -W2/0/0/255 -O -U"HydroBase: 7205_2" >> $plotfile
#
gs $plotfile
#
exit

