NCEPLIBS-bufr
11.6.0
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | msgupd (LUNIT, LUN) |
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF) AND THEN TRIES TO ADD IT TO THE BUFR MESSAGE THAT IS CURRENTLY OPEN WITHIN MEMORY FOR LUNIT (ARRAY MBAY IN MODULE BITBUF). More... | |
Definition in file msgupd.f.
subroutine msgupd | ( | LUNIT, | |
LUN | |||
) |
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF) AND THEN TRIES TO ADD IT TO THE BUFR MESSAGE THAT IS CURRENTLY OPEN WITHIN MEMORY FOR LUNIT (ARRAY MBAY IN MODULE BITBUF).
IF THE SUBSET WILL NOT FIT INTO THE CURRENTLY OPEN MESSAGE, OR IF THE SUBSET BYTE COUNT EXCEEDS 65530 (SUFFICIENTLY CLOSE TO THE 16-BIT BYTE COUNTER UPPER LIMIT OF 65535), THEN THAT MESSAGE IS FLUSHED TO LUNIT AND A NEW ONE IS CREATED IN ORDER TO HOLD THE CURRENT SUBSET. ANY SUBSET WITH BYTE COUNT > 65530 WILL BE WRITTEN INTO ITS OWN ONE-SUBSET MESSAGE. IF THE CURRENT SUBSET IS LARGER THAN THE MAXIMUM MESSAGE LENGTH, THEN THE SUBSET IS DISCARDED AND A DIAGNOSTIC IS PRINTED.
PROGRAM HISTORY LOG: 1994-01-06 J. WOOLLEN – ORIGINAL AUTHOR 1998-07-08 J. WOOLLEN – REPLACED CALL TO CRAY LIBRARY ROUTINE "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB ROUTINE "BORT" 1998-12-14 J. WOOLLEN – NO LONGER CALLS BORT IF A SUBSET IS LARGER THAN A MESSAGE, JUST DISCARDS THE SUBSET 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 2003-11-04 J. ATOR – ADDED DOCUMENTATION 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – UNIFIED/PORTABLE FOR WRF; ADDED HISTORY DOCUMENTATION 2004-08-09 J. ATOR – MAXIMUM MESSAGE LENGTH INCREASED FROM 20,000 TO 50,000 BYTES 2009-03-23 J. ATOR – USE MSGFULL AND ERRWRT 2014-10-20 J. WOOLLEN – ACCOUNT FOR SUBSETS WITH BYTE COUNT > 65530 (THESE MUST BE WRITTEN INTO THEIR OWN ONE-SUBSET MESSAGE) 2014-10-20 D. KEYSER – FOR CASE ABOVE, DO NOT WRITE "CURRENT" MESSAGE IF IT CONTAINS ZERO SUBSETS 2014-12-10 J. ATOR – USE MODULES INSTEAD OF COMMON BLOCKS 2016-03-21 D. STOKES – CALL USRTPL FOR OVERLARGE SUBSETS
USAGE: CALL MSGUPD (LUNIT, LUN) INPUT ARGUMENT LIST: LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS (ASSOCIATED WITH FILE CONNECTED TO LOGICAL UNIT LUNIT)
REMARKS: THIS ROUTINE CALLS: ERRWRT IUPB MSGFULL MSGINI MSGWRT MVB PAD PKB USRTPL WRITLC THIS ROUTINE IS CALLED BY: WRITSA WRITSB Normally not called by any application programs.
Definition at line 59 of file msgupd.f.
References errwrt(), iupb(), msgfull(), msgini(), msgwrt(), mvb(), pad(), pkb(), usrtpl(), and writlc().