*This program changes daily NOAA weather data into a ALMANAC weather dataset,
*after running the NOAA *dataset thru EXCEL to get rid of the commas 
*and change T to the appropriate values.
*program is called experiment2006\weather.sas, written by Deborah Spanel;
DATA ONE;
INFILE 'C:\ALNCNEW\neosho.prn' MISSOVER;
NEXT: INPUT  STATION V1 YR MO DAY  MAX MIN   RAIN  snow  ;
IF MAX GT 900. THEN GO TO OK;
IF MAX EQ ' ' THEN GO TO NEXT;
MAX=(MAX+40.)*5./9.-40;
OK:if MAX gt 900.then  max = 999.;
IF MIN GT 900. THEN GO TO OK2;
MIN=(MIN+40.)*5./9.-40;
OK2:if min gt 900. then min = 999.;
IF RAIN GT 900. THEN GO TO OK3;
RAIN= RAIN*25.4;
IF SNOW =' ' OR SNOW GT 900. THEN SNOW = 0.0;
SNOW = SNOW*25.4/10;
RAIN2 =RAIN+SNOW;
OK3:if rain gt 900. then rain2 = 999.;
FILE 'C:\ALNCNEW\neosho.wth';
PUT YR 1-4 MO 6-7 DAY 9-10  MAX 21-26 .1  MIN 27-32 .1  RAIN2 33-38 .2 STATION 51-56;
RUN;