#!/bin/sh
# usage:  arg1 = UTC time, either 00 or 12, filled in by crontab normally
# arg2 --> if exists, don't download any files and just do the calculation
TODAY=$(date +%Y%m%d)
TODAYTXT=$(date +%Y-%m-%d)

cd /home/obs/www/MGIO
./hiresProc.sh $1 $2 > /dev/null 2>&1
./parse.pl hgt.txt pwat.txt clouds.txt > /dev/null 2>&1
./currPlot.py ${TODAY}.csv ${TODAY}.cloud.csv "Forecast hour from ${TODAYTXT} at ${1}Z"  > /dev/null 2>&1
mv -f *.csv forecasts
rm -f *.grib2
