program baro_2m_read c c This program reads NOPP barometric pressure files. c It creates real time series arrays c which are evenly spaced in time. c c Also created is an integer array of quality c c You can easily adapt this program to your needs. c c Programmed by Dai McClurg, NOAA/PMEL/OCRD, August 1999 c implicit none c integer nt parameter(nt = 1000000) c integer n, m c integer nblock, nn, ntime, n1, n2 c integer idate(nt), ihms(nt), iqbaro(nt), iqstd(nt) integer idepbaro, idepstd c real baro(nt), std(nt), flag c real depbaro, depstd c character infile*80, header*132 c c ....................................................................... c write(*,*) ' Enter the input file name' read(*,'(a)') infile c open(1,file=infile,status='old',form='formatted') c c Read total number of data and number of blocks c read(1,10) ntime, nblock 10 format(63x,i7,7x,i3) c write(*,*) ntime, nblock c c Read the missing data flag c read(1,20) flag 20 format(37x,f9.2) c write(*,*) flag c c Initialize data arrays to flag and quality arrays to 5 c do n = 1, nt baro(n) = flag iqbaro(n) = 5 enddo c c Read the data c do m = 1, nblock read(1,30) n1, n2, nn read(1,50) idepbaro, idepstd depbaro = real(idepbaro) depstd = real(idepstd) read(1,'(a)') header do n = n1, n2 read(1,60) idate(n), ihms(n), baro(n), std(n), . iqbaro(n), iqstd(n) enddo enddo c 30 format(54x,i7,3x,i7,x,i7) 50 format(16x,2i8) 60 format(x,i8,x,i6,2f8.2,x,2i1) c close(1) c c Now write out the data and quality arrays to the standard output. c write(*,*) depbaro c do n = 1, ntime write(*,60) idate(n), ihms(n), baro(n), std(n), . iqbaro(n), iqstd(n) enddo c end