REAL*8 FUNCTION AP_NPQC ( qcr ) C************************************************************************ C* AP_NPQC * C* * C* Given a MADIS QCR value, this function computes and returns a * C* corresponding value from BUFR flag table 0-25-034. * C* * C* AP_NPQC ( QCR ) * C* * C* Input parameters: * C* QCR REAL MADIS QCR value * C* * C* Output parameters: * C* AP_NPQC REAL*8 BUFR flag table 0-25-034 value * C** * C* Log: * C* J. Ator/NCEP 10/08 * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'apcmn.cmn' C* REAL*8 PKFTBV C*----------------------------------------------------------------------- AP_NPQC = 0 C iqcr = INT ( qcr ) C C* Check for failure of the MADIS time-height consistency check. C* This corresponds to failure of NOAA profiler "Test A". C IF ( IAND ( iqcr, 512 ) .gt. 0 ) THEN AP_NPQC = AP_NPQC + PKFTBV ( 4, 1 ) END IF C C* Check for failure of either the MADIS internal consistency C* check or the MADIS validity check. Failure of either one C* corresponds to failure of NOAA profiler "Test B". C IF ( ( IAND ( iqcr, 8 ) .gt. 0 ) .or. + ( IAND ( iqcr, 2 ) .gt. 0 ) ) THEN AP_NPQC = AP_NPQC + PKFTBV ( 4, 2 ) END IF C* RETURN END