50 COMMON /mstinf/ lun1, lun2, lmtd, mtdir
54 CHARACTER*6 cds3(
maxnc)
56 CHARACTER*128 bort_str
57 CHARACTER*132 stdfil,locfil
65 SAVE lmt, lmtv, logce, lmtvl
86 + ( ( imt .NE. 0 ) .AND. ( imtv .NE. lmtv ) )
88 + ( ( imt .EQ. 0 ) .AND. ( imtv .NE. lmtv ) .AND.
89 + ( ( imtv .GT. 13 ) .OR. ( lmtv .GT. 13 ) ) ) )
114 DO WHILE ( (allstd) .AND. (ii.LE.ncds3) )
128 IF ( ( .NOT. allstd ) .AND.
129 + ( ( iogce .NE. logce ) .OR. ( imtvl .NE. lmtvl ) ) )
141 IF ( iprt .GE. 2 )
THEN
143 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
144 CALL errwrt(
'BUFRLIB: IREADMT - OPENING/READING MASTER TABLES')
147 IF (
isc3(lun) .NE. 0 )
THEN
152 CALL mtfnam ( imt, imtv, iogce, imtvl,
'TableB',
154 OPEN ( unit = lun1, file = stdfil, iostat = ier )
155 IF ( ier .NE. 0 )
GOTO 900
156 OPEN ( unit = lun2, file = locfil, iostat = ier )
157 IF ( ier .NE. 0 )
GOTO 901
162 + ibmt, ibmtv, ibogce, ibltv,
168 CLOSE ( unit = lun1 )
169 CLOSE ( unit = lun2 )
174 CALL mtfnam ( imt, imtv, iogce, imtvl,
'TableD',
176 OPEN ( unit = lun1, file = stdfil, iostat = ier )
177 IF ( ier .NE. 0 )
GOTO 900
178 OPEN ( unit = lun2, file = locfil, iostat = ier )
179 IF ( ier .NE. 0 )
GOTO 901
184 + idmt, idmtv, idogce, idltv,
196 CLOSE ( unit = lun1 )
197 CLOSE ( unit = lun2 )
206 IF ( cdmf .EQ.
'Y' )
THEN
213 CALL mtfnam ( imt, imtv, iogce, imtvl,
'CodeFlag',
215 OPEN ( unit = lun1, file = stdfil, iostat = ier )
216 IF ( ier .NE. 0 )
GOTO 900
217 OPEN ( unit = lun2, file = locfil, iostat = ier )
218 IF ( ier .NE. 0 )
GOTO 901
222 CALL rdmtbf ( lun1, lun2 )
226 CLOSE ( unit = lun1 )
227 CLOSE ( unit = lun2 )
231 IF ( iprt .GE. 2 )
THEN
232 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
237 900 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN STANDARD FILE:'
238 CALL bort2(bort_str,stdfil)
239 901 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN LOCAL FILE:'
240 CALL bort2(bort_str,locfil)
subroutine bort2(STR1, STR2)
Log two error messages and abort application program.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
function ifxy(ADSC)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
integer function ireadmt(LUN)
Check whether master BUFR tables need to be read from the local file system.
function istdesc(IDN)
Check whether a descriptor is WMO-standard.
recursive function iupbs01(MBAY, S01MNEM)
Read a data value from Section 0 or Section 1 of a BUFR message.
subroutine mtfnam(IMT, IMTV, IOGCE, IMTVL, TBLTYP, STDFIL, LOCFIL)
Based on the input arguments, this subroutine determines the names of the corresponding standard and ...
Wrap C NCEPLIBS-bufr functions so they can be called from within the Fortran part of the library.
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
This module contains array and variable declarations used to store master Table B and Table D entries...
integer, dimension(:), allocatable idfxyn
Bit-wise representations of FXY numbers for master Table D.
character, dimension(:,:), allocatable cbunit
Units corresponding to ibfxyn.
integer nmtb
Number of master Table B entries (up to a maximum of MXMTBB).
character, dimension(:,:), allocatable cbbw
Bit widths corresponding to ibfxyn.
character, dimension(:,:), allocatable cdseq
Sequence names corresponding to idfxyn.
character, dimension(:,:), allocatable cbmnem
Mnemonics corresponding to ibfxyn.
integer, dimension(:), allocatable ndelem
Numbers of child descriptors corresponding to idfxyn.
character, dimension(:,:), allocatable cbelem
Element names corresponding to ibfxyn.
character, dimension(:,:), allocatable cbscl
Scale factors corresponding to ibfxyn.
character, dimension(:,:), allocatable cdmnem
Mnemonics corresponding to idfxyn.
character, dimension(:,:), allocatable cbsref
Reference values corresponding to ibfxyn.
integer nmtd
Number of master Table D entries (up to a maximum of MXMTBD).
integer, dimension(:), allocatable idefxy
Bit-wise representations of child descriptors corresponding to idfxyn.
integer, dimension(:), allocatable ibfxyn
Bit-wise representations of FXY numbers for master Table B.
This module contains array and variable declarations used to store master Table B and Table D entries...
character *120, dimension(:,:), allocatable ceelem
Element names corresponding to iefxyn.
character *4, dimension(:), allocatable cmdscb
Descriptor codes for Table B elements.
integer, dimension(:,:), allocatable iefxyn
Bit-wise representations of child descriptors of Table D sequences.
character *4, dimension(:), allocatable cmdscd
Descriptor codes for Table D sequences.
This module contains an array declaration used to store a switch for each internal I/O stream index,...
integer, dimension(:), allocatable isc3
Section 3 switch for each internal I/O stream index:
This module declares and initializes the MAXCD variable.
integer, public maxcd
Maximum number of child descriptors that can be included within the sequence definition of a Table D ...
This module declares and initializes the MAXNC variable.
integer, parameter, public maxnc
Maximum number of descriptors within Section 3 of a BUFR message.
This module declares and initializes the MXMTBB variable.
integer mxmtbb
Maximum number of entries in a master BUFR Table B.
This module declares and initializes the MXMTBD variable.
integer mxmtbd
Maximum number of entries in a master BUFR Table D.
subroutine rdmtbb(LUNSTB, LUNLTB, MXMTBB, IMT, IMTV, IOGCE, ILTV, NMTBB, IMFXYN, CMSCL, CMSREF, CMBW, CMUNIT, CMMNEM, CMDSC, CMELEM)
This subroutine reads master Table B information from two separate ASCII files (one standard and one ...
subroutine rdmtbd(LUNSTD, LUNLTD, MXMTBD, MXELEM, IMT, IMTV, IOGCE, ILTV, NMTBD, IMFXYN, CMMNEM, CMDSC, CMSEQ, NMELEM, IEFXYN, CEELEM)
This subroutine reads master Table D information from two separate ASCII files (one standard and one ...
subroutine rdmtbf(LUNSTF, LUNLTF)
This subroutine reads master Code/Flag table information from two separate ASCII files (one standard ...
recursive subroutine upds3(MBAY, LCDS3, CDS3, NDS3)
This subroutine returns the sequence of data descriptors contained within Section 3 of a BUFR message...