NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
isetprm.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Define a customized parameter value for dynamic allocation.
3 
4 C> This function sets a specified parameter to a specified value for
5 C> use in dynamically allocating one or more internal arrays within
6 C> the BUFRLIB software.
7 C>
8 C> <p>A separate call to this
9 C> function must be made for each parameter that is to be set to a
10 C> customized value, and all such calls must be made prior to the
11 C> first call to subroutine openbf() from within an application
12 C> program, because that is when all internal arrays are dynamically
13 C> allocated based on the parameter values in effect at the time.
14 C> Otherwise, if this function is never called for a particular
15 C> parameter, then an internal default value for that parameter is
16 C> used instead.
17 C>
18 C> @author J. Ator
19 C> @date 2014-12-04
20 C>
21 C> @param[in] CPRMNM -- character*(*): Parameter to be changed from its
22 C> internal default value
23 C> - 'MXMSGL' = Maximum length (in bytes) of a BUFR
24 C> message
25 C> - 'MAXSS' = Maximum number of data values in an
26 C> uncompressed BUFR subset
27 C> - 'MXCDV' = Maximum number of data values that
28 C> can be written into a compressed BUFR
29 C> subset
30 C> - 'MXLCC' = Maximum length (in bytes) of a
31 C> character string that can be written
32 C> into a compressed BUFR subset
33 C> - 'MXCSB' = Maximum number of subsets that can be
34 C> written into a compressed BUFR
35 C> message
36 C> - 'NFILES' = Maximum number of BUFR files that can
37 C> be accessed for reading or writing at
38 C> any one time
39 C> - 'MAXTBA' = Maximum number of entries in internal
40 C> BUFR Table A per BUFR file
41 C> - 'MAXTBB' = Maximum number of entries in internal
42 C> BUFR Table B per BUFR file
43 C> - 'MAXTBD' = Maximum number of entries in internal
44 C> BUFR Table D per BUFR file
45 C> - 'MAXMEM' = Maximum number of bytes that can be
46 C> used to store BUFR messages in
47 C> internal memory
48 C> - 'MAXMSG' = Maximum number of BUFR messages that
49 C> can be stored in internal memory
50 C> - 'MXDXTS' = Maximum number of dictionary tables
51 C> that can be stored for use with BUFR
52 C> messages in internal memory
53 C> - 'MXMTBB' = Maximum number of master Table B
54 C> entries
55 C> - 'MXMTBD' = Maximum number of master Table D
56 C> entries
57 C> - 'MXMTBF' = Maximum number of master Code/Flag
58 C> entries
59 C> - 'MAXCD' = Maximum number of child descriptors
60 C> in a Table D descriptor sequence
61 C> definition
62 C> - 'MAXJL' = Maximum number of entries in the
63 C> internal jump/link table
64 C> - 'MXS01V' = Maximum number of default Section 0
65 C> or Section 1 values that can be
66 C> overwritten within an output BUFR
67 C> message
68 C> - 'MXBTM' = Maximum number of bitmaps that can be
69 C> stored internally for a BUFR subset
70 C> - 'MXBTMSE' = Maximum number of entries that can
71 C> be set within a bitmap
72 C> - 'MXTAMC' = Maximum number of Table A mnemonics
73 C> in the internal jump/link table which
74 C> contain at least one Table C operator
75 C> with XX >= 21 in their subset definition
76 C> - 'MXTCO' = Maximum number of Table C operators
77 C> with XX >= 21 in the subset definition
78 C> of a Table A mnemonic
79 C> - 'MXNRV' = Maximum number of 2-03 reference
80 C> values in the internal jump/link
81 C> table
82 C> - 'MXRST' = Maximum number of long character
83 C> strings that can be read from a
84 C> compressed subset
85 C> @param[in] IPVAL -- integer: Value to be set for CPRMNM
86 C> @returns isetprm -- integer: return code
87 C> - 0 = normal return
88 C> - -1 = Unknown CPRMNM
89 C>
90 C> <b>Program history log:</b>
91 C> | Date | Programmer | Comments |
92 C> | -----|------------|----------|
93 C> | 2014-12-04 | J. Ator | Original author |
94 C> | 2016-05-24 | J. Ator | Add MXNRV, MXBTM, MXBTMSE, MXTCO |
95 C> | 2017-04-03 | J. Ator | Add MXTAMC |
96 C> | 2017-05-22 | J. Ator | Add MXRST |
97 C> | 2017-10-17 | J. Ator | Add MXMTBF |
98 C>
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 
129 C-----------------------------------------------------------------------
130 C-----------------------------------------------------------------------
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
This module declares and initializes the MXNRV variable.
Definition: modv_MXNRV.f:13
This module declares and initializes the MXMTBD variable.
Definition: modv_MXMTBD.f:13
This module declares and initializes the MXS01V variable.
Definition: modv_MXS01V.f:13
This module declares and initializes the NFILES variable.
Definition: modv_NFILES.f90:13
This module declares and initializes the MXMTBF variable.
Definition: modv_MXMTBF.f:13
This module declares and initializes the MAXMEM variable.
Definition: modv_MAXMEM.f:13
This module declares and initializes the MXMSGL variable.
Definition: modv_MXMSGL.f:13
This module declares and initializes the MXCSB variable.
Definition: modv_MXCSB.f:13
This module declares and initializes the MXTAMC variable.
Definition: modv_MXTAMC.f:13
This module declares and initializes the MXDXTS variable.
Definition: modv_MXDXTS.f:13
This module declares and initializes the MXBTMSE variable.
Definition: modv_MXBTMSE.f:13
This module declares and initializes the MAXJL variable.
Definition: modv_MAXJL.f:13
This module declares and initializes the MXTCO variable.
Definition: modv_MXTCO.f:13
This module declares and initializes the MAXSS variable.
Definition: modv_MAXSS.f:13
This module declares and initializes the MXBTM variable.
Definition: modv_MXBTM.f:13
This module declares and initializes the MXCDV variable.
Definition: modv_MXCDV.f:13
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:41
This module declares and initializes the MAXTBB variable.
Definition: modv_MAXTBB.f:13
This module declares and initializes the MAXCD variable.
Definition: modv_MAXCD.f90:13
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:99
This module declares and initializes the MXLCC variable.
Definition: modv_MXLCC.f:13
This module declares and initializes the MXRST variable.
Definition: modv_MXRST.f:13
This module declares and initializes the MAXTBD variable.
Definition: modv_MAXTBD.f:13
This module declares and initializes the MAXTBA variable.
Definition: modv_MAXTBA.f:13
This module declares and initializes the MXMTBB variable.
Definition: modv_MXMTBB.f:13
This module declares and initializes the MAXMSG variable.
Definition: modv_MAXMSG.f:13