--------------------
MADIS QC Information
--------------------

QC Data Descriptor Values
-------------------------

No QC available:

 Z - Preliminary, no QC

Automated QC checks:

 C - Coarse pass, passed level 1
 S - Screened, passed levels 1 and 2
 V - Verified, passed levels 1, 2, and 3
 X - Rejected/erroneous, failed level 1
 Q - Questioned, passed level 1, failed 2 or 3

     where level 1 = validity, position consistency, and provider QC checks
           level 2 = internal, temporal consistency, time-height consistency,
                     model consistency, statistical spatial consistency, 
                     hydrostatic, super adiabatic lapse rate, wind shear
           level 3 = spatial consistency check

Subjective intervention:

 G - Subjective good
 B - Subjective bad

Interpolated/Corrected observations:

 I - Interpolated
 W - Raw data was "wrong", has been corrected using estimates from automated QC checks
 T - Virtual temperature could not be calculated, air temperature passing all QC 
     checks has been returned

Bitmask for QC Applied and QC Results -- Surface, Hydro, Satellite winds
------------------------------------------------------------------------

 Bit       QC Check                              Decimal Value
 ---       --------                              -------------
  1        Master Check                                 1
  2        Validity Check                               2
  3        Reserved                                     4
  4        Internal Consistency Check                   8
  5        Temporal Consistency Check                  16
  6        Statistical Spatial Consistency Check       32
  7        Spatial Consistency Check                   64
  8        Reserved                                   128
  9        Reserved                                   256
 10        Reserved                                   512

Bitmask for QC Applied and QC Results -- Radiosonde, NOAA Profiler Network,
                                         ACARS, ACARSP, Radiometer, 
                                         Multi-Agency Profiler, WISDOM
---------------------------------------------------------------------------

 Bit       QC Check                              Decimal Value
 ---       --------                              -------------
  1        Master Check                                 1
  2        Validity Check                               2
  3        Position Consistency Check                   4
  4        Internal Consistency Check                   8
  5        Temporal Consistency Check                  16
  6        Hydrostatic Check                           32
  7        Reserved                                    64
  8        Super Adiabatic Lapse Rate Check           128
  9        Wind Shear Check                           256
 10        Time-Height Consistency Check              512
 11        Model Consistency Check                   1024
 12        Provider QC Check                         2048

The QC bitmask is used in the QC applied and QC result "words" returned
along with the QC data descriptor.  By examining the individual bits,
the user can determine which checks were actually applied, and the
pass/fail status of each check that was applied.

In the QC applied word, a bit value of 1 means the corresponding check
was applied, a bit value of 0 indicates the check wasn't applied.

In the QC results word, a bit value of 1 means the corresponding check
was applied and failed, a bit value of 0 indicates the check passed
(given that the check was applied).

The "Master Check" is used to summarize all of the checks in a single
bit.  If any check at all was applied, this bit will be set in the
QC applied word.  If the observation failed any QC check, it will be
set in the QC results word.

When read as decimal numbers, the different bits that are set in the
bitmask are summed together.  For example, a QC applied value of 67
should be interpreted as 1 + 2 + 64, meaning the validity and spatial
consistency checks were applied.