NCEPLIBS-bufr 11.7.1
maxout.f
Go to the documentation of this file.
1C> @file
2C> @brief Define a customized maximum length for output BUFR messages.
3
4C> This subroutine allows the user to define the maximum length of a
5C> BUFR message that can be written to an output file by the BUFRLIB
6C> software.
7C>
8C> This subroutine can be called from within an application program at
9C> any time after the initial call to subroutine openbf(), and the
10C> specified value MAXO will then be used for all future BUFR messages
11C> written by the software to all output files for the remainder of
12C> the program, unless another call is made to this same subroutine
13C> to reset the value of MAXO again. Otherwise, if this subroutine
14C> is never called, a default maximum message length is used for all
15C> output files, as set via an initial internal call to subroutine
16C> bfrini().
17C>
18C> @authors J. Woollen
19C> @authors J. Ator
20C> @date 2002-05-14
21C>
22C> @param[in] MAXO -- integer: New maximum length (in bytes) for
23C> all BUFR messages written to all output files
24C> - 0 = Set MAXO to the maximum value allowed
25C> by the BUFRLIB software
26C>
27C> <b>Program history log:</b>
28C> | Date | Programmer | Comments |
29C> | -----|------------|----------|
30C> | 2002-05-14 | J. Woollen | Original author |
31C> | 2004-08-09 | J. Ator | Maximum message length increased from 20,000 to 50,000 bytes |
32C> | 2006-04-14 | J. Ator | Added MAXO=0 option and overflow check |
33C> | 2009-03-23 | D. Keyser | No longer print record length change diagnostic if requested record length is the same as the previous value |
34C> | 2009-04-21 | J. Ator | Use errwrt() |
35C> | 2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
36C> | 2015-09-24 | D. Stokes | Correct typos in docblock |
37C>
38 SUBROUTINE maxout(MAXO)
39
40 USE modv_mxmsgl
41
42 USE moda_bitbuf
43
44 COMMON /maxcmp/ maxcmb,maxrow,maxcol,ncmsgs,ncsubs,ncbyts
45 COMMON /dxtab / maxdx,idxv,nxstr(10),ldxa(10),ldxb(10),ldxd(10),
46 . ld30(10),dxstr(10)
47 COMMON /quiet / iprt
48
49 CHARACTER*128 ERRSTR
50 CHARACTER*56 DXSTR
51
52C-----------------------------------------------------------------------
53C-----------------------------------------------------------------------
54
55 IF((maxo.EQ.0).OR.(maxo.GT.mxmsgl)) THEN
56 newsiz = mxmsgl
57 ELSE
58 newsiz = maxo
59 ENDIF
60
61 IF(iprt.GE.0) THEN
62 IF(maxbyt.NE.newsiz) THEN
63 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
64 WRITE ( unit=errstr, fmt='(A,A,I7,A,I7)' )
65 . 'BUFRLIB: MAXOUT - THE RECORD LENGTH OF ALL BUFR MESSAGES ',
66 . 'CREATED FROM THIS POINT ON IS BEING CHANGED FROM ', maxbyt,
67 . ' TO ', newsiz
68 CALL errwrt(errstr)
69 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
70 CALL errwrt(' ')
71 ENDIF
72 ENDIF
73
74 maxbyt = newsiz
75 maxcmb = newsiz
76 maxdx = newsiz
77
78 RETURN
79 END
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:42
subroutine maxout(MAXO)
This subroutine allows the user to define the maximum length of a BUFR message that can be written to...
Definition: maxout.f:39
This module contains array and variable declarations used to store BUFR messages internally for multi...
Definition: moda_bitbuf.F:10
integer maxbyt
Maximum length of an output BUFR message.
Definition: moda_bitbuf.F:22
This module declares and initializes the MXMSGL variable.
Definition: modv_MXMSGL.f:13
integer mxmsgl
Maximum length (in bytes) of a BUFR message that can be read or written by the BUFRLIB software.
Definition: modv_MXMSGL.f:22