NCEPLIBS-bufr 11.7.1
copymg.f File Reference

Copy a BUFR message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine copymg (LUNIN, LUNOT)
 This subroutine copies a BUFR message from one Fortran logical unit to another. More...
 

Detailed Description

Copy a BUFR message.

Definition in file copymg.f.

Function/Subroutine Documentation

◆ copymg()

subroutine copymg (   LUNIN,
  LUNOT 
)

This subroutine copies a BUFR message from one Fortran logical unit 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.

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

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(), 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 BUFRLIB 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.

Remarks
  • 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().

Program history log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
1998-07-08 J. Woollen Replaced call to Cray library routine "ABORT" with call to new internal routine bort()
1999-11-18 J. Woollen The number of BUFR files which can be opened at one time increased from 10 to 32 (necessary in order to process multiple BUFR files under the MPI)
2000-09-19 J. Woollen Maximum message length increased from 10,000 to 20,000 bytes
2004-08-09 J. Ator Maximum message length increased from 20,000 to 50,000 bytes
2005-11-29 J. Ator Use iupbs01()
2009-06-26 J. Ator Use iok2cpy()
2014-12-10 J. Ator Use modules instead of COMMON blocks

Definition at line 55 of file copymg.f.

References bort(), iok2cpy(), iupbs01(), moda_bitbuf::mbay, msgwrt(), nemtba(), status(), and moda_tables::tag.

Referenced by split_by_subset().