NCEPLIBS-w3emc 2.12.0
|
The number of bits required to pack a given field. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gtbits (ibm, ids, len, mg, g, ground, gmin, gmax, nbit) |
The number of bits required to pack a given field at a particular decimal scaling is computed using the field range. | |
subroutine gtbits | ( | ibm, | |
ids, | |||
len, | |||
dimension(len) | mg, | ||
dimension(len) | g, | ||
dimension(len) | ground, | ||
gmin, | |||
gmax, | |||
nbit | |||
) |
The number of bits required to pack a given field at a particular decimal scaling is computed using the field range.
The field is rounded off to the decimal scaling for packing. The minimum and maximum rounded field values are also returned. Grib bitmap masking for valid data is optionally used.
Program history log:
[in] | ibm | integer bitmap flag (=0 for no bitmap). |
[in] | ids | integer decimal scaling (e.g. ids=3 to round field to nearest milli-value). |
[in] | len | integer length of the field and bitmap. |
[in] | mg | integer (len) bitmap if ibm=1 (0 to skip, 1 to keep). |
[in] | g | real (len) field. |
[out] | ground | real (len) field rounded to decimal scaling (set to zero where bitmap is 0 if ibm=1). |
[out] | gmin | real minimum valid rounded field value. |
[out] | gmax | real maximum valid rounded field value. |
[out] | nbit | integer number of bits to pack. |