c *** fortran retrieval code to read and print any of the HCN/D c *** data files (files 10-14 on the magnetic tape) c integer year,mon,days,value(31) character*1 sf(31),dmf(31),dqf(31) character*2 stcode character*4 dattyp character*6 staid c nrec=0 c 1 continue read(5,100,end=99) staid,dattyp,year,mon,days, + (sf(i),value(i),dmf(i),dqf(i),i=1,31) 100 format(1x,a6,1x,a4,1x,i4,i2,1x,i2,31(1x,a1,i4,2a1)) c c *** strip off state code from station id stcode=staid(1:2) c c *** print a header at the top of each output page c if(mod(nrec,19).eq.0) write(6,201) 201 format('1',' STAID TYPE YR/MO 1/14/27|2/15/28|3/16/29|', + '4/17/30|5/18/31| 6/19 | 7/20 | 8/21 | 9/22 |', + ' 10/23 | 11/24 | 12/25 | 13/26',/, + 23x,12('S MQ|'),'S MQ',/,23x,12(' |')) c write(6,200) staid,dattyp,year,mon,days, + (sf(i),value(i),dmf(i),dqf(i),i=1,31) 200 format(1x,a6,1x,a4,1x,i4,i2,1x,i2,13(1x,a1,i4,2a1),/, + 22x,13(1x,a1,i4,2a1),/,22x,5(1x,a1,i4,2a1)) c nrec=nrec+1 c go to 1 99 continue stop end