NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
nmwrd.f
Go to the documentation of this file.
1 C> @file
2 C> @author ATOR @date 2005-11-29
3 
4 C> GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A
5 C> BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT OF MACHINE WORDS
6 C> (I.E. INTEGER ARRAY MEMBERS) THAT WILL HOLD THE ENTIRE MESSAGE.
7 C> NOTE THAT THIS COUNT MAY BE GREATER THAN THE MINIMUM NUMBER
8 C> OF WORDS REQUIRED TO HOLD THE MESSAGE.
9 C>
10 C> PROGRAM HISTORY LOG:
11 C> 2005-11-29 J. ATOR -- ORIGINAL AUTHOR
12 C>
13 C> USAGE: NMWRD (MBAY)
14 C> INPUT ARGUMENT LIST:
15 C> MBAY - INTEGER: *-WORD ARRAY CONTAINING SECTION ZERO
16 C> FROM A BUFR MESSAGE
17 C>
18 C> OUTPUT ARGUMENT LIST:
19 C> NMWRD - INTEGER: BUFR MESSAGE LENGTH (IN MACHINE WORDS)
20 C>
21 C> REMARKS:
22 C> THIS ROUTINE CALLS: IUPBS01
23 C> THIS ROUTINE IS CALLED BY: CNVED4 CPDXMM LMSG MSGWRT
24 C> PADMSG UFBMEM UFBMEX
25 C> Also called by application programs.
26 C>
27  FUNCTION nmwrd(MBAY)
28 
29 
30 
31  COMMON /hrdwrd/ nbytw,nbitw,iord(8)
32 
33  dimension mbay(*)
34 
35 C-----------------------------------------------------------------------
36 C-----------------------------------------------------------------------
37 
38  lenm = iupbs01(mbay,'LENM')
39  IF(lenm.EQ.0) THEN
40  nmwrd = 0
41  ELSE
42  nmwrd = ((lenm/8)+1)*(8/nbytw)
43  ENDIF
44 
45  RETURN
46  END
function nmwrd(MBAY)
GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT ...
Definition: nmwrd.f:27
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message...
Definition: iupbs01.f:73