#!/bin/sh # UDRESPATH=/weather/ldm/unidata/etc/Wxp.res PATH=/usr/local/bin:/bin:/usr/bin:/weather/ldm/unidata/bin LD_LIBRARY_PATH=/usr/lib:/usr/ucblib:/usr/openwin/lib TDATE=`date +%j%H%M%S` TFILE=img$TDATE.gif TFFILE=/home/system/gopher/htdocs/images/$TFILE export UDRESPATH PATH LD_LIBRARY_PATH # **** **** **** **** CONFIGURABLE VARIABLES **** **** **** **** WEATHER=/weather/ldm/unidata/bin/uacalplt # **** **** **** **** NO CONFIGURATION NEEDED BELOW **** **** **** **** # #.. Ensure that program is available on this machine # if [ -x $WEATHER ]; then # #.. Check that a query has been made # if [ $QUERY_STRING ]; then # #.. Strip the variables out from the query string, # and assign them into the environment, prefixed by 'QS_' # # o sed removes any ' that would upset quoted assignment # # o awk ensures that # - all variables passed have legal names # - special characters are not interpreted by sh # eval `echo $PREFIX$QUERY_STRING | sed -e 's/'"'"'/%27/g' | \ awk 'BEGIN{RS="&";FS="="} $1~/^[a-zA-Z][a-zA-Z0-9_]*$/ { printf "QS_%s=%c%s%c\n",$1,39,$2,39}' ` # #.. Set the search type # case $QS_graph in Skewt) OPT_type='skewt' ;; Stuve) OPT_type='stuve' ;; Hodograph) OPT_type='hodo' ;; *) OPT_type='skewt' ;; esac # #.. Output header # cat << EOM Content-type: text/html
EOM $WEATHER -identifier $QS_station -plot_type $OPT_type $QS_file \ -plot_param gif:$TFFILE \ -data_path /weather/ldm/data/surface/sao \ -con_path /weather/ldm/data/decoded \ -file_path /weather/ldm/unidata/etc \ -device d,vortex\:1 -icon -batch echo '' if [ -r $TFFILE ]; then echo '