8 integer,
parameter :: mxmn=35, mxlv=250, mxev=10
9 character(80):: hdstr=
'SID XOB YOB DHR TYP ELV SAID T29'
10 character(80):: obstr=
'POB QOB TOB ZOB UOB VOB PWO CAT PRSS'
11 character(80):: qcstr=
'PQM QQM TQM ZQM WQM QPC PWQ TPC '
12 character(80):: oestr=
'POE QOE TOE NUL WOE NUL PWE '
13 real(8) :: hdr(mxmn),obs(mxmn,mxlv,mxev),qcf(mxmn,mxlv,mxev),oer(mxmn,mxlv,mxev)
15 INTEGER :: ireadmg,ireadsb
17 character(8) :: subset
18 integer :: unit_in=10,idate,nmsg,ntb
21 real(8) :: rstation_id
22 equivalence(rstation_id,c_sid)
25 integer :: i,k,iret, numobs,n
27 character (len=80) :: pb_table_fname, pb_data_fname
34 argc = command_argument_count()
36 print*,
"ERROR: must supply exactly two arguments"
38 print*,
"USAGE: pb_decode_events <input_bufr_file> <output_bufr_table_file>"
41 call get_command_argument(1,pb_data_fname)
42 call get_command_argument(2,pb_table_fname)
44 open(24,file=pb_table_fname)
45 open(unit_in,file=pb_data_fname,form=
'unformatted',status=
'old')
46 call openbf(unit_in,
'IN',unit_in)
47 call dxdump(unit_in,24)
51 msg_report:
do while (ireadmg(unit_in,subset,idate) == 0)
55 write(*,
'(3a,i10)')
'subset=',subset,
' cycle time =',idate
56 sb_report:
do while (ireadsb(unit_in) == 0)
65 call ufbevn(unit_in,obs,mxmn,mxlv,mxev,iret,
'TOB')
69 write(*,
'(2I10,a14,8f15.1)') ntb,iret,c_sid,(hdr(i),i=2,8)
76 write(*,
'(2i3,a10,9f15.1)') n, k,
'obs=', obs(1,k,n)
82 write(*,*)
'numobs=',numobs