NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
getbit.f File Reference

Compute number of bits and round field. More...

Go to the source code of this file.

Functions/Subroutines

subroutine getbit (ibm, ibs, ids, len, mg, g, ground, gmin, gmax, nbit)
 The number of bits required to pack a given field.
 

Detailed Description

Compute number of bits and round field.

Author
Mark Iredell
Date
1992-10-31

Definition in file getbit.f.

Function/Subroutine Documentation

◆ getbit()

subroutine getbit (   ibm,
  ibs,
  ids,
  len,
dimension(len)  mg,
dimension(len)  g,
dimension(len)  ground,
  gmin,
  gmax,
  nbit 
)

The number of bits required to pack a given field.

The field is rounded off to the decimal scaling for packing. The minimum and maximum rounded field values are also returned. For particular binary and decimal scalings is computed. Grib bitmap masking for valid data is optionally used.

Program history log:

  • Mark Iredell 1996-09-16
Parameters
[in]IBMInteger bitmap flag (=0 for no bitmap).
[in]IBSInteger binary scaling (e.g. ibs=3 to round field to nearest eighth value).
[in]IDSInteger 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).
[in]LENInteger length of the field and bitmap.
[in]MGInteger (LEN) bitmap if ibm=1 (0 to skip, 1 to keep).
[in]GReal (LEN) field.
[out]GROUNDReal (LEN) field rounded to decimal and binary scaling (set to zero where bitmap is 0 if ibm=1).
[out]GMINReal minimum valid rounded field value.
[out]GMAXReal maximum valid rounded field value.
[out]NBITInteger number of bits to pack.
Note
CRAY FORTRAN
Author
Mark Iredell
Date
1992-10-31

Definition at line 32 of file getbit.f.