20 parameter(maxa=16000000)
24 character(240) cmtdir,tbldir
27 dimension isat(0:maxs,0:maxs)
45 narg=command_argument_count()
47 write(*,*)
'Usage: sinv satbufrfile <tabledir> will print inventory of satbufrfile by platform and instrument'
50 call get_command_argument(1,file)
51 file = trim(adjustl(file))
52 inquire(file=file,exist=exist)
53 if (.not.exist)
call bort(trim(file)//
' does not exist')
61 call openbf(lunbf,
'FIRST',lunbf)
63 call get_command_argument(2,tbldir)
66 cmtdir =
'/home/runner/work/NCEPLIBS-bufr/NCEPLIBS-bufr/bufr/build-doc' // &
73 open(lunbf,file=file,form=
'unformatted')
74 call openbf(lunbf,
'IN',lunbf)
78 call ufbtab(lunbf,said,2,maxa,nret,
'SAID SIID')
84 isat(i,j) = isat(i,j)+1
90 call readmg(lunbf,subset,idate,iret)
96 write(*,
'(a14,12x,a14,4x,a10)')
'id satellite',
'subsets id ',
'instrument'
103 write(*,
'(i3.3,2x,a,2x,i10,2x,i3.3,6x,a)')i,ci,isat(i,j),j,trim(adjustl(cj))
108 write(*,
'(/23x,i10/)') jsat
123 subroutine satcode(lunit,icode,csad,jcode,csid)
125 character(16) :: csad
126 character(80) :: csid
127 character(255) :: str
129 csad(1:16)=
' '; csid(1:80)=
' '
135 call getcfmng(lunit,
'SAID',icode,
' ',-1,str,len,iret); csad=str(1:16)
139 call getcfmng(lunit,
'SIID',jcode,
' ',-1,str,len,iret); csid=str(1:80)
recursive subroutine bort(str)
Log an error message, then either return to or 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...
subroutine setpart(xpart)
Specify whether future calls to subroutine ufbtab() should attempt to return full or partial results.
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 <tabledir> will print an inventory of satellites in the satbufrfile by platfo...