program pub_cstar_read c c Example program to read public C-STAR data into arrays. Data file c must exist in same directory as the program executable. Just a reader c program that prints out the time and GPS altitude to the screen. c c Date and Time are in UTC. Longitudes are negative-west convention. c TB's and noise are in Kelvin. All other applicable units are metric. c c TB arrays are 4-channel X 26 sample in the order: 37V, 37H, 37(+45deg), 37(-45deg). c F:Forward-scan, A:Aft-scan, at +/- 45 degrees c c F. LaFontaine Jan 2002 Release Alpha, SGI/UNIX Fortran-77. c Please report bugs or errors. c logical done integer i, j, k, NR parameter (NR=4000) integer nrec(NR), nmon(NR), nday(NR), nyr(NR), > nhr(NR), nmin(NR), nsec(NR) real gps_lat(NR), gps_lon(NR), gps_alt(NR), heading(NR), > pitch(NR), roll(NR), g_spd(NR), a_spd(NR), noise(4,NR), > tb37_fore(4,26,NR), slat_F(26,NR), slon_F(26,NR), > tb37_aft(4,26,NR), slat_A(26,NR), slon_A(26,NR) open (77, file='GHRC_cstar_flight10_2001262_tbs.txt', > form='formatted') print* print*,' --- Reading GHRC file --- ' i = 1 done = .false. do while (.not. done) read (77, 7700, end=777, err=777) > nrec(i), nmon(i), nday(i), nyr(i), > nhr(i), nmin(i), nsec(i), > gps_lat(i), gps_lon(i), gps_alt(i), heading(i), > pitch(i), roll(i), g_spd(i), a_spd(i), > (noise(k,i), k=1,4), > ((tb37_fore(k,j,i), j=1,26), k=1,4), > (slat_F(j,i), j=1,26), (slon_F(j,i), j=1,26), > ((tb37_aft(k,j,i), j=1,26), k=1,4), > (slat_A(j,i), j=1,26), (slon_A(j,i), j=1,26) write (6, 6000) nhr(i), nmin(i), nsec(i), gps_alt(i) 6000 format (' Time: ',i2,':',i2,':',i2,' Altitude: ',f9.2) i = i + 1 enddo 7700 format ( i4, x,i2, x,i2, x,i4, x,i2, x,i2, x,i2, > x,2(x,f9.4), 2(x,f9.2), 2(x,f9.4), 2(x,f9.2), x,4(x,f8.4), > x,26(x,f9.2), x,26(x,f9.2), x,26(x,f9.2), x,26(x,f9.2), > x,26(x,f10.5), x,26(x,f11.5), > x,26(x,f9.2), x,26(x,f9.2), x,26(x,f9.2), x,26(x,f9.2), > x,26(x,f10.5), x,26(x,f11.5)) 777 close (77) print* print*,' --- All data read --- ' return end c[EOP]