NCEPLIBS-bufr  12.0.1
copymg.f File Reference

Copy a BUFR message from one file to another. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine copymg (LUNIN, LUNOT)
 Copy a BUFR message from one file to another. More...
 

Detailed Description

Copy a BUFR message from one file to another.

Author
J. Woollen
Date
1994-01-06

Definition in file copymg.f.

Function/Subroutine Documentation

◆ copymg()

recursive subroutine copymg (   LUNIN,
  LUNOT 
)

Copy a BUFR message from one file to another.

This subroutine is similar to subroutine cpymem(), except that it copies a BUFR message from one Fortran logical unit to another, whereas cpymem() copies a BUFR message from internal arrays in memory to a specified Fortran logical unit.

Logical unit LUNIN should have already been opened for input operations via a previous call to subroutine openbf(). 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(), but there should not be any BUFR message already open for output within the internal arrays for LUNOT via a previous call to one of the message-writing subroutines.

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 to be copied from LUNIN to LUNOT.

This subroutine uses subroutine msgwrt() to write to LUNOT; therefore, it can be used to transform a copy of the original BUFR message from LUNIN with any or all of the updates described in the documentation for subroutine msgwrt().

Parameters
[in]LUNIN- integer: Fortran logical unit number for source BUFR file.
[in]LUNOT- integer: Fortran logical unit number for target BUFR file.
Author
J. Woollen
Date
1994-01-06

Definition at line 41 of file copymg.f.

References bort(), moda_msgcwd::idate, modv_im8b::im8b, moda_msgcwd::inode, iok2cpy(), iupbs01(), moda_bitbuf::mbay, msgwrt(), moda_msgcwd::msub, nemtba(), moda_msgcwd::nmsg, moda_msgcwd::nsub, status(), moda_tables::tag, and x84().

Referenced by split_by_subset().