#!/bin/ksh

#------------------------------------------------------------------
# smoke_regional.sh
# Creation of regional graphics from the HYSPLIT Smoke Forecast
#------------------------------------------------------------------
# Last Revised: 29 Mar 2007 (RRD) - parallel version        
#               29 May 2009 (RRD/GSM) - Hawaii
#------------------------------------------------------------------

set -x

echo "Starting regional graphics: ${DATA}"

  concbin="binhi_pbl.1hr"

# create icon map for the simulation region

  cp ${FIXsmoke}/smokehi_labels.cfg LABELS.CFG
  rm -f concplot.ps

  export pgm=hysplit_concplot

  ${EXECsmoke}/hysplit_concplot -i${DATA}/${concbin} -c4      \                        -l32 -x1.0E+09 -m3 -h64.0:-150.0 -g0:1100 -s1 -n25:25   \                       -j${FIXhysplt}/hysplit_arlmap -v100.0+20.0+5.0+1.0      >> $pgmout 2>errfile

  rm -f LABELS.CFG

  if [ -f concplot.ps ];then
#    crop white space - this is not required, but looks better in browser
#     $CONV/convert -crop 0x0 -density 84 concplot.ps iconHI84.gif
     convert -crop 0x0 -density 84 concplot.ps iconHI84.gif
     rm -f concplot.ps
  fi

  echo "Finished Hawaii Postscript graphics: `date`"
exit


exit
