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

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.
 

Detailed Description

The number of bits required to pack a given field.

Author
Mark Iredell
Date
1992-10-31

Definition in file gtbits.f.

Function/Subroutine Documentation

◆ gtbits()

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:

  • Mark Iredell 1992-10-31
Parameters
[in]ibminteger bitmap flag (=0 for no bitmap).
[in]idsinteger decimal scaling (e.g. ids=3 to round field to nearest milli-value).
[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 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.
Author
Mark Iredell
Date
1992-10-31

Definition at line 27 of file gtbits.f.