1 SUBROUTINE GETLENS(MBAY,LL,LEN0,LEN1,LEN2,LEN3,LEN4,LEN5)
3 !$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 ! PRGMMR: ATOR ORG: NP12 DATE: 2005-11-29
8 ! ABSTRACT: THIS SUBROUTINE UNPACKS AND RETURNS ALL OF THE INDIVIDUAL
9 ! SECTION LENGTHS OF THE BUFR MESSAGE STORED IN ARRAY MBAY, UP TO A
10 ! SPECIFIED POINT. IT WILL WORK ON ANY MESSAGE ENCODED USING BUFR
11 ! EDITION 2, 3 OR 4. THE START OF THE BUFR MESSAGE (I.E. THE STRING
12 ! "BUFR") MUST BE ALIGNED ON THE FIRST FOUR BYTES OF MBAY.
14 ! PROGRAM HISTORY LOG:
15 ! 2005-11-29 J. ATOR -- ORIGINAL AUTHOR
17 ! USAGE: CALL GETLENS (MBAY, LL, LEN0, LEN1, LEN2, LEN3, LEN4, LEN5)
18 ! INPUT ARGUMENT LIST:
19 ! MBAY - INTEGER: *-WORD PACKED BINARY ARRAY CONTAINING
21 ! LL - INTEGER: NUMBER OF LAST SECTION FOR WHICH THE LENGTH
22 ! IS TO BE UNPACKED. IN OTHER WORDS, SETTING LL = N
23 ! MEANS TO UNPACK THE LENGTHS OF SECTIONS 0 THROUGH N
24 ! (I.E. LEN0, LEN1,...,LEN(N)). ANY SECTION LENGTHS
25 ! THAT ARE NOT UNPACKED ARE RETURNED WITH A DEFAULT
28 ! OUTPUT ARGUMENT LIST:
29 ! LEN0 - LENGTH OF SECTION 0 (= -1 IF NOT UNPACKED)
30 ! LEN1 - LENGTH OF SECTION 1 (= -1 IF NOT UNPACKED)
31 ! LEN2 - LENGTH OF SECTION 2 (= -1 IF NOT UNPACKED)
32 ! LEN3 - LENGTH OF SECTION 3 (= -1 IF NOT UNPACKED)
33 ! LEN4 - LENGTH OF SECTION 4 (= -1 IF NOT UNPACKED)
34 ! LEN5 - LENGTH OF SECTION 5 (= -1 IF NOT UNPACKED)
37 ! THIS ROUTINE CALLS: IUPB IUPBS01
38 ! THIS ROUTINE IS CALLED BY: CKTABA CNVED4 DUMPBF MESGBC
39 ! MSGWRT RDBFDX UPDS3 WRITLC
40 ! Normally not called by application
41 ! programs but it could be.
44 ! LANGUAGE: FORTRAN 77
45 ! MACHINE: PORTABLE TO ALL PLATFORMS
51 !-----------------------------------------------------------------------
52 !-----------------------------------------------------------------------
62 LEN0 = IUPBS01(MBAY,'LEN0')
65 LEN1 = IUPBS01(MBAY,'LEN1')
69 LEN2 = IUPB(MBAY,IAD2+1,24) * IUPBS01(MBAY,'ISC2')
73 LEN3 = IUPB(MBAY,IAD3+1,24)
77 LEN4 = IUPB(MBAY,IAD4+1,24)
83 END SUBROUTINE GETLENS