63 CHARACTER*128 BORT_STR,ERRSTR
64 LOGICAL DRP,DRS,DRB,DRX
70 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
71 WRITE ( unit=errstr, fmt=
'(A,I3,A,I7,A,I5,A,A10)' )
72 .
'BUFRLIB: USRTPL - LUN:INVN:NBMP:TAG(INODE(LUN)) = ',
73 . lun,
':', invn,
':', nbmp,
':',
tag(inode(lun))
75 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
81 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
82 CALL errwrt(.LE.
'BUFRLIB: USRTPL - NBMP 0 - IMMEDIATE RETURN')
83 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
101 IF(nbmp.NE.1)
GOTO 900
102 ELSEIF(invn.GT.0 .AND. invn.LE.nval(lun))
THEN
105 drp =
typ(nodi) .EQ.
'DRP'
106 drs =
typ(nodi) .EQ.
'DRS'
107 drb =
typ(nodi) .EQ.
'DRB'
108 drx = drp .OR. drs .OR. drb
110 jval = 2**
ibt(nodi)-1
111 val(invn,lun) = ival+nbmp
112 IF(drb.AND.nbmp.NE.1)
GOTO 901
113 IF(.NOT.drx )
GOTO 902
114 IF(ival.LT.0. )
GOTO 903
115 IF(ival+nbmp.GT.jval)
GOTO 904
127 IF(n1.EQ.0 )
GOTO 906
128 IF(n2-n1+1.GT.
maxjl)
GOTO 907
133 vtmp(newn) =
vali(jseq(n))
139 IF(nval(lun)+newn*nbmp.GT.
maxss)
GOTO 908
141 DO j=nval(lun),invn+1,-1
142 inv(j+newn*nbmp,lun) = inv(j,lun)
143 val(j+newn*nbmp,lun) = val(j,lun)
146 IF(drp.OR.drs) vtmp(1) = newn
152 inv(knvn,lun) = itmp(j)
153 val(knvn,lun) = vtmp(j)
160 nval(lun) = nval(lun) + newn*nbmp
163 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
164 WRITE ( unit=errstr, fmt=
'(A,A,A10,2(A,I5),A,I7)' )
165 .
'BUFRLIB: USRTPL - TAG(INV(INVN,LUN)):NEWN:NBMP:',
166 .
'NVAL(LUN) = ',
tag(inv(invn,lun)),
':', newn,
':',
167 . nbmp,
':', nval(lun)
170 WRITE ( unit=errstr, fmt=
'(2(A,I5),A,A10)' )
171 .
'For I = ', i,
', ITMP(I) = ', itmp(i),
172 .
', TAG(ITMP(I)) = ',
tag(itmp(i))
175 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
184 IF(
itp(node).EQ.0)
THEN
186 IF(inv(invr,lun).EQ.node)
THEN
187 val(invr,lun) = val(invr,lun)+newn*nbmp
202900
WRITE(bort_str,
'("BUFRLIB: USRTPL - THIRD ARGUMENT (INPUT) = ",'//
203 .
'I4,", MUST BE 1 WHEN SECOND ARGUMENT (INPUT) IS 1 (SUBSET '//
204 .
'NODE) (",A,")")') nbmp,
tag(nodi)
206901
WRITE(bort_str,
'("BUFRLIB: USRTPL - THIRD ARGUMENT (INPUT) = ",'//
207 .
'I4,", MUST BE 1 WHEN NODE IS DRB (1-BIT DELAYED REPL. FACTOR)'//
208 .
' (",A,")")') nbmp,
tag(nodi)
210902
WRITE(bort_str,
'("BUFRLIB: USRTPL - NODE IS OF TYPE ",A," - IT '//
211 .
'MUST BE EITHER A SUBSET OR DELAYED REPL. FACTOR (",A,")")')
214903
WRITE(bort_str,
'("BUFRLIB: USRTPL - REPLICATION FACTOR IS '//
215 .
'NEGATIVE (=",I5,") (",A,")")') ival,
tag(nodi)
217904
WRITE(bort_str,
'("BUFRLIB: USRTPL - REPLICATION FACTOR OVERFLOW'//
218 .
' (EXCEEDS MAXIMUM OF",I6," (",A,")")') jval,
tag(nodi)
220905
WRITE(bort_str,
'("BUFRLIB: USRTPL - INVENTORY INDEX {FIRST '//
221 .
'ARGUMENT (INPUT)} OUT OF BOUNDS (=",I5,", RANGE IS 1 TO",I6,"'//
222 .
') (",A,")")') invn,nval(lun),
tag(nodi)
224906
WRITE(bort_str,
'("BUFRLIB: USRTPL - UNSET EXPANSION SEGMENT (",'//
225 .
'A,")")')
tag(nodi)
227907
WRITE(bort_str,
'("BUFRLIB: USRTPL - TEMPLATE ARRAY OVERFLOW, '//
228 .
'EXCEEDS THE LIMIT (",I6,") (",A,")")')
maxjl,
tag(nodi)
230908
WRITE(bort_str,
'("BUFRLIB: USRTPL - INVENTORY OVERFLOW (",I6,")'//
231 .
', EXCEEDS THE LIMIT (",I6,") (",A,")")')
232 . nval(lun)+newn*nbmp,
maxss,
tag(nodi)
234909
WRITE(bort_str,
'("BUFRLIB: USRTPL - BAD BACKUP STRATEGY (",A,'//
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
This module contains array and variable declarations used to store the internal jump/link table.
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
real *8, dimension(:), allocatable vali
Initialized data values corresponding to typ:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
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)
THIS SUBROUTINE STORES THE SUBSET TEMPLATE INTO INTERNAL SUBSET ARRAYS IN MODULE USRINT FOR CASES OF ...