31 SUBROUTINE ufbrw(LUN,USR,I1,I2,IO,IRET)
37 COMMON /usrstr/ nnod,ncon,nods(20),nodc(10),ivls(10),kons(10)
54 1
CALL conwin(lun,inc1,inc2)
58 ELSEIF(inc1.EQ.0)
THEN
64 CALL getwin(nods(i),lun,ins1,ins2)
65 IF(ins1.EQ.0)
GOTO 100
79 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
80 WRITE ( unit=errstr, fmt=
'(5(A,I7))' )
81 .
'BUFRLIB: UFBRW - IRET:INS1:INS2:INC1:INC2 = ',
82 . iret,
':', ins1,
':', ins2,
':', inc1,
':', inc2
85 DO WHILE ( ( ins2 - kk ) .GE. 5 )
86 WRITE ( unit=errstr, fmt=
'(5A10)' )
87 . (
tag(
inv(i,lun)),i=kk,kk+4)
91 WRITE ( unit=errstr, fmt=
'(5A10)' )
92 . (
tag(
inv(i,lun)),i=kk,ins2)
94 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
101 IF(io.EQ.1 .AND. iret.LE.i2)
THEN
103 IF(nods(i).GT.0)
THEN
104 IF(
ibfms(usr(i,iret)).EQ.0)
THEN
105 invn =
invwin(nods(i),lun,ins1,ins2)
107 CALL drstpl(nods(i),lun,ins1,ins2,invn)
112 CALL newwin(lun,inc1,inc2)
113 val(invn,lun) = usr(i,iret)
114 ELSEIF(
lstjpb(nods(i),lun,
'RPS').EQ.0)
THEN
115 val(invn,lun) = usr(i,iret)
116 ELSEIF(
ibfms(
val(invn,lun)).NE.0)
THEN
117 val(invn,lun) = usr(i,iret)
119 CALL drstpl(nods(i),lun,ins1,ins2,invn)
124 CALL newwin(lun,inc1,inc2)
125 val(invn,lun) = usr(i,iret)
135 IF(io.EQ.0 .AND. iret.LE.i2)
THEN
138 IF(nods(i).GT.0)
THEN
139 invn =
invwin(nods(i),lun,ins1,ins2)
140 IF(invn.GT.0) usr(i,iret) =
val(invn,lun)
148 IF(io.EQ.1.AND.iret.EQ.i2)
GOTO 100
149 CALL nxtwin(lun,ins1,ins2)
150 IF(ins1.GT.0 .AND. ins1.LT.inc2)
GOTO 2
subroutine conwin(LUN, INC1, INC2)
This subroutine searches consecutive subset buffer segments for an element identified in the user str...
subroutine drstpl(INOD, LUN, INV1, INV2, INVN)
This subroutine is called by subroutine ufbrw() whenever it can't find a mnemonic it wants to write w...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine getwin(NODE, LUN, IWIN, JWIN)
Given a node index within the internal jump/link table, this subroutine looks within the current subs...
integer function ibfms(R8VAL)
Test whether a real*8 data value is "missing".
function invwin(NODE, LUN, INV1, INV2)
This function looks for a specified node within the portion of the current subset buffer bounded by t...
function lstjpb(NODE, LUN, JBTYP)
This function searches backwards, beginning from a given node within the jump/link table,...
This module contains array and variable declarations used to store the internal jump/link table.
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
This module contains declarations for arrays used to store data values and associated metadata for th...
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 BMISS variable.
real *8, public bmiss
Current placeholder value to represent "missing" data when reading from or writing to BUFR files; thi...
subroutine newwin(LUN, IWIN, JWIN)
Given an index within the internal jump/link table which points to the start of an "rpc" window (whic...
subroutine nxtwin(LUN, IWIN, JWIN)
Given indices within the internal jump/link table which point to the start and end of an "rpc" window...
subroutine ufbrw(LUN, USR, I1, I2, IO, IRET)
This subroutine writes or reads specified values to or from the current BUFR data subset within inter...