#!/bin/sh COMOUT=/com/firewx/prod/input_sdm ###COMOUT=/com/firewx/test/input_sdm EXECfirewx=/nwprod/exec ################################################################ # Get User Input ################################################################ clear echo "-----------------------------------------" echo "| Eta Hires 8km grid Firewx Script |" echo "-----------------------------------------" echo echo echo "-------------------------------------" echo "This script input must be entered before " echo "the start time of the coresponding eta run that you want" echo " " echo "-------------------------------------" echo echo echo echo "There is a chance that Boise will request 4 firewx model runs" echo "with the same lat and long during its daily 17z conference" echo "call with the SDM. To help save time this script will allow" echo "the SDM to initialize all 4 runs at the same time IF the" echo "the lat and long are the same for all 4 runs. If there" echo "are more than 1 lat/long requested over the next 4 cycles" echo "then this script will not work. The sdm will have to run" echo "the setup_firewx script and initialize each firewx run" echo "seperatley. " echo "Also this script will initialize 4 cycle runs given that " echo " the first run starts at 18z on the current day and 00z, 06z, and " echo "12z of the following day." echo echo echo echo echo echo echo echo echo "ENTER YEAR MONTH and DAY for today's 18z run (format = YYYYMMDD):" read yyyymmdd18 echo "ENTER YEAR MONTH and DAY for tomorrows 00z,06,and 12z runs (format = YYYYMMDD):" read yyyymmddmorrow echo "ENTER SOURCE LATITUDE (0 TO 90.0 (Whole degrees) ):" read latitude echo "ENTER SOURCE LONGITUDE (0 TO 180.0 (whole degrees) ):" ###echo "ENTER SOURCE LONGITUDE (-180.0 TO 180.0, - is west!!!):" read longitude ### #Verify the information before submitting ### main_menu_flag=1 while [ $main_menu_flag -ne 0 ] do clear echo echo "PLEASE VERIFY/EDIT THE FOLLOWING INFORMATION" echo echo " 1) CURRENT YEAR MONTH and DAY for 18z run (format = YYYYMMDD) : $yyyymmdd18" echo " 2) Tomorrow's YEAR MONTH and DAY for 00z, 06, and 12z runs (format = YYYYMMDD) : $yyyymmddmorrow" echo " 3) SOURCE LATITUDE : $latitude" echo " 4) SOURCE LONGITUDE : $longitude" echo echo "ENTER NUMBER TO EDIT OR (Y) TO ACCEPT VALUES:" echo "To quit with no changes enter (Q): " read ans case $ans in 1) clear echo "ENTER Today's YEAR MONTH and DAY for the 18z run (format = YYYYMMDD):" read yyyymmdd18 ;; 2) clear echo "ENTER Tomorrow's YEAR MONTH and DAY (format = YYYYMMDD):" read yyyymmddmorrow ;; 3) clear echo "ENTER SOURCE LATITUDE (0 TO 90.0):" read latitude ;; 4) clear echo "ENTER SOURCE LONGITUDE (0 TO 180.0):" read longitude ;; Y) main_menu_flag=0;; y) main_menu_flag=0;; q) exit;; Q) exit;; *) ;; esac done ### #run program that Matches the input lat and long #to the correct 8km grid (nest) to run the firewx eta on ### echo "running program to select grid (nest) corresponding to the" echo "lat on long that have been input" firewx_nest=`${EXECfirewx}/firewx_find_grid <$COMOUT/$cyc/firewx_nest echo "$yyyymmdd18" >$COMOUT/$cyc/run_date echo "$latitude" >$COMOUT/$cyc/entered_lat echo "$longitude" >$COMOUT/$cyc/entered_long echo "############################" ###error check for cyc in 00 06 12 ;do mkdir -p $COMOUT/$cyc/ echo "You have chosen to run the 8km eta for firewx nest $firewx_nest" echo "for the ${cyc}z cycle of $yyyymmddmorrow" echo echo "$firewx_nest" >$COMOUT/$cyc/firewx_nest echo "$yyyymmddmorrow" >$COMOUT/$cyc/run_date echo "$latitude" >$COMOUT/$cyc/entered_lat echo "$longitude" >$COMOUT/$cyc/entered_long echo "############################" done ###check sms node echo "Setup Complete -" echo "Verify your input via the message printed " echo "on the eta_postbc_firewx sms node" echo "(it will be printed once the job is run)" echo "############################" echo