43 RECURSIVE SUBROUTINE copysb(LUNIN,LUNOT,IRET)
50 CHARACTER*128 bort_str
61 CALL x84(lunin,my_lunin,1)
62 CALL x84(lunot,my_lunot,1)
63 CALL copysb(my_lunin,my_lunot,iret)
75 CALL status(lunin,lin,il,im)
81 CALL status(lunot,lot,il,im)
87 . (
iok2cpy(lin,lot).NE.1) )
GOTO 906
102 CALL mesgbc(-lunin,mest,icmp)
120 ELSE IF(icmp.EQ.0)
THEN
130 IF (nbyt.GT.65530)
THEN
135 IF ( (
nsub(lin).EQ.0) .AND. (
msub(lin).EQ.1) )
THEN
140 CALL getlens(
mbay(1,lin),4,len0,len1,len2,len3,len4,l5)
151 IF(lunot.GT.0)
CALL cpyupd(lunot,lin,lot,nbyt)
162 900
CALL bort(
'BUFRLIB: COPYSB - INPUT BUFR FILE IS CLOSED, IT '//
163 .
'MUST BE OPEN FOR INPUT')
164 901
CALL bort(
'BUFRLIB: COPYSB - INPUT BUFR FILE IS OPEN FOR '//
165 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
166 902
CALL bort(
'BUFRLIB: COPYSB - A MESSAGE MUST BE OPEN IN INPUT '//
167 .
'BUFR FILE, NONE ARE')
168 903
CALL bort(
'BUFRLIB: COPYSB - OUTPUT BUFR FILE IS CLOSED, IT '//
169 .
'MUST BE OPEN FOR OUTPUT')
170 904
CALL bort(
'BUFRLIB: COPYSB - OUTPUT BUFR FILE IS OPEN FOR '//
171 .
'INPUT, IT MUST BE OPEN FOR OUTPUT')
172 905
CALL bort(
'BUFRLIB: COPYSB - A MESSAGE MUST BE OPEN IN OUTPUT '//
173 .
'BUFR FILE, NONE ARE')
174 906
CALL bort(
'BUFRLIB: COPYSB - INPUT AND OUTPUT BUFR FILES MUST '//
175 .
'HAVE THE SAME INTERNAL TABLES, THEY ARE DIFFERENT HERE')
176 907
WRITE(bort_str,
'("BUFRLIB: COPYSB - INVALID COMPRESSION '//
177 .
'INDICATOR (ICMP=",I3," RETURNED FROM BUFR ARCHIVE LIBRARY '//
178 .
'ROUTINE MESGBC")') icmp
subroutine bort(STR)
Log one error message and abort application program.
subroutine cmpmsg(CF)
Specify the use of compression when writing BUFR messages.
recursive subroutine copysb(LUNIN, LUNOT, IRET)
This subroutine copies a BUFR data subset from one Fortran logical unit to another.
subroutine cpyupd(LUNIT, LIN, LUN, IBYT)
This subroutine copies a BUFR data subset from one unit to another within internal memory and resets ...
recursive subroutine getlens(MBAY, LL, LEN0, LEN1, LEN2, LEN3, LEN4, LEN5)
This subroutine reads the lengths of all of the individual sections of a given BUFR message,...
integer function iok2cpy(LUI, LUO)
This function determines whether a BUFR message, or a data subset from within a BUFR message,...
recursive subroutine mesgbc(LUNIN, MESGTYP, ICOMP)
This subroutine examines a BUFR message and returns both the message type (from Section 1) and messag...
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer ibit
Bit pointer within IBAY.
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
integer, dimension(:), allocatable mbyt
Length (in bytes) of current BUFR message for each internal I/O stream.
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.
integer, dimension(:), allocatable msub
Total number of data subsets in message.
integer, dimension(:), allocatable nsub
Current subset pointer within message.
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 declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
recursive subroutine readsb(LUNIT, IRET)
Read the next data subset from a BUFR message.
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
recursive subroutine ufbcpy(LUBIN, LUBOT)
Copy a BUFR data subset.
subroutine upb(NVAL, NBITS, IBAY, IBIT)
This subroutine decodes an integer value from within a specified number of bits of an integer array,...
recursive subroutine writsb(LUNIT)
Write a data subset into a BUFR message.
subroutine x48(IIN4, IOUT8, NVAL)
Encode one or more 4-byte integer values as 8-byte integer values.
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.