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