program merge c c routine to read CLASS formated merged sounding data c c written by Paul Ciesielski (09/10/96) c character cid*3, line*130, filename*10 parameter (nl = 5000) character gline(15)*130 real time(nl),p(nl),t(nl), td(nl), rh(nl), u(nl), 2 v(nl), ws(nl), wd(nl), dz(nl), xlon(nl), xlat(nl), 3 rng(nl), az(nl), z(nl), qp(nl), qt(nl), qh(nl), 4 qu(nl), qv(nl), quv(nl) c c variable list c c time - time after launch (s) c p - pressure (mb) c t - temperature (C) c td - dew point temperature (C) c rh - relative humidity (%) c u - zonal wind component (m/s) c v - meridional wind component (m/s) c ws - wind speed c wd - wind direction c dz - ascent rate of the balloon c lon - longitude (deg) c lat - latitude (deg) c rng - range (km) c az - azimuth angle (deg) c z - altitude (m) c qp - quality flag for pressure (mb) c qt - quality flag for temperature (C) c qh - quality flag for humidity (%) c qu - quality flag for zonal wind component (m/s) c qv - quality flag for meridional wind component (m/s) c quv - quality flag for horizontal wind speed (m/s) c c ------------------------------------------------------------------------- C Specify the ISS station name------------------------------------------ print *, 'Specify 3 character station id (e.g. kap ...>' read (5,'(a3)') cid filename = cid(1:3)//'.data' c c open file c open (8,file=filename, form='formatted', status='old') C------read in data---------------------------------------------------------- 5 read(8,'(a130)',end=999) gline(1) if(gline(1)(1:4) .eq. 'Data') then do i=2,15 read(8,'(a130)') gline(i) enddo read(gline(5)(38:54),12) iyr, imn, idy, ihr write(6,13) iyr, imn, idy, ihr c n = 0 15 n = n + 1 if(n .gt. nl) then print *, 'nl too small.....' stop endif c read in another line read(8,'(a130)',end=999) line if(line(1:4) .eq. 'Data') then c read in next sounding backspace(8) go to 5 else c read in sounding data from character string "line" read(line(1:130),16) time(n),p(n),t(n),td(n),rh(n),u(n), 2 v(n),ws(n),wd(n),dz(n),xlon(n),xlat(n),rng(n),az(n), 3 z(n),qp(n),qt(n),qh(n),qu(n),qv(n),quv(n) go to 15 endif else go to 5 endif 999 continue close (8) c format statement 12 format(3(i2,2x),i2) 13 format(' reading in data for time: ',3(i2,2x),i2) 16 format(2(f6.1,1x),3(f5.1,1x),2(f6.1,1x),3(f5.1,1x),f8.3,1x, 2 f7.3,1x,2(f5.1,1x),f7.1,1x,6(f4.1,1x)) end