SUBROUTINE UA_RPD1 ( report, lenr, irptr, iret ) C************************************************************************ C* UA_RPD1 * C* * C* This subroutine decodes 51515 regional practice data. * C* * C* UA_RPD1 ( REPORT, LENR, IRPTR, IRET ) * C* * C* Input parameters: * C* REPORT CHAR* Report * C* LENR INTEGER Length of REPORT * C* * C* Input and output parameters: * C* IRPTR INTEGER Pointer within REPORT * C* * C* Output parameters: * C* IRET INTEGER Return code: * C* 0 = normal return * C* -1 = critical error in REPORT * C* or reached end of REPORT * C** * C* Log: * C* J. Ator/NCEP 03/96 * C* J. Ator/NCEP 12/97 New interface format, style changes * C* J. Ator/NCEP 10/99 Clean up function declarations * C* C. Caruso Magee/NCEP 01/03 Add code to only decode this section if * C* found in Part B of a Region 6 report. * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'uacmn.cmn' C* CHARACTER*(*) report C* CHARACTER coun*2 C------------------------------------------------------------------------ iret = 0 C C* Retrieve the region number from the interface arrays. C wmor = rivals ( irwmor ) C C* Retrieve the country ID from the interface arrays. C coun = civals ( iccoun ) (1:2) C C* Based upon the region number and the country ID, C* decode the 51515 regional practice data. C IF ( INT ( wmor ) .eq. 0 ) THEN IF ( coun .eq. 'US' ) THEN CALL UA_101G ( report, lenr, irptr, iret ) ELSE IF ( coun .eq. 'UK' ) THEN CALL UA_AWDD ( report, lenr, irptr, iret ) ELSE logmsg = 'regional' CALL DC_WLOG ( 2, 'UA', 3, logmsg, ierwlg ) END IF ELSE IF ( INT ( wmor ) .eq. 2 ) THEN IF ( coun .eq. 'HK' ) THEN CALL UA_AWDD ( report, lenr, irptr, iret ) ELSE logmsg = 'regional' CALL DC_WLOG ( 2, 'UA', 3, logmsg, ierwlg ) END IF ELSE IF ( INT ( wmor ) .eq. 4 ) THEN CALL UA_101G ( report, lenr, irptr, iret ) ELSE IF ( INT ( wmor ) .eq. 5 ) THEN IF ( ( coun .eq. 'US' ) .or. + ( coun .eq. 'WK' ) .or. + ( coun .eq. 'KA' ) .or. + ( coun .eq. 'MH' ) .or. + ( coun .eq. 'ZM' ) .or. + ( coun .eq. 'MY' ) ) THEN CALL UA_101G ( report, lenr, irptr, iret ) ELSE logmsg = 'regional' CALL DC_WLOG ( 2, 'UA', 3, logmsg, ierwlg ) END IF ELSE IF ( INT ( wmor ) .eq. 6 ) THEN IF ( prttyp .eq. BB ) THEN CALL UA_AWDD ( report, lenr, irptr, iret ) ELSE logmsg = 'Regional sect. 51515 not allowed ' // + 'in Part ' // prttyp // ' of this report.' CALL DC_WLOG ( 2, 'UA', 1, logmsg, ierwlg ) END IF ELSE logmsg = 'regional' CALL DC_WLOG ( 2, 'UA', 3, logmsg, ierwlg ) END IF C* RETURN END