55 COMMON /mstinf/ lun1, lun2, lmtd, mtdir
59 character*6 cds3(
maxnc)
61 character*128 bort_str
62 character*132 stdfil,locfil
70 SAVE lmt, lmtv, logce, lmtvl
91 . ( ( imt .NE. 0 ) .AND. ( imtv .NE. lmtv ) )
93 . ( ( imt .EQ. 0 ) .AND. ( imtv .NE. lmtv ) .AND.
94 . ( ( imtv .GT. 13 ) .OR. ( lmtv .GT. 13 ) ) ) )
119 DO WHILE ( (allstd) .AND. (ii.LE.ncds3) )
133 IF ( ( .NOT. allstd ) .AND.
134 + ( ( iogce .NE. logce ) .OR. ( imtvl .NE. lmtvl ) ) )
146 IF ( iprt .GE. 2 )
THEN
148 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
149 CALL errwrt(
'BUFRLIB: IREADMT - OPENING/READING MASTER TABLES')
152 IF ( isc3(lun) .NE. 0 )
THEN
157 CALL mtfnam ( imt, imtv, iogce, imtvl,
'TableB',
159 OPEN ( unit = lun1, file = stdfil, iostat = ier )
160 IF ( ier .NE. 0 )
GOTO 900
161 OPEN ( unit = lun2, file = locfil, iostat = ier )
162 IF ( ier .NE. 0 )
GOTO 901
167 . ibmt, ibmtv, ibogce, ibltv,
173 CLOSE ( unit = lun1 )
174 CLOSE ( unit = lun2 )
179 CALL mtfnam ( imt, imtv, iogce, imtvl,
'TableD',
181 OPEN ( unit = lun1, file = stdfil, iostat = ier )
182 IF ( ier .NE. 0 )
GOTO 900
183 OPEN ( unit = lun2, file = locfil, iostat = ier )
184 IF ( ier .NE. 0 )
GOTO 901
189 . idmt, idmtv, idogce, idltv,
191 .
ndelem, iefxyn, ceelem )
201 CLOSE ( unit = lun1 )
202 CLOSE ( unit = lun2 )
211 IF ( cdmf .EQ.
'Y' )
THEN
218 CALL mtfnam ( imt, imtv, iogce, imtvl,
'CodeFlag',
220 OPEN ( unit = lun1, file = stdfil, iostat = ier )
221 IF ( ier .NE. 0 )
GOTO 900
222 OPEN ( unit = lun2, file = locfil, iostat = ier )
223 IF ( ier .NE. 0 )
GOTO 901
227 CALL rdmtbf ( lun1, lun2 )
231 CLOSE ( unit = lun1 )
232 CLOSE ( unit = lun2 )
236 IF ( iprt .GE. 2 )
THEN
237 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
242900 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN STANDARD FILE:'
243 CALL bort2(bort_str,stdfil)
244901 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN LOCAL FILE:'
245 CALL bort2(bort_str,locfil)
subroutine bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...
void cpmstabs(f77int *pnmtb, f77int *pibfxyn, char(*pcbscl)[4], char(*pcbsref)[12], char(*pcbbw)[4], char(*pcbunit)[24], char(*pcbmnem)[8], char(*pcbelem)[120], f77int *pnmtd, f77int *pidfxyn, char(*pcdseq)[120], char(*pcdmnem)[8], f77int *pndelem, f77int *pidefxy, f77int *maxcd)
This subroutine copies relevant information from the Fortran module MODA_MSTABS arrays to new arrays ...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
f77int icvidx(f77int *ii, f77int *jj, f77int *numjj)
C C SUBPROGRAM: ICVIDX C PRGMMR: ATOR ORG: NP12 DATE: 2009-03-23 C C ABSTRACT: THIS ROUTINE COMPUTES ...
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
integer function ireadmt(LUN)
This function checks the most recent BUFR message that was read via a call to one of the message-read...
function istdesc(IDN)
Given the bit-wise (integer) representation of a descriptor, this function determines whether the des...
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within 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 ...
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 nmtd
Number of master Table D entries (up to a maximum of MXMTBD).
integer, dimension(:), allocatable ndelem
Numbers of child descriptors corresponding to idfxyn.
integer, dimension(:), allocatable idfxyn
Bit-wise representations of FXY numbers for master Table D.
character, dimension(:,:), allocatable cdseq
Sequence names corresponding to idfxyn.
integer, dimension(:), allocatable idefxy
Bit-wise representations of child descriptors corresponding to idfxyn.
character, dimension(:,:), allocatable cbscl
Scale factors corresponding to ibfxyn.
character, dimension(:,:), allocatable cbmnem
Mnemonics corresponding to ibfxyn.
integer nmtb
Number of master Table B entries (up to a maximum of MXMTBB).
character, dimension(:,:), allocatable cbsref
Reference values corresponding to ibfxyn.
character, dimension(:,:), allocatable cbelem
Element names corresponding to ibfxyn.
character, dimension(:,:), allocatable cbunit
Units corresponding to ibfxyn.
character, dimension(:,:), allocatable cdmnem
Mnemonics corresponding to idfxyn.
integer, dimension(:), allocatable ibfxyn
Bit-wise representations of FXY numbers for master Table B.
character, dimension(:,:), allocatable cbbw
Bit widths corresponding to ibfxyn.
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 ...
subroutine upds3(MBAY, LCDS3, CDS3, NDS3)
This subroutine returns the sequence of data descriptors contained within Section 3 of a BUFR message...