NCEPLIBS-bufr  12.0.0
isetprm.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Define a customized parameter value for dynamic allocation.
3 C>
4 C> @author J. Ator @date 2014-12-04
5 
6 C> Define a customized parameter value for dynamic allocation.
7 C>
8 C> This function sets a specified parameter to a specified value for
9 C> use in dynamically allocating one or more internal arrays within
10 C> the BUFRLIB software.
11 C>
12 C> A separate call to this
13 C> function must be made for each parameter that is to be set to a
14 C> customized value, and all such calls must be made prior to the
15 C> first call to subroutine openbf() from within an application
16 C> program, because that is when all internal arrays are dynamically
17 C> allocated based on the parameter values in effect at the time.
18 C> Otherwise, if this function is never called for a particular
19 C> parameter, then an internal default value for that parameter is
20 C> used instead.
21 C>
22 C> @param[in] CPRMNM - character*(*): Parameter to be changed from its
23 C> internal default value:
24 C> - 'MXMSGL' = Maximum length (in bytes) of a BUFR message.
25 C> - 'MAXSS' = Maximum number of data values in an uncompressed BUFR
26 C> subset.
27 C> - 'MXCDV' = Maximum number of data values that can be written into a
28 C> compressed BUFR subset.
29 C> - 'MXLCC' = Maximum length (in bytes) of a character string that can
30 C> be written into a compressed BUFR subset.
31 C> - 'MXCSB' = Maximum number of subsets that can be written into a
32 C> compressed BUFR message.
33 C> - 'NFILES' = Maximum number of BUFR files that can be accessed for
34 C> reading or writing at any one time.
35 C> - 'MAXTBA' = Maximum number of entries in internal BUFR Table A per
36 C> BUFR file.
37 C> - 'MAXTBB' = Maximum number of entries in internal BUFR Table B per
38 C> BUFR file.
39 C> - 'MAXTBD' = Maximum number of entries in internal BUFR Table D per
40 C> BUFR file.
41 C> - 'MAXMEM' = Maximum number of bytes that can be used to store BUFR
42 C> messages in internal memory.
43 C> - 'MAXMSG' = Maximum number of BUFR messages that can be stored in
44 C> internal memory.
45 C> - 'MXDXTS' = Maximum number of dictionary tables that can be stored
46 C> for use with BUFR messages in internal memory.
47 C> - 'MXMTBB' = Maximum number of master Table B entries.
48 C> - 'MXMTBD' = Maximum number of master Table D entries.
49 C> - 'MXMTBF' = Maximum number of master Code/Flag entries.
50 C> - 'MAXCD' = Maximum number of child descriptors in a Table D
51 C> descriptor sequence definition.
52 C> - 'MAXJL' = Maximum number of entries in the internal jump/link table.
53 C> - 'MXS01V' = Maximum number of default Section 0 or Section 1 values
54 C> that can be overwritten within an output BUFR message.
55 C> - 'MXBTM' = Maximum number of bitmaps that can be stored internally
56 C> for a BUFR subset.
57 C> - 'MXBTMSE' = Maximum number of entries that can be set within a bitmap.
58 C> - 'MXTAMC' = Maximum number of Table A mnemonics in the internal
59 C> jump/link table which contain at least one Table C operator with
60 C> XX >= 21 in their subset definition.
61 C> - 'MXTCO' = Maximum number of Table C operators with XX >= 21 in the
62 C> subset definition of a Table A mnemonic.
63 C> - 'MXNRV' = Maximum number of 2-03 reference values in the internal
64 C> jump/link table.
65 C> - 'MXRST' = Maximum number of long character strings that can be
66 C> read from a compressed subset.
67 C> - 'MXH4WLC' = Maximum number of long character strings that can be
68 C> stored internally.
69 C> @param[in] IPVAL - integer: Value to be set for CPRMNM
70 C> @returns isetprm - integer:
71 C> - 0 = normal return
72 C> - -1 = Unknown CPRMNM
73 C>
74 C> @author J. Ator @date 2014-12-04
75  RECURSIVE FUNCTION isetprm ( CPRMNM, IPVAL ) RESULT ( IRET )
76 
77  USE modv_maxss
78  USE modv_nfiles
79  USE modv_mxmsgl
80  USE modv_mxdxts
81  USE modv_maxmsg
82  USE modv_maxmem
83  USE modv_maxtba
84  USE modv_maxtbb
85  USE modv_maxtbd
86  USE modv_maxjl
87  USE modv_mxcdv
88  USE modv_mxlcc
89  USE modv_mxcsb
90  USE modv_mxmtbb
91  USE modv_mxmtbd
92  USE modv_mxmtbf
93  USE modv_maxcd
94  USE modv_mxs01v
95  USE modv_mxbtm
96  USE modv_mxbtmse
97  USE modv_mxtamc
98  USE modv_mxtco
99  USE modv_mxnrv
100  USE modv_mxrst
101  USE modv_im8b
102  USE modv_mxh4wlc
103 
104  CHARACTER*(*) cprmnm
105  CHARACTER*128 errstr
106 
107 C-----------------------------------------------------------------------
108 C-----------------------------------------------------------------------
109 
110 C Check for I8 integers.
111 
112  IF ( im8b ) THEN
113  im8b = .false.
114 
115  CALL x84 ( ipval, my_ipval, 1 )
116  iret = isetprm( cprmnm, my_ipval )
117 
118  im8b = .true.
119  RETURN
120  ENDIF
121 
122  iret = 0
123  IF ( cprmnm .EQ. 'MAXSS' ) THEN
124  maxss = ipval
125  ELSE IF ( cprmnm .EQ. 'NFILES' ) THEN
126  nfiles = ipval
127  ELSE IF ( cprmnm .EQ. 'MXMSGL' ) THEN
128  mxmsgl = ipval
129  ELSE IF ( cprmnm .EQ. 'MXDXTS' ) THEN
130  mxdxts = ipval
131  ELSE IF ( cprmnm .EQ. 'MAXMSG' ) THEN
132  maxmsg = ipval
133  ELSE IF ( cprmnm .EQ. 'MAXMEM' ) THEN
134  maxmem = ipval
135  ELSE IF ( cprmnm .EQ. 'MAXTBA' ) THEN
136  maxtba = ipval
137  ELSE IF ( cprmnm .EQ. 'MAXTBB' ) THEN
138  maxtbb = ipval
139  ELSE IF ( cprmnm .EQ. 'MAXTBD' ) THEN
140  maxtbd = ipval
141  ELSE IF ( cprmnm .EQ. 'MAXJL' ) THEN
142  maxjl = ipval
143  ELSE IF ( cprmnm .EQ. 'MXCDV' ) THEN
144  mxcdv = ipval
145  ELSE IF ( cprmnm .EQ. 'MXLCC' ) THEN
146  mxlcc = ipval
147  ELSE IF ( cprmnm .EQ. 'MXCSB' ) THEN
148  mxcsb = ipval
149  ELSE IF ( cprmnm .EQ. 'MXMTBB' ) THEN
150  mxmtbb = ipval
151  ELSE IF ( cprmnm .EQ. 'MXMTBD' ) THEN
152  mxmtbd = ipval
153  ELSE IF ( cprmnm .EQ. 'MXMTBF' ) THEN
154  mxmtbf = ipval
155  ELSE IF ( cprmnm .EQ. 'MAXCD' ) THEN
156  maxcd = ipval
157  ELSE IF ( cprmnm .EQ. 'MXS01V' ) THEN
158  mxs01v = ipval
159  ELSE IF ( cprmnm .EQ. 'MXBTM' ) THEN
160  mxbtm = ipval
161  ELSE IF ( cprmnm .EQ. 'MXBTMSE' ) THEN
162  mxbtmse = ipval
163  ELSE IF ( cprmnm .EQ. 'MXTAMC' ) THEN
164  mxtamc = ipval
165  ELSE IF ( cprmnm .EQ. 'MXTCO' ) THEN
166  mxtco = ipval
167  ELSE IF ( cprmnm .EQ. 'MXNRV' ) THEN
168  mxnrv = ipval
169  ELSE IF ( cprmnm .EQ. 'MXRST' ) THEN
170  mxrst = ipval
171  ELSE IF ( cprmnm .EQ. 'MXH4WLC' ) THEN
172  mxh4wlc = ipval
173  ELSE
174  iret = -1
175  CALL errwrt('++++++++++++++++++WARNING+++++++++++++++++++')
176  errstr = 'BUFRLIB: ISETPRM - UNKNOWN INPUT PARAMETER '//
177  . cprmnm // ' -- NO ACTION WAS TAKEN'
178  CALL errwrt(errstr)
179  CALL errwrt('++++++++++++++++++WARNING+++++++++++++++++++')
180  ENDIF
181 
182  RETURN
183  END
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:36
recursive function isetprm(CPRMNM, IPVAL)
Define a customized parameter value for dynamic allocation.
Definition: isetprm.f:76
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
This module declares and initializes the MAXCD variable.
integer, public maxcd
Maximum number of child descriptors that can be included within the sequence definition of a Table D ...
This module declares and initializes the MAXJL variable.
integer maxjl
Maximum number of entries in the internal jump/link table.
This module declares and initializes the MAXMEM variable.
integer maxmem
Maximum number of bytes that can be used to store BUFR messages within internal memory.
This module declares and initializes the MAXMSG variable.
integer maxmsg
Maximum number of BUFR messages that can be stored within internal memory.
This module declares and initializes the MAXSS variable.
integer maxss
Maximum number of data values that can be read from or written into a data subset by the BUFRLIB soft...
This module declares and initializes the MAXTBA variable.
integer maxtba
Maximum number of entries in the internal BUFR Table A for each BUFR file that is connected to the BU...
This module declares and initializes the MAXTBB variable.
integer maxtbb
Maximum number of entries in the internal BUFR Table B for each BUFR file that is connected to the BU...
This module declares and initializes the MAXTBD variable.
integer maxtbd
Maximum number of entries in the internal BUFR Table D for each BUFR file that is connected to the BU...
This module declares and initializes the MXBTM variable.
integer mxbtm
Maximum number of bitmaps that can be stored internally for a data subset.
This module declares and initializes the MXBTMSE variable.
integer mxbtmse
Maximum number of "set" entries (set to a value of 0) within a bitmap.
This module declares and initializes the MXCDV variable.
integer mxcdv
Maximum number of data values that can be written into a data subset of a compressed BUFR message by ...
This module declares and initializes the MXCSB variable.
integer mxcsb
Maximum number of data subsets that can be written into a compressed BUFR message by the BUFRLIB soft...
This module declares and initializes the MXDXTS variable.
integer mxdxts
Maximum number of dictionary tables that can be stored for use with BUFR messages in internal memory.
This module declares and initializes the MXH4WLC variable.
integer mxh4wlc
Maximum number of long character strings that can be held for writing into an uncompressed BUFR subse...
This module declares and initializes the MXLCC variable.
integer mxlcc
Maximum length (in bytes) of a character string that can be written into a data subset of a compresse...
This module declares and initializes the MXMSGL variable.
integer mxmsgl
Maximum length (in bytes) of a BUFR message that can be read or written by the BUFRLIB software.
This module declares and initializes the MXMTBB variable.
integer mxmtbb
Maximum number of entries in a master BUFR Table B.
This module declares and initializes the MXMTBD variable.
integer mxmtbd
Maximum number of entries in a master BUFR Table D.
This module declares and initializes the MXMTBF variable.
This module declares and initializes the MXNRV variable.
integer mxnrv
Maximum number of entries in the internal jump/link table that can contain new reference values.
This module declares and initializes the MXRST variable.
integer mxrst
Maximum number of "long" character strings (greater than 8 bytes) that can be read from a data subset...
This module declares and initializes the MXS01V variable.
integer mxs01v
Maximum number of default Section 0 or Section 1 values that can be overwritten within an output BUFR...
This module declares and initializes the MXTAMC variable.
integer mxtamc
Maximum number of Table A mnemonics in the internal jump/link table which contain at least one Table ...
This module declares and initializes the MXTCO variable.
integer mxtco
Maximum number of Table C operators with an XX value of 21 or greater that can appear within the data...
This module declares and initializes the NFILES variable.
integer, public nfiles
Maximum number of BUFR files that can be connected to the BUFRLIB software (for reading or writing) a...
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19