NCEPLIBS-bufr  12.0.1
icopysb.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Copy a BUFR data subset.
3 C>
4 C> @author J. Woollen @date 1994-01-06
5 
6 C> This function calls BUFRLIB subroutine copysb() and passes
7 C> back its return code as the function value.
8 C>
9 C> @param[in] LUNIN -- integer: Fortran logical unit number for
10 C> source BUFR file
11 C> @param[in] LUNOT -- integer: Fortran logical unit number for
12 C> target BUFR file
13 C> @returns icopysb -- integer: return code
14 C> - 0 = normal return
15 C> - -1 = a BUFR data subset could not be
16 C> read from the BUFR message in
17 C> internal arrays for LUNIN
18 C>
19 C> @remarks
20 C> - The use of this function allows the return code from copysb() to be
21 C> used as the target variable within an iterative program loop.
22 C>
23 C> @author J. Woollen @date 1994-01-06
24  RECURSIVE FUNCTION icopysb(LUNIN,LUNOT) RESULT(IRET)
25 
26  USE modv_im8b
27 
28  IF(im8b) THEN
29  im8b=.false.
30 
31  CALL x84(lunin,my_lunin,1)
32  CALL x84(lunot,my_lunot,1)
33  iret=icopysb(my_lunin,my_lunot)
34 
35  im8b=.true.
36  RETURN
37  ENDIF
38 
39  CALL copysb(lunin,lunot,iret)
40 
41  RETURN
42  END
recursive subroutine copysb(LUNIN, LUNOT, IRET)
This subroutine copies a BUFR data subset from one Fortran logical unit to another.
Definition: copysb.f:44
recursive function icopysb(LUNIN, LUNOT)
This function calls BUFRLIB subroutine copysb() and passes back its return code as the function value...
Definition: icopysb.f:25
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 ...
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19