      SUBROUTINE GETOZON2(OZPAK,OZPAL,NAME,
     1                    LO,NLON,NLAT,LEVOZ,INCD,IDAY,MDAY,
     2                    KOUNT,IJPAK,NUAN,GG)
C
C     * JUL 31/09 - M.LAZARE. NEW ROUTINE FOR GCM15I.
C     *                       - GETS OZONE AT "MDAY".
C     *                       - THIS WORKS FOR ANY OZONE DATASET.
C     *                       - BASED ON GETOZON (ONLY DIFFERENCE.
C     *                         IS NAME AND LEVEL INDEX PASSED IN.
C     * JUL 29/07 - M.LAZARE. PREVIOUS VERSION GETOXON FOR GCM15H.
C
C     * READ IN CHEMISTRY OZONE FIELDS AND INTERPOLATE TO CURRENT IDAY.
C
C     * TIME LABEL IS THE JULIAN DATE OF THE FIRST OF THE MONTH 
C     * (NFDM) FOR WHICH THE SST ARE THE MONTHLY AVERAGE. 
C
C     * WHEN THE MODEL IS MOVING THROUGH THE YEAR (INCD.NE.0),
C     * THEN NEW FIELDS ARE READ ON EVERY MID MONTH DAY (MMD), 
C     * AND INTERPOLATION WILL BE DONE BETWEEN THE TWO ADJACENT 
C     * MID MONTH DAYS. "PAK" IS THE PRECEDENT, "PAL" IS THE TARGET.
C
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N) 
C
      REAL  OZPAK(IJPAK,LEVOZ),  OZPAL(IJPAK,LEVOZ)
C
      REAL GG(*)
C
      INTEGER LO(LEVOZ)
      INTEGER MMD(12)
      INTEGER*4 MYNODE
C
C     * INTERNAL WORK ARRAY.
C
      INTEGER LH(LEVOZ)
C
      COMMON /MPINFO/ MYNODE 
C
      DATA  MMD/ 16, 46, 75,106,136,167,197,228,259,289,320,350/
C----------------------------------------------------------------------
C
C     * FIRST, ESTABLISH WHETHER THE RADIATION OZONE ("OZ") OR CHEMICAL
C     * OZONE ("03C") IS BEING USED. THE VALUES OF IBUF(4) ARE DIFFERENT
C     * FOR THESE, BECAUSE FOR CHEMISTRY IT IS THE ORIGINAL RAW DATA
C     * WHICH HAS THE ACTUAL PRESSURE LEVEL INDEX, WHILE THE RADIATION
C     * OZONE GOES THROUGH THE USUAL INTERPOLATION ROUTINE WHICH SETS
C     * IBUF(4)=L.
C
      IF (NAME.EQ.NC4TO8("  OZ")) THEN
        DO L=1,LEVOZ
          LH(L)=L
        ENDDO
      ELSE IF(NAME.EQ.NC4TO8(" O3C")) THEN
        DO L=1,LEVOZ
          LH(L)=LO(L)
        ENDDO
      ELSE
        CALL XIT('GETOZON2',-1)
      ENDIF
C
      M=0 
      DO 5 N=1,12 
        IF(MDAY.EQ.MMD(N)) M=N
    5 CONTINUE
      JOUR=MDAY
C
C     * NOW, GET PREVIOUS MID-MONTH TARGET FOR INITIALIZATION AT KOUNT=0.
C
      L=M-1
      IF(L.EQ.0) L=12
      MDAY1=MMD(L)
      JOUR1=MMD(L)
C
      IF(INCD.EQ.0) THEN
C 
C       * MODEL IS STATIONARY.
C
        IF(KOUNT.EQ.0) THEN 
C         
C         * START-UP TIME. READ-IN FIELDS FOR AVERAGE OF MONTH. 
C         * INITIALIZE TARGET FIELDS AS WELL, ALTHOUGH NOT USED.
C
          REWIND NUAN
          DO 10  L=1,LEVOZ
           CALL GETGGBX(  OZPAK(1,L),NAME,NUAN,NLON,NLAT,MDAY,
     1                  LH(L),GG)
   10     CONTINUE     
C
          DO 16 L=1,LEVOZ
          DO 16 I=1,IJPAK
             OZPAL  (I,L) = OZPAK  (I,L)
   16     CONTINUE     

        ELSE
C         
C         * NOT A NEW INTEGRATION. NO NEW FIELDS REQUIRED. 
C         
        ENDIF 

      ELSE
C      
C       * THE MODEL IS MOVING.
C      
        IF(KOUNT.EQ.0) THEN 
C         
C        * START-UP TIME. GET FIELDS FOR PREVIOUS AND TARGET MID-MONTH DAYS.
C
         REWIND NUAN         
         DO 22  L=1,LEVOZ
          CALL GETGGBX(OZPAK(1,L),NAME,NUAN,NLON,NLAT,JOUR1,
     1                 LH(L),GG)
   22    CONTINUE     
C
         REWIND NUAN
         DO 32  L=1,LEVOZ
          CALL GETGGBX(OZPAL(1,L),NAME,NUAN,NLON,NLAT,JOUR,
     1                 LH(L),GG)
   32    CONTINUE     
C
         LON=NLON-1
         DAY1=REAL(MDAY1) 
         DAY2=REAL(IDAY)
         DAY3=REAL(MDAY)
         IF(DAY2.LT.DAY1) DAY2=DAY2+365. 
         IF(DAY3.LT.DAY2) DAY3=DAY3+365. 
         W1=(DAY2-DAY1)/(DAY3-DAY1)
         W2=(DAY3-DAY2)/(DAY3-DAY1)
         IF(MYNODE.EQ.0) WRITE(6,6000) IDAY,MDAY1,MDAY,W1,W2 
C
         DO 150 L=1,LEVOZ
         DO 150 I=1,IJPAK
           OZPAK  (I,L)=W1*OZPAL  (I,L) + W2*OZPAK  (I,L)
  150    CONTINUE    

        ELSE
C 
C         * THIS IS IN THE MIDDLE OF A RUN. 
C
          REWIND NUAN
C
          DO 232  L=1,LEVOZ
           CALL GETGGBX(  OZPAL(1,L),NAME,NUAN,NLON,NLAT,JOUR,
     1                  LH(L),GG)
  232     CONTINUE     
        ENDIF

      ENDIF 
      RETURN
C---------------------------------------------------------------------
 6000 FORMAT(' INTERPOLATING OZONE FOR', I5, ' BETWEEN', I5, ' AND',
     1       I5, ' WITH WEIGHTS=', 2F7.3)
      END
