#!/bin/csh

set workdir = /data/bluesky/output_archive/hysplit-pp/PNWtest-4km

cd $workdir

foreach ymdh ( 2117090100 2117090200 2117090300 2117090400 2117090500 \
               2117090600 2117090700 2117090800 2117090900 2117091000 \
               2117091100 2117091200 2117091300 2117091400 2117091500 \
               2117091600 2117091700 )

  echo ============ YMDH: $ymdh      date: `date`

  foreach type ( carryover forecast combined )

    echo "                   $type"

    rm -Rf $ymdh/$type/images
    rm -Rf $ymdh/$type/graphics

    /usr/local/bin/makedispersionkml \
      -o $workdir/$ymdh/$type \
      -O DispersionImages.REPROJECT_IMAGES=True \
      -l $workdir/$ymdh/$type/data/fire_locations.csv \
      -e $workdir/$ymdh/$type/data/fire_events.csv \
      -i $workdir/$ymdh/$type/data/smoke_dispersion.nc > /dev/null

    mv $workdir/$ymdh/$type/graphics $workdir/$ymdh/$type/images

  end

end
