64 COMMON /mstinf/ lun1, lun2, lmtd, mtdir
68 character*6 cds3(maxnc)
70 character*128 bort_str
71 character*132 stdfil,locfil
79 SAVE lmt, lmtv, logce, lmtvl
89 imt =
iupbs01( mbay(1,lun),
'BMT' )
90 imtv =
iupbs01( mbay(1,lun),
'MTV' )
91 iogce =
iupbs01( mbay(1,lun),
'OGCE' )
92 imtvl =
iupbs01( mbay(1,lun),
'MTVL' )
100 . ( ( imt .NE. 0 ) .AND. ( imtv .NE. lmtv ) )
102 . ( ( imt .EQ. 0 ) .AND. ( imtv .NE. lmtv ) .AND.
103 . ( ( imtv .GT. 13 ) .OR. ( lmtv .GT. 13 ) ) ) )
125 CALL
upds3( mbay(1,lun), maxnc, cds3, ncds3 )
128 DO WHILE ( (allstd) .AND. (ii.LE.ncds3) )
142 IF ( ( .NOT. allstd ) .AND.
143 + ( ( iogce .NE. logce ) .OR. ( imtvl .NE. lmtvl ) ) )
155 IF ( iprt .GE. 2 )
THEN
157 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
158 CALL
errwrt(
'BUFRLIB: IREADMT - OPENING/READING MASTER TABLES')
161 IF ( isc3(lun) .NE. 0 )
THEN
166 CALL
mtfnam( imt, imtv, iogce, imtvl,
'TableB',
168 OPEN ( unit = lun1, file = stdfil, iostat = ier )
169 IF ( ier .NE. 0 ) goto 900
170 OPEN ( unit = lun2, file = locfil, iostat = ier )
171 IF ( ier .NE. 0 ) goto 901
175 CALL
rdmtbb( lun1, lun2, mxmtbb,
176 . ibmt, ibmtv, ibogce, ibltv,
177 . nmtb, ibfxyn, cbscl, cbsref, cbbw,
178 . cbunit, cbmnem, cmdscb, cbelem )
182 CLOSE ( unit = lun1 )
183 CLOSE ( unit = lun2 )
188 CALL
mtfnam( imt, imtv, iogce, imtvl,
'TableD',
190 OPEN ( unit = lun1, file = stdfil, iostat = ier )
191 IF ( ier .NE. 0 ) goto 900
192 OPEN ( unit = lun2, file = locfil, iostat = ier )
193 IF ( ier .NE. 0 ) goto 901
197 CALL
rdmtbd( lun1, lun2, mxmtbd, maxcd,
198 . idmt, idmtv, idogce, idltv,
199 . nmtd, idfxyn, cdmnem, cmdscd, cdseq,
200 . ndelem, iefxyn, ceelem )
203 idx =
icvidx( i-1, j-1, maxcd ) + 1
204 idefxy(idx) = iefxyn(i,j)
210 CLOSE ( unit = lun1 )
211 CLOSE ( unit = lun2 )
213 #ifdef DYNAMIC_ALLOCATION
216 CALL
cpmstabs( nmtb, ibfxyn, cbscl, cbsref, cbbw, cbunit,
217 . cbmnem, cbelem, nmtd, idfxyn, cdseq, cdmnem,
218 . ndelem, idefxy, maxcd )
222 IF ( cdmf .EQ.
'Y' )
THEN
229 CALL
mtfnam( imt, imtv, iogce, imtvl,
'CodeFlag',
231 OPEN ( unit = lun1, file = stdfil, iostat = ier )
232 IF ( ier .NE. 0 ) goto 900
233 OPEN ( unit = lun2, file = locfil, iostat = ier )
234 IF ( ier .NE. 0 ) goto 901
242 CLOSE ( unit = lun1 )
243 CLOSE ( unit = lun2 )
247 IF ( iprt .GE. 2 )
THEN
248 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
253 900 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN STANDARD FILE:'
254 CALL
bort2(bort_str,stdfil)
255 901 bort_str =
'BUFRLIB: IREADMT - COULD NOT OPEN LOCAL FILE:'
256 CALL
bort2(bort_str,locfil)
void cpmstabs(f77int *pnmtb, f77int *pibfxyn, char(*pcbscl)[4], char(*pcbsref)[12], char(*pcbbw)[4], char(*pcbunit)[14], 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 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 REPRESENTATION OF THE FXY VALUE FOR A DESCRIPTOR, THIS FUNCTION DETERMINES WHETHER...
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 (I.E.
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 (I.E.
This module declares and initializes the MAXNC variable.
function ifxy(ADSC)
THIS FUNCTION RETURNS THE INTEGER CORRESPONDING TO THE BIT-WISE REPRESENTATION OF AN INPUT CHARACTER ...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
INTEGER function ireadmt(LUN)
THIS FUNCTION CHECKS THE MOST RECENT BUFR MESSAGE THAT WAS READ AS INPUT VIA SUBROUTINE READMG...
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 (I.E.
This module contains array and variable declarations used to store BUFR messages internally for multi...
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...