13 parameter(maxa=16000000)
17 character(240) cmtdir,tbldir
20 dimension isat(0:maxs,0:maxs)
21 real(8) said(maxa),siid(maxa)
36 narg=command_argument_count()
38 write(*,*)
'Usage: sinv <satbufrfile> will print inventory of satellites by platform and instrument'
41 call get_command_argument(1,file)
42 file = trim(adjustl(file))
43 inquire(file=file,exist=exist)
44 if (.not.exist)
call bort(trim(file)//
' does not exist')
52 call openbf(lunbf,
'FIRST',lunbf)
54 call get_command_argument(2,tbldir)
57 cmtdir =
'/home/runner/work/NCEPLIBS-bufr/NCEPLIBS-bufr/bufr/build-doc' // &
64 open(lunbf,file=file,form=
'unformatted')
65 call ufbtab(lunbf,said,1,maxa,nret,
'SAID')
66 call ufbtab(lunbf,siid,1,maxa,nrex,
'SIID')
70 open(lunbf,file=file,form=
'unformatted')
71 call openbf(lunbf,
'IN',lunbf)
72 call readmg(lunbf,subset,idate,iret)
82 isat(i,j) = isat(i,j)+1
88 write(*,
'(a14,12x,a14,4x,a10)')
'id satellite',
'subsets id ',
'instrument'
95 write(*,
'(i3.3,2x,a,2x,i10,2x,i3.3,6x,a)')i,ci,isat(i,j),j,trim(adjustl(cj))
100 write(*,
'(/23x,i10/)') jsat
119 subroutine satcode(lunit,icode,csad,jcode,csid)
121 character(16) :: csad
122 character(80) :: csid
123 character(255) :: str
125 csad(1:16)=
' '; csid(1:80)=
' '
131 call getcfmng(lunit,
'SAID',icode,
' ',-1,str,len,iret); csad=str(1:16)
135 call getcfmng(lunit,
'SIID',jcode,
' ',-1,str,len,iret); csid=str(1:80)
subroutine bort(str)
Log an error message, then abort the application program.
recursive subroutine getcfmng(lunit, nemoi, ivali, nemod, ivald, cmeang, lnmng, iret)
Decode the meaning of a numerical value from a code or flag table.
subroutine codflg(cf)
Specify whether or not code and flag table information should be included during all future reads of ...
recursive subroutine mtinfo(cmtdir, lunmt1, lunmt2)
Specify the directory location and Fortran logical unit numbers to be used when reading master BUFR t...
recursive subroutine openbf(lunit, io, lundx)
Connect a new file to the NCEPLIBS-bufr software for input or output operations, or initialize the li...
recursive subroutine ufbtab(lunin, tab, i1, i2, iret, str)
Read through every data subset in a BUFR file and return one or more specified data values from each ...
recursive subroutine readmg(lunxx, subset, jdate, iret)
Read the next BUFR message from logical unit abs(lunxx) into internal arrays.
subroutine satcode(lunit, icode, csad, jcode, csid)
This subroutine looks in the master BUFR tables for meaning strings associated with specified code fi...
program sinv
Usage: sinv <satbufrfile> will print inventory of satellites by platform and instrument.