NCEPLIBS-bufr  12.0.1
copysb.f File Reference

Copy a BUFR data subset. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine copysb (LUNIN, LUNOT, IRET)
 This subroutine copies a BUFR data subset from one Fortran logical unit to another. More...
 

Detailed Description

Copy a BUFR data subset.

Author
J. Woollen
Date
1994-01-06

Definition in file copysb.f.

Function/Subroutine Documentation

◆ copysb()

recursive subroutine copysb (   LUNIN,
  LUNOT,
  IRET 
)

This subroutine copies a BUFR data subset from one Fortran logical unit to another.

Logical unit LUNIN should have already been opened for input operations via a previous call to subroutine openbf(), and a BUFR message should have already been read into internal arrays for LUNIN via a previous call to one of the message-reading subroutines.

Logical unit LUNOT should have already been opened for output operations via a previous call to subroutine openbf(), and a BUFR message should already be open for output within internal arrays via a previous call to one of the BUFRLIB message-writing subroutines.

The compression status of the data subset (i.e. compressed or uncompressed) will be preserved when copying from LUNIN to LUNOT.

If LUNOT < 0, then a data subset is read from the BUFR message in internal arrays for LUNIN but is not copied to the BUFR message in internal arrays for LUNOT. Otherwise, the DX BUFR Table information associated with each of the logical units LUNIN and LUNOT must contain identical definitions for the type of BUFR message containing the data subset to be copied from LUNIN to LUNOT.

Parameters
[in]LUNIN– integer: Fortran logical unit number for source BUFR file
[in]LUNOT– integer: Fortran logical unit number for target BUFR file
[out]IRET– integer: return code
  • 0 = normal return
  • -1 = a BUFR data subset could not be read from the BUFR message in internal arrays for LUNIN
Author
J. Woollen
Date
1994-01-06

Definition at line 43 of file copysb.f.

References bort(), cmpmsg(), cpyupd(), getlens(), moda_bitbuf::ibit, modv_im8b::im8b, moda_msgcwd::inode, iok2cpy(), moda_bitbuf::mbay, moda_bitbuf::mbyt, mesgbc(), moda_msgcwd::msub, moda_msgcwd::nsub, readsb(), status(), moda_tables::tag, ufbcpy(), upb(), writsb(), x48(), and x84().

Referenced by icopysb().