SUBROUTINE DB_S4DG ( dburpt, ipt, iret ) C************************************************************************ C* DB_S4DG * C* * C* This subroutine decodes the drifting buoy section 4 group * C* 9/Z(d)Z(d)Z(d), which contains the depth at which the drogue is * C* attached. * C* * C* DB_S4DG ( DBURPT, IPT, IRET ) * C* * C* Input parameters: * C* DBURPT CHAR* Report array * C* IPT INTEGER Points to the space preceding * C* the group 9/ZdZdZd * C* * C* Output parameters passed via common: * C* RIVALS(IRDROD) REAL Depth in meters at * C* which the drogue is attached. * C* RIVALS(IRLDDS) REAL Lagrangian drifter drogue * C* status (BUFR code table 022060)* C* * C* Output parameters: * C* IRET INTEGER Return code * C* 0 = Normal return * C* 1 = Problems * C** * C* Log: * C* R. Hollern/NCEP 12/99 * C* C. Caruso Magee/NCEP 03/2000 Fixed docblock comments. * C* C. Caruso Magee/NCEP 07/2001 Remove decode of drogue type. This is * C* now part of Section 4, group 5. * C* C. Caruso Magee/NCEP 06/2004 Add code to store drogue status into * C* rivals (irldds). If this subroutine * C* was entered, check to see if buoy is a * C* lagrangian, and set status accordingly.* C************************************************************************ INCLUDE 'dbcmn.cmn' C* CHARACTER*(*) dburpt C* CHARACTER fld3*3 C------------------------------------------------------------------------ iret = 0 C ipt = ipt + 3 fld3 = dburpt ( ipt:ipt+2 ) C C* If buoy type = 1, buoy is lagrangian. C* If lagrangian and /// encoded, drogue is detached. If C* depth is encoded, drogue is attached. C IF ( fld3 .eq. '///' ) THEN IF ( rivals ( irbuyt ) .eq. 1. ) THEN rivals ( irldds ) = 0. END IF ELSE CALL ST_INTG ( fld3, ival, ier ) IF ( ier .eq. 0 ) THEN rivals ( irdrod ) = FLOAT ( ival ) IF ( rivals ( irbuyt ) .eq. 1. ) THEN rivals ( irldds ) = 1. END IF END IF END IF C RETURN END