13 parameter(maxa=16000000)
16 CHARACTER(255) file,tbldir
20 dimension isat(0:maxs,0:maxs)
21 real(8) said(maxa),siid(maxa)
39 write(*,*)
'Usage: sinv <satbufrfile> will print inventory of satellites by platform and instrument'
43 file = trim(adjustl(file))
44 inquire(file=file,exist=exist)
45 if (.not.exist)
call bort(trim(file)//
' does not exist')
49 call openbf(lunbf,
'FIRST',lunbf)
54 cmtdir =
'/home/runner/work/NCEPLIBS-bufr/NCEPLIBS-bufr/bufr/build/ins' // &
61 open(lunbf,file=file,form=
'unformatted')
62 call ufbtab(lunbf,said,1,maxa,nret,
'SAID')
63 call ufbtab(lunbf,siid,1,maxa,nrex,
'SIID')
67 open(lunbf,file=file,form=
'unformatted')
68 CALL openbf(lunbf,
'IN',lunbf)
69 call readmg(lunbf,subset,idate,iret)
79 isat(i,j) = isat(i,j)+1
85 write(*,
'(a14,12x,a14,4x,a10)')
'id satellite',
'subsets id ',
'instrument'
89 if(isat(i,j).gt.0)
then
92 write(*,
'(i3.3,2x,a,2x,i10,2x,i3.3,6x,a)')i,ci,isat(i,j),j,trim(adjustl(cj))
97 write(*,
'(/23x,i10/)') jsat
116 subroutine satcode(lunit,icode,csad,jcode,csid)
118 character(16) :: csad
119 character(80) :: csid
120 character(255) :: str
122 csad(1:16)=
' '; csid(1:80)=
' '
128 call getcfmng(lunit,
'SAID',icode,
' ',-1,str,len,iret); csad=str(1:16)
132 call getcfmng(lunit,
'SIID',jcode,
' ',-1,str,len,iret); csid=str(1:80)
subroutine bort(STR)
Log one error message and abort application program.
subroutine codflg(CF)
This subroutine is used to specify whether or not code and flag table information should be included ...
recursive subroutine getcfmng(LUNIT, NEMOI, IVALI, NEMOD, IVALD, CMEANG, LNMNG, IRET)
This subroutine searches for a specified Table B mnemonic and associated value (code figure or bit nu...
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)
Connects a new file to the NCEPLIBS-bufr software for input or output operations, or initializes the ...
recursive subroutine readmg(LUNXX, SUBSET, JDATE, IRET)
Reads 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.
recursive subroutine ufbtab(LUNIN, TAB, I1, I2, IRET, STR)
This subroutine reads through every data subset in a BUFR file and returns one or more specified data...