      SUBROUTINE VIM5SPL(PRI,GAMMA2,SCF,TIME,BAD)
C
C REPLACE X AND Z AXES OF VOYAGER 2 PRIMARY MAG CONTAMINATED WITH SPORADIC 
C NOISE OSCILLATIONS WITH INTERPOLATED SECONDARY MAG DATA TO CREATE A 
C COMPOSITE MAG
C
C PASS COMPOSITE MAG DATA AS PRIMARY MAG TO FIELD AVERAGING ROUTINES FOR 
C ADDITION TO THE SUMMARY RECORD.
C
C USING 192 SECOND VIM-5 EDR RECORD, INTERPOLATE SECONDARY MAG DETAIL (24 SEC) 
C DATA POINTS TO PRIMARY MAG DETAIL RATE (.48 SEC).  
C
C ***NOTE:  NO COMPOSITE MAG MODE FOR DETAIL DATA OUTPUT***
C
C CREATED 01/30/2006 - SANDY KRAMER, GST, CODE 690
C
      INTEGER*2 TIME(6)
C
      REAL*4 PRI(3,400),GAMMA2(3,8),SCF(3,400),CMP(3,400)
C
      INCLUDE 'UNPACK.INC'
C
      DO I=1,400
C
C STEP INTERPOLATE 24 SECOND VIM-5 SECONDARY MAG DATA
C
       ISEC = (I-1)/50 + 1
       CMP(1,I) = GAMMA2(1,ISEC)  ! REPLACE PRIMARY X COMPONENT W/SECONDARY
       CMP(2,I) = PRI(2,I)        ! PRIMARY Y COMPONENT
       CMP(3,I) = GAMMA2(3,ISEC)  ! REPLACE PRIMARY Z COMPONENT W/SECONDARY
C
      END DO
C
C CALL VIM-5 AVERAGING ROUTINES
C
      CALL VIM5PRI(CMP,PRI,TIME,BAD)  ! OUTPUT COMPOSITE MAG AND PRIMARY
C
      RETURN
      END
