10 CHARACTER*40 hstr,ostr,qstr
11 CHARACTER*8 you,sid,sta,subset,msg,cmc(17)
13 dimension hdr(10),obs(10,255),qms(10,255),qmc(17)
14 equivalence(hdr(1),sid)
16 LOGICAL window,steam,level
17 real*8 hdr,obs,qms,qmc
19 DATA hstr/
'SID XOB YOB DHR ELV T29 ITP TYP SRC PRG '/
20 DATA ostr/
'CAT POB QOB TOB ZOB UOB VOB PSL '/
21 DATA qstr/
'PQM QQM TQM ZQM WQM PSQ '/
23 DATA vars/
'LVL',
'CAT',
'POB',
'SPH',
'TOB',
'ZOB',
'UOB',
'VOB'/
24 DATA cmc /
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
25 .
'9',
'A',
'B',
'C',
'D',
'E',
'F',
'*'/
45 READ(4,
'(A)',end=100) file; print*,file
46 read(4,
'(a8)',end=1) sta
55 OPEN(lubfr,file=file,form=
'UNFORMATTED')
57 CALL
openbf(lubfr,
'IN',lubfr)
58 CALL
readmg(lubfr,subset,idate,iret)
59 IF(iret.NE.0) goto 100
60 IF(.NOT.steam) print*,
'READING DATA FOR ',idate
67 CALL
readmg(lubfr,subset,idate,iret)
68 IF(iret.NE.0) goto 100
71 CALL
ufbcnt(lubfr,irec,isub)
76 CALL
ufbint(lubfr,hdr,10, 1,iret,hstr)
82 IF(sta.NE.
' ' .AND. sta.NE.sid(1:nsta)) goto 10
83 IF(irt.ne.0 .and. irt.ne.jrt) goto 10
84 IF(itp.ne.0 .and. itp.ne.jtp) goto 10
85 IF(ikx.ne.0 .and. ikx.ne.jkx) goto 10
86 IF(msg.ne.
' ' .and. msg.ne.subset) goto 10
88 IF(.NOT.(xob.GE.x1 .AND. xob.LE.x2))goto 10
89 IF(.NOT.(yob.GE.y1 .AND. yob.LE.y2))goto 10
92 CALL
ufbint(lubfr,obs,10,255,nlev,ostr)
93 CALL
ufbint(lubfr,qms,10,255,nleq,qstr)
94 IF(nlev.NE.nleq) stop
'NLEV<>NLEQ'
99 IF(obs(1,l).EQ.8)
THEN
112 print
'(1x,a8,7(f8.2,1x))',(hdr(i),i=1,8)
116 print
'(''MESSAGE: '',A8,2(2X,I4),i12 )' , subset,irec,isub,idate
117 print
'(''STATION: '',A8,1X,2(F8.2,1X))' , (hdr(i),i= 1,3)
118 print
'(''TIME: '',I10,2x,F8.2 )' , idate,hdr(4)
119 print
'(''ELV: '',F8.2 )' , (hdr(5) )
120 print
'(''PSL: '',F8.2,1X,A1 )' , obs(8,1),qms(6,1)
121 print
'(''TYPE: '',3(F8.0,1X) )' , (hdr(i),i= 6,8)
122 print
'(''SOURCE: '',3a8 )' , (hdr(i),i= 9,9)
123 print
'(''SEQUENCE '',F10.0 )' , (hdr(10) )
133 qms(i,l) = qmc(iqm+1)
138 print
'(2(1X,A3),6(8X,A3))',vars
140 dif = abs(obs(2,l)-pob)
141 if(level .and. dif.gt..01) goto 12
143 print11, l,nint(obs(1,l)),(obs(i,l),qms(min(i-1,5),l),i=2,7)
144 11
FORMAT(2i4,6(1x,f7.1,
'(',a1,
')'))
159 99
READ(5,
'(A8)') you
165 IF(sta(i:i).NE.
' ') nsta = i
168 IF(you.EQ.
'R')
READ(5,
'(i3,1x,i2)') irt,itp
169 IF(you.EQ.
'K')
READ(5,
'(i3)') ikx
170 IF(you.EQ.
'M')
READ(5,
'(a8)') msg
171 IF(you.EQ.
'W')
READ(5,*) x1,x2,y1,y2
172 IF(you.EQ.
'W') window = .true.
191 SUBROUTINE capit(STR)
196 DATA ups /
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
197 DATA los /
'abcdefghijklmnopqrstuvwxyz'/
206 IF(str(i:i).EQ.los(j:j))
THEN
217 SUBROUTINE xfdump(LUNIT,LUPRT)
219 parameter( maxtba = 120 )
220 parameter( maxtbb = 500 )
221 parameter( maxtbd = 500 )
222 parameter( maxcd = 250 )
223 parameter( maxjl = 20000)
224 parameter( nfiles = 32 )
227 COMMON /msgcwd/ nmsg(nf),nsub(nf),msub(nf),inode(nf),idate(nf)
228 COMMON /tables/ maxtab,ntab,tag(maxjl),typ(maxjl),knt(maxjl),
229 . jump(maxjl),link(maxjl),jmpb(maxjl),
230 . ibt(maxjl),irf(maxjl),isc(maxjl),
231 . itp(maxjl),vali(maxjl),knti(maxjl),
232 . iseq(maxjl,2),jseq(maxjl)
233 COMMON /usrint/ nval(nf),inv(maxjl,nf),val(maxjl,nf)
234 COMMON /tababd/ ntba(0:nfiles),ntbb(0:nfiles),ntbd(0:nfiles),
235 . mtab(maxtba,nfiles),idna(maxtba,nfiles,2),
236 . idnb(maxtbb,nfiles),idnd(maxtbd,nfiles),
237 . taba(maxtba,nfiles),tabb(maxtbb,nfiles),
238 . tabd(maxtbd,nfiles)
248 CHARACTER*10 tag,nemo
250 CHARACTER*8 cval,pmiss
253 equivalence(rval,cval)
254 REAL*8 val,rval,bmiss
257 DATA pmiss /
' MISSING'/
262 if(luprt.eq.0) luout = 6
263 if(luprt.ne.0) luout = luprt
268 CALL
status(lunit,lun,il,im)
271 IF(inode(lun).NE.inv(1,lun)) goto 902
274 WRITE(luout,*)
'MESSAGE TYPE ',tag(inode(lun))
284 IF(ityp.GE.1.AND.ityp.LE.3)
THEN
285 CALL
nemtab(lun,nemo,idn,tab,n)
288 numb = tabb(n,lun)(1:6)
289 desc = tabb(n,lun)(16:70)
290 unit = tabb(n,lun)(71:94)
293 IF(ityp.EQ.1.OR.ityp.EQ.2)
THEN
294 IF(rval.NE.bmiss)
THEN
295 fmt =
'(A6,2X,A8,2X,F18.00,2X,A12,2x,a28)'
296 WRITE(fmt(18:19),
'(I2)') max(1,isc(node))
297 WRITE(luout,fmt) numb,nemo,rval,unit,desc
299 fmt =
'(A6,2X,A8,2X,A18,2X,A12,2x,a28)'
300 WRITE(luout,fmt) numb,nemo,pmiss,unit,desc
302 ELSEIF(ityp.EQ.3)
THEN
307 fmt =
'(A6,2X,A8,2X,A18,2X,"(",i2,")",A8,2x,a28)'
308 WRITE(luout,fmt) numb,nemo,lchr,nchr,unit,desc
316 900 CALL
bort(
'UFDUMP - FILE IS CLOSED ')
317 901 CALL
bort(
'UFDUMP - NO MESSAGE OPEN ')
318 902 CALL
bort(
'UFDUMP - I-NODE MISMATCH ')
function rjust(STR)
THIS FUNCTION RIGHT JUSTIFIES A CHARACTER STRING.
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine ufbdmp(LUNIN, LUPRT)
This subroutine prints a verbose listing of the contents of a data subset, including all data values ...
subroutine ufbint(LUNIN, USR, I1, I2, IRET, STR)
This subroutine reads or writes one or more data values from or to the BUFR data subset that is curre...
subroutine ufbcnt(LUNIT, KMSG, KSUB)
THIS SUBROUTINE RETURNS A COUNT OF THE CURRENT MESSAGE NUMBER AND SUBSET NUMBER, WHERE THE MESSAGE NU...
subroutine ufdump(LUNIT, LUPRT)
This subroutine prints a verbose listing of the contents of a data subset, including all data values ...
subroutine nemtab(LUN, NEMO, IDN, TAB, IRET)
THIS SUBROUTINE SEARCHES FOR MNEMONIC NEMO WITHIN THE INTERNAL TABLE B AND D ARRAYS HOLDING THE DICTI...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
subroutine readmg(LUNXX, SUBSET, JDATE, IRET)
This subroutine reads the next BUFR message from logical unit ABS(LUNXX) into internal arrays...
REAL *8 function ups(IVAL, NODE)
THIS FUNCTION UNPACKS A REAL*8 USER VALUE FROM A PACKED BUFR INTEGER BY APPLYING THE PROPER SCALE AND...
subroutine readsb(LUNIT, IRET)
This subroutine reads the next data subset from a BUFR message into internal arrays.
subroutine capit(STR)
THIS SUBROUTINE CAPITALIZES A STRING OF CHARACTERS.