52 COMMON /mstinf/ lun1, lun2, lmtd, mtdir
56 character*6 cds3(maxnc)
58 character*128 bort_str
59 character*132 stdfil,locfil
67 SAVE lmt, lmtv, logce, lmtvl
77 imt =
iupbs01( mbay(1,lun),
'BMT' )
78 imtv =
iupbs01( mbay(1,lun),
'MTV' )
79 iogce =
iupbs01( mbay(1,lun),
'OGCE' )
80 imtvl =
iupbs01( mbay(1,lun),
'MTVL' )
88 . ( ( imt .NE. 0 ) .AND. ( imtv .NE. lmtv ) )
90 . ( ( imt .EQ. 0 ) .AND. ( imtv .NE. lmtv ) .AND.
91 . ( ( imtv .GT. 13 ) .OR. ( lmtv .GT. 13 ) ) ) )
113 CALL
upds3( mbay(1,lun), maxnc, cds3, ncds3 )
116 DO WHILE ( (allstd) .AND. (ii.LE.ncds3) )
130 IF ( ( .NOT. allstd ) .AND.
131 + ( ( iogce .NE. logce ) .OR. ( imtvl .NE. lmtvl ) ) )
143 IF ( iprt .GE. 2 )
THEN
145 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
146 CALL
errwrt(
'BUFRLIB: IREADMT - OPENING/READING MASTER TABLES')
149 IF ( isc3(lun) .NE. 0 )
THEN
154 CALL
mtfnam( imt, imtv, iogce, imtvl,
'TableB',
156 OPEN ( unit = lun1, file = stdfil, iostat = ier )
157 IF ( ier .NE. 0 ) goto 900
158 OPEN ( unit = lun2, file = locfil, iostat = ier )
159 IF ( ier .NE. 0 ) goto 901
163 CALL
rdmtbb( lun1, lun2, mxmtbb,
164 . ibmt, ibmtv, ibogce, ibltv,
165 . nmtb, ibfxyn, cbscl, cbsref, cbbw,
166 . cbunit, cbmnem, cmdscb, cbelem )
170 CLOSE ( unit = lun1 )
171 CLOSE ( unit = lun2 )
176 CALL
mtfnam( imt, imtv, iogce, imtvl,
'TableD',
178 OPEN ( unit = lun1, file = stdfil, iostat = ier )
179 IF ( ier .NE. 0 ) goto 900
180 OPEN ( unit = lun2, file = locfil, iostat = ier )
181 IF ( ier .NE. 0 ) goto 901
185 CALL
rdmtbd( lun1, lun2, mxmtbd, maxcd,
186 . idmt, idmtv, idogce, idltv,
187 . nmtd, idfxyn, cdmnem, cmdscd, cdseq,
188 . ndelem, iefxyn, ceelem )
191 idx =
icvidx( i-1, j-1, maxcd ) + 1
192 idefxy(idx) = iefxyn(i,j)
198 CLOSE ( unit = lun1 )
199 CLOSE ( unit = lun2 )
203 CALL
cpmstabs( nmtb, ibfxyn, cbscl, cbsref, cbbw, cbunit,
204 . cbmnem, cbelem, nmtd, idfxyn, cdseq, cdmnem,
205 . ndelem, idefxy, maxcd )
208 IF ( cdmf .EQ.
'Y' )
THEN
215 CALL
mtfnam( imt, imtv, iogce, imtvl,
'CodeFlag',
217 OPEN ( unit = lun1, file = stdfil, iostat = ier )
218 IF ( ier .NE. 0 ) goto 900
219 OPEN ( unit = lun2, file = locfil, iostat = ier )
220 IF ( ier .NE. 0 ) goto 901
228 CLOSE ( unit = lun1 )
229 CLOSE ( unit = lun2 )
233 IF ( iprt .GE. 2 )
THEN
234 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
239 900 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN STANDARD FILE:'
240 CALL
bort2(bort_str,stdfil)
241 901 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN LOCAL FILE:'
242 CALL
bort2(bort_str,locfil)
subroutine bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...
function istdesc(IDN)
Given the bit-wise (integer) representation of a descriptor, this function determines whether the des...
subroutine upds3(MBAY, LCDS3, CDS3, NDS3)
This subroutine returns the sequence of data descriptors contained within Section 3 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 ...
subroutine rdmtbf(LUNSTF, LUNLTF)
This subroutine reads master Code/Flag table information from two separate ASCII files (one standard ...
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 ...
This module declares and initializes the MAXNC variable.
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
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 ...
This module contains array and variable declarations used to store master Table B and Table D entries...
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 ...
This module contains array and variable declarations used to store BUFR messages internally for multi...
INTEGER function ireadmt(LUN)
This function checks the most recent BUFR message that was read via a call to one of the message-read...
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 iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message...