34 CHARACTER*128 BORT_STR,ERRSTR
35 LOGICAL DRP,DRS,DRB,DRX
41 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
42 WRITE ( unit=errstr, fmt=
'(A,I3,A,I7,A,I5,A,A10)' )
43 .
'BUFRLIB: USRTPL - LUN:INVN:NBMP:TAG(INODE(LUN)) = ',
44 . lun,
':', invn,
':', nbmp,
':',
tag(
inode(lun))
46 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
52 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
53 CALL errwrt(.LE.
'BUFRLIB: USRTPL - NBMP 0 - IMMEDIATE RETURN')
54 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
72 IF(nbmp.NE.1)
GOTO 900
73 ELSEIF(invn.GT.0 .AND. invn.LE.
nval(lun))
THEN
76 drp =
typ(nodi) .EQ.
'DRP'
77 drs =
typ(nodi) .EQ.
'DRS'
78 drb =
typ(nodi) .EQ.
'DRB'
79 drx = drp .OR. drs .OR. drb
80 ival = nint(
val(invn,lun))
82 val(invn,lun) = ival+nbmp
83 IF(drb.AND.nbmp.NE.1)
GOTO 901
84 IF(.NOT.drx )
GOTO 902
85 IF(ival.LT.0. )
GOTO 903
86 IF(ival+nbmp.GT.jval)
GOTO 904
99 IF(n2-n1+1.GT.
maxjl)
GOTO 907
110 IF(
nval(lun)+newn*nbmp.GT.
maxss)
GOTO 908
112 DO j=
nval(lun),invn+1,-1
113 inv(j+newn*nbmp,lun) =
inv(j,lun)
114 val(j+newn*nbmp,lun) =
val(j,lun)
117 IF(drp.OR.drs)
vtmp(1) = newn
134 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
135 WRITE ( unit=errstr, fmt=
'(A,A,A10,2(A,I5),A,I7)' )
136 .
'BUFRLIB: USRTPL - TAG(INV(INVN,LUN)):NEWN:NBMP:',
137 .
'NVAL(LUN) = ',
tag(
inv(invn,lun)),
':', newn,
':',
138 . nbmp,
':',
nval(lun)
141 WRITE ( unit=errstr, fmt=
'(2(A,I5),A,A10)' )
142 .
'For I = ', i,
', ITMP(I) = ',
itmp(i),
143 .
', TAG(ITMP(I)) = ',
tag(
itmp(i))
146 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
155 IF(
itp(node).EQ.0)
THEN
157 IF(
inv(invr,lun).EQ.node)
THEN
158 val(invr,lun) =
val(invr,lun)+newn*nbmp
173 900
WRITE(bort_str,
'("BUFRLIB: USRTPL - THIRD ARGUMENT (INPUT) = ",'//
174 .
'I4,", MUST BE 1 WHEN SECOND ARGUMENT (INPUT) IS 1 (SUBSET '//
175 .
'NODE) (",A,")")') nbmp,
tag(nodi)
177 901
WRITE(bort_str,
'("BUFRLIB: USRTPL - THIRD ARGUMENT (INPUT) = ",'//
178 .
'I4,", MUST BE 1 WHEN NODE IS DRB (1-BIT DELAYED REPL. FACTOR)'//
179 .
' (",A,")")') nbmp,
tag(nodi)
181 902
WRITE(bort_str,
'("BUFRLIB: USRTPL - NODE IS OF TYPE ",A," - IT '//
182 .
'MUST BE EITHER A SUBSET OR DELAYED REPL. FACTOR (",A,")")')
185 903
WRITE(bort_str,
'("BUFRLIB: USRTPL - REPLICATION FACTOR IS '//
186 .
'NEGATIVE (=",I5,") (",A,")")') ival,
tag(nodi)
188 904
WRITE(bort_str,
'("BUFRLIB: USRTPL - REPLICATION FACTOR OVERFLOW'//
189 .
' (EXCEEDS MAXIMUM OF",I6," (",A,")")') jval,
tag(nodi)
193 905
WRITE(bort_str,
'("BUFRLIB: USRTPL - INVENTORY INDEX {FIRST '//
194 .
'ARGUMENT (INPUT)} OUT OF BOUNDS (=",I5,", RANGE IS 1 TO",I6,"'//
195 .
') ")') invn,
nval(lun)
197 906
WRITE(bort_str,
'("BUFRLIB: USRTPL - UNSET EXPANSION SEGMENT (",'//
198 .
'A,")")')
tag(nodi)
200 907
WRITE(bort_str,
'("BUFRLIB: USRTPL - TEMPLATE ARRAY OVERFLOW, '//
201 .
'EXCEEDS THE LIMIT (",I6,") (",A,")")')
maxjl,
tag(nodi)
203 908
WRITE(bort_str,
'("BUFRLIB: USRTPL - INVENTORY OVERFLOW (",I6,")'//
204 .
', EXCEEDS THE LIMIT (",I6,") (",A,")")')
207 909
WRITE(bort_str,
'("BUFRLIB: USRTPL - BAD BACKUP STRATEGY (",A,'//
subroutine bort(STR)
Log one error message and abort application program.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
This module contains arrays which provide working space in several subprograms (usrtpl() and ufbcup()...
real *8, dimension(:), allocatable vtmp
val array elements for new sections of a growing subset buffer.
integer, dimension(:), allocatable itmp
inv array elements for new sections of a growing subset buffer.
This module contains declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
This module contains an array declaration used to store a status code for each internal I/O stream in...
integer, dimension(:), allocatable iscodes
Abnormal status codes.
This module contains array and variable declarations used to store the internal jump/link table.
integer, dimension(:), allocatable jseq
Temporary storage used in expanding sequences.
integer, dimension(:,:), allocatable iseq
Temporary storage used in expanding sequences.
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
real *8, dimension(:), allocatable vali
Initialized data values corresponding to typ:
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
This module contains declarations for arrays used to store data values and associated metadata for th...
integer, dimension(:), allocatable nval
Number of data values in BUFR data subset.
real *8, dimension(:,:), allocatable, target val
Data values.
integer, dimension(:,:), allocatable, target inv
Inventory pointer which links each data value to its corresponding node in the internal jump/link tab...
This module declares and initializes the MAXJL variable.
integer maxjl
Maximum number of entries in the internal jump/link table.
This module declares and initializes the MAXSS variable.
integer maxss
Maximum number of data values that can be read from or written into a data subset by the BUFRLIB soft...
subroutine usrtpl(LUN, INVN, NBMP)
Store the subset template into internal arrays.