updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / bufr / nmwrd.f
blob277975cbe1811c7a9cc9ba912980d35a61af6d37
1 FUNCTION NMWRD(MBAY)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: NMWRD
6 C PRGMMR: ATOR ORG: NP12 DATE: 2005-11-29
8 C ABSTRACT: GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A
9 C BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT OF MACHINE WORDS
10 C (I.E. INTEGER ARRAY MEMBERS) THAT WILL HOLD THE ENTIRE MESSAGE.
11 C NOTE THAT THIS COUNT MAY BE GREATER THAN THE MINIMUM NUMBER
12 C OF WORDS REQUIRED TO HOLD THE MESSAGE.
14 C PROGRAM HISTORY LOG:
15 C 2005-11-29 J. ATOR -- ORIGINAL AUTHOR
17 C USAGE: NMWRD (MBAY)
18 C INPUT ARGUMENT LIST:
19 C MBAY - INTEGER: *-WORD ARRAY CONTAINING SECTION ZERO
20 C FROM A BUFR MESSAGE
22 C OUTPUT ARGUMENT LIST:
23 C NMWRD - INTEGER: BUFR MESSAGE LENGTH (IN MACHINE WORDS)
25 C REMARKS:
26 C THIS ROUTINE CALLS: IUPBS01
27 C THIS ROUTINE IS CALLED BY: CNVED4 CPDXMM LMSG MSGWRT
28 C PADMSG STBFDX UFBMEM UFBMEX
29 C Also called by application programs.
31 C ATTRIBUTES:
32 C LANGUAGE: FORTRAN 77
33 C MACHINE: PORTABLE TO ALL PLATFORMS
35 C$$$
37 COMMON /HRDWRD/ NBYTW,NBITW,IORD(8)
39 DIMENSION MBAY(*)
41 C-----------------------------------------------------------------------
42 C-----------------------------------------------------------------------
44 LENM = IUPBS01(MBAY,'LENM')
45 IF(LENM.EQ.0) THEN
46 NMWRD = 0
47 ELSE
48 NMWRD = ((LENM/8)+1)*(8/NBYTW)
49 ENDIF
51 RETURN
52 END