c Reads one of the active grid data files. c Measurements were performed at a sampling rate of 40kHz c nxm: measurement location, 20,30,40,50 c nh: filter scale, nh=1 for 5mm, nh=2 for 10mm, c nh=3 for 20mm, nh=4 for 40mm c nfile: file number from 1 to 30 c ndim=1: streamwise velocity c ndim=2: cross-stream velocity c nprobe=1: probe #1 c nprobe=2: probe #2 c nprobe=3: probe #3 c nprobe=4: probe #4 c ndata: time series from 1 to 1200000 c realu: velocity data [m/s] c First four columns: streamwise velocities from probe #1 to probe #4 c Next four columns: cross-stream velocities from probe #1 to probe #4 c After reading, to save space we recommend you store the data into c binary format of your choosing. implicit none integer, parameter :: ndim=2,nprobe=4,ndata=1200000 integer, parameter :: nxm=20,nh=1,nfile=1 real, dimension(ndim,nprobe,ndata) :: realu integer, dimension(0:9) :: NASCII character(len=2) :: dir character(len=15) :: fname character(len=1) :: c1,c2,c3,c4,c5 integer :: k,k1,k2,k4,k5 NASCII(0)=ICHAR('0') NASCII(1)=ICHAR('1') NASCII(2)=ICHAR('2') NASCII(3)=ICHAR('3') NASCII(4)=ICHAR('4') NASCII(5)=ICHAR('5') NASCII(6)=ICHAR('6') NASCII(7)=ICHAR('7') NASCII(8)=ICHAR('8') NASCII(9)=ICHAR('9') dir='./' k1=nxm/10 k2=nxm-k1*10 k4=nfile/10 k5=nfile-k4*10 c1=char(NASCII(k1)) c2=char(NASCII(k2)) c3=char(NASCII(nh)) c4=char(NASCII(k4)) c5=char(NASCII(k5)) fname=dir//'m'//c1//c2//'h'//c3//'-'//c4//c5//'.dat' open(6,file=fname) do k=1,ndata read(6,611) realu(1,1,k),realu(1,2,k),realu(1,3,k), & realu(1,4,k),realu(2,1,k),realu(2,2,k), & realu(2,3,k),realu(2,4,k) 611 format(4(f9.6,1x),4(f11.7,1x)) enddo close(6) stop end