*** This pgm reads CPC daily files (eg, appended to one file) as file 11, *** and a stn list file produced from CPC's nwsli stn index file, as file 12. *** It then outputs (file 21) the data for the stns which = the stn list *** file, in order by stn-yrmody. *** character*5 lat,type,prcp character*6 lon character*6 stnsel2,stnsel,stn,stn2 character*8 date,datex,blank,datex2 character*19 name character*4 elev character*16 latlon,county character*2 state real pcptot,pcp dimension stnsel(3000) dimension name (3000) dimension type (3000) dimension elev (3000) dimension latlon (3000) dimension county (3000) dimension state (3000) blank = ' ' print*,'enter stns to select' read (12,820,end=4) (stnsel(i),name(i),county(i),state(i), + type(i),elev(i),latlon(i),i=1,3000) 820 format (A6,A19,T33,A16,T64,A2,T67,A5,T76,A4,T84,A16) ** 4 ii=i-1 i=1 open (unit=11, file=' ', + form='formatted', access='sequential', status='unknown') 2 read (11,800,end=99) lat,lon,prcp,stn,date 800 format (1X,A5,2X,A6,T17,A5,T23,A6,T37,A8) if (lat .eq. '24-hr') then datex=date else end if *** if (stn .eq. stnsel(i)) then if (datex .ne. datex2 .or. stn2 .ne. stn) + write (21,830) datex,stn,name(i),county(i),state(i),type(i), + elev(i),latlon(i),prcp datex2=datex stn2=stn 830 format (A8,2X,A6,1X,A19,2X,A16,2X,A2,2X,A5,2X,A4,2X,A16,2X,A5) go to 2 else go to 2 end if ** 99 if (i .eq. ii) then go to 999 else ** write (21,860) blank ** 860 format (A8) rewind (11) i=i+1 go to 2 end if ***** 999 close (21) close (11) stop end