program check c c reads through a list of gloup format files in list.txt, checks the c start and end times, and writes the notes to unit 22. c implicit none integer infiles,inmax,i,j,k,istat parameter(infiles=279,inmax=200 000) integer inump,inbest,isy,isd,iey,ied,indata,infirst,incol,num integer if1,iy1,id1 real*4 rlat,rlon,rdep,rsh,reh,rsampl,rtemp real*4 data(5),rh1 character*61 chorigin character*74 chnote,chname character*76 chdescrip(5),chtemp character*69 chdold(7) character*13 chfnam c integer iy2,id2 real*4 rh2 c open(42,'list.txt', + form='formatted',access='sequential', + status='unknown',iostat=istat) if(istat.ne.0)then print*,'problem opening list.txt' stop endif open(22,'note.lis', + form='formatted',access='sequential', + status='unknown',iostat=istat) if(istat.ne.0)then print*,'problem opening note.lis' stop endif c do i=1,infiles read(42,'(a13)')chfnam open(20,'/data/paxescratch1/gloup/hfdata/'//chfnam, + form='formatted',access='sequential', + status='unknown',iostat=istat) if(istat.ne.0)then print*,'problem opening '//chfnam stop else print*,chfnam,' ok' endif call rheadsub(inump,inbest,infirst,rlat,rlon,rdep, + isy,isd,rsh,iey,ied,reh,rsampl,indata, + chorigin,chnote,chname,chdescrip) read(20,'(i6,i2,i5,i4,f7.3,5f8.2)'),num,if1, + iy1,id1,rh1,(data(k),k=1,5) do j=2,indata read(20,'(i6,i2,i5,i4,f7.3,5f8.2)'),num,if1, + iy2,id2,rh2,(data(k),k=1,5) enddo close(20) if(iy1.ne.isy.or.id1.ne.isd.or.rh1.ne.rsh)then print*,i,chfnam,'start date wrong' print*,'header:',isy,isd,rsh print*,' data:',iy1,id1,rh1 endif if(iy2.ne.iey.or.id2.ne.ied.or.rh2.ne.reh)then print*,i,chfnam,'end date wrong' print*,'header:',iey,ied,reh print*,' data:',iy2,id2,rh2 endif write(22,'(a74)')chnote enddo close(42) close(22) end c include "rheadsub.f"