NCEPLIBS-bufr
12.0.1
|
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... | |
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().
[in] | LUNIN | - integer: Fortran logical unit number for source BUFR file. |
[in] | LUNOT | - integer: Fortran logical unit number for target BUFR file. |
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().