GETBIT
The GETBIT routine reads number of bits required to pack a given field
for particular binary and decimal scalings is computed.
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.
USAGE: CALL GTBITS(IBM,IBS,IDS,LEN,MG,G,GMIN,GMAX,NBIT)
Input argument list:
IBM - INTEGER BITMAP FLAG (=0 FOR NO BITMAP)
IBS - INTEGER BINARY SCALING
(E.G. IBS=3 TO ROUND FIELD TO NEAREST EIGHTH VALUE)
IDS - INTEGER DECIMAL SCALING
(E.G. IDS=3 TO ROUND FIELD TO NEAREST MILLI-VALUE)
(NOTE THAT IDS AND IBS CAN BOTH BE NONZERO,
E.G. IDS=1 AND IBS=1 ROUNDS TO THE NEAREST TWENTIETH)
LEN - INTEGER LENGTH OF THE FIELD AND BITMAP
MG - INTEGER (LEN) BITMAP IF IBM=1 (0 TO SKIP, 1 TO KEEP)
G - REAL (LEN) FIELD
Output argument list:
GROUND - REAL (LEN) FIELD ROUNDED TO DECIMAL AND BINARY SCALING
(SET TO ZERO WHERE BITMAP IS 0 IF IBM=1)
GMIN - REAL MINIMUM VALID ROUNDED FIELD VALUE
GMAX - REAL MAXIMUM VALID ROUNDED FIELD VALUE
NBIT - INTEGER NUMBER OF BITS TO PACK
W3lib.tar |
Library contains Fortran 90 decoder/encoder
routines for GRIB edition 1. (Fortran90)
Date posted: 2/22/2007 |