      SUBROUTINE FWFLUX(BWGO,GC,PRESS,QFLXS,RUNOFF,TS,DELT,ILG,IL1,IL2)
C
C     * SUBROUTINE TO CALCULATE NET FRESHWATER FLUX FROM PRECIPITATION, 
C     * EVAPORATION AND LAND RUNOFF WHICH WILL EVENTUALLY BE TARGETTED
C     * TO THE OCEAN. ADDITIONAL MODIFICATIONS TO THE FRESHWATER FLUX 
C     * DUE TO ICE AND SNOW GROWTH OR MELT WILL BE MADE IN THE
C     * SEAICE MODELE.
C     *
C     * JUNE 28/94 - G.FLATO. INITIAL VERSION.
C
C********************************************************************
C
C     * DICTIONARY OF VARIABLES USED IN THIS SUBROUTINE
C
C     *  1. ARRAY ELEMENTS:
C
C     BWGO    - CONTRIBUTION TO NET FRESHWATER FLUX INTO OCEAN UPPER LAYER, 
C               OVER ALL SURFACE TYPES: LOCAL RUNOFF OVER LAND, P-E OVER
C               OCEAN, AND RAIN OVER ICE (KG M-2 S-1)
C     GC      - GROUND COVER TYPE (1.=PACK ICE, 0.=OPEN WATER, -1.=LAND)
C     PRESS   - SURFACE PRESSURE (PA)
C     QFLXS   - MOISTURE FLUX OUT OF BOTTOM OF ATMOSPHERE (NEGATIVE OF
C               EVAPORATION (M S-1)
C     RUNOFF  - OVER LAND, PRECIPITATION EXCEEDING FIELD CAPACITY OF 
C               SOIL; OVER OCEAN AND SEA ICE, LIQUID PRECIPITATION. 
C               CALCULATED IN SUBROUTINE PCPADD AND MODIFIED OVER LAND
C               IN SUBROUTINE HYDROL5 (KG M-2)
C     TS      - SCREEN LEVEL TEMPERATURE (K)
C
C     *  2. PARAMETERS
C
C     DELT    - ATMOSPHERIC MODEL TIME STEP (S)
C     DTC     - COUPLING TIME STEP (S) [I.E. INCREMENT BETWEEN 
C               ATMOS.-OCEAN COMMUNICATION]
C     RGAS    - GAS CONSTANT (J KG-1 K-1)
C     ILG     - LENGTH OF LONGITUDE ROW VECTOR
C     IL1     - FIRST LONGITUDE INDEX
C     IL2     - LAST  LONGITUDE INDEX
C
C*******************************************************************
C
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)

C     * OUTPUT ARRAY.
C
      REAL BWGO(ILG)
C
C     * INPUT ARRAYS.
C
      REAL GC(ILG), PRESS(ILG), QFLXS(ILG), RUNOFF(ILG), TS(ILG)
C
      COMMON/PARAMS/WW,TW,A,ASQ,GRAV,RGAS,RGOP,RGASQ,CPRES,
     1              RGASV,CPRESV
C-------------------------------------------------------------------
      DO 100 I=IL1,IL2
C
C.......INITIALLY, FRESH WATER FLUX IS LIQUID PRECIPITATION OVER ICE AND 
C.......OCEAN AND PRECIPITATION EXCEEDING FIELD CAPACITY OVER LAND.
C.......THESE ARE COMPUTED IN PCPADD5 AND HYDROL
C
        BWGO(I)=RUNOFF(I)/DELT
C
C.......OVER OCEAN, HAVE TO SUBTRACT EVAPORATION (MOISTURE FLUX TIMES AIR 
C.......DENSITY). EVAPORATION OVER LAND DONE IN HYDROL AND OVER ICE IN
C.......SEAICE
C
        IF(ABS(GC(I)).LT.0.5)                  THEN
          BWGO(I)=BWGO(I)+QFLXS(I)*PRESS(I)/(RGAS*TS(I))
        ENDIF
  100 CONTINUE    
C
      RETURN
      END
