      MODULE GWFSFRMODULE
        use ConstantsModule, only: LENPACKAGENAME
        CHARACTER(LEN=64), SAVE :: Version_sfr
        DOUBLE PRECISION,PARAMETER :: NEARZERO=1.0D-30
        DOUBLE PRECISION,SAVE :: THETAB, FLUXB, FLUXHLD2
        REAL,PARAMETER :: CLOSEZERO=1.0E-15
        INTEGER, SAVE :: Nfoldflbt, NUMTAB, MAXVAL
!        INTEGER,SAVE,                 POINTER:: IDVFLG   !diverison recharge is active flag
!        INTEGER,SAVE,  DIMENSION(:),  POINTER:: DVRCH   !(diverted recharge flag; then reharge cell count)
!        INTEGER,SAVE,  DIMENSION(:,:,:),POINTER:: DVRCELL !(store cells to apply diverted recharge)
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: RECHSAVE  !(store original recharge values)
!        REAL,   SAVE,  DIMENSION(:,:),POINTER:: DVRPERC  !(Percentage of diversion applied to each cell)
!        REAL,   SAVE,  DIMENSION(:),POINTER:: DVEFF  !(store efficiency factor)
        INTEGER,SAVE,POINTER:: NSS, NSTRM, NSFRPAR, ISTCB1, ISTCB2
        INTEGER,SAVE,POINTER:: IUZT, MAXPTS, IRTFLG, NUMTIM, NSEGDIM
        INTEGER,SAVE,POINTER:: ISFROPT, NSTRAIL, ISUZN, NSFRSETS
        INTEGER,SAVE,POINTER:: NUZST, NSTOTRL, NUMAVE
        INTEGER,SAVE,POINTER:: ITMP, IRDFLG, IPTFLG, NP
        INTEGER,SAVE,POINTER:: NSFRAUX, Ilgrgrid, Ilgrseg
        double precision, SAVE,POINTER:: CONST, DLEAK, WEIGHT, SFRRATIN,
     &    SFRRATOUT
        double precision,SAVE,POINTER:: FLWTOL, STRMDELSTOR_CUM,
     &    STRMDELSTOR_RATE
        DOUBLE PRECISION,SAVE,POINTER:: TOTSPFLOW
        logical, save, pointer             :: NeedLgrWaterMover
        logical, save, pointer             :: NeedLakWaterMover
        logical, save, pointer             :: NeedSfrWaterMover
        character(len=LENPACKAGENAME), save, pointer :: SfrPackageName
        INTEGER,SAVE,  DIMENSION(:),  POINTER:: IOTSG, NSEGCK
        INTEGER,SAVE,  DIMENSION(:),  POINTER:: ITRLSTH
        INTEGER,SAVE,  DIMENSION(:,:),POINTER:: ISEG, IDIVAR, ISTRM
        INTEGER,SAVE,  DIMENSION(:,:),POINTER:: LTRLIT, LTRLST
        INTEGER,SAVE,  DIMENSION(:,:),POINTER:: ITRLIT, ITRLST, NWAVST
        REAL,   SAVE,  DIMENSION(:),  POINTER:: STRIN, STROUT, FXLKOT
        REAL,   SAVE,  DIMENSION(:),  POINTER:: UHC, SGOTFLW, DVRSFLW
        REAL,   SAVE,  DIMENSION(:),  POINTER:: SFRUZBD
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: SEG, STRM, SFRQ
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: HWDTH, HWTPRM
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: QSTAGE, XSEC
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: AVDPT, AVWAT, WAT1
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: CONCQ, CONCRUN, CONCPPT
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: TABFLOW, TABTIME   !Reading Spedified inflow
        REAL,   SAVE,  DIMENSION(:,:),POINTER:: FNETSEEP           !writing net seepage in UZF
        INTEGER,SAVE,  DIMENSION(:,:),POINTER:: ISFRLIST           !Reading Spedified inflow
        DOUBLE PRECISION,SAVE,DIMENSION(:),  POINTER:: THTS,THTR,EPS
        DOUBLE PRECISION,SAVE,DIMENSION(:),  POINTER:: FOLDFLBT, THTI
        DOUBLE PRECISION,SAVE,DIMENSION(:),  POINTER:: SUMLEAK,SUMRCH
        DOUBLE PRECISION,SAVE,DIMENSION(:),  POINTER:: HLDSFR
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZFLWT, UZSTOR
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZWDTH, UZSEEP
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: DELSTOR, WETPER
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZDPIT, UZDPST
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZTHIT, UZTHST
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZSPIT, UZSPST
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZFLIT, UZFLST
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: UZOLSFLX, HSTRM
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: QSTRM, SLKOTFLW
        DOUBLE PRECISION,SAVE,DIMENSION(:,:),POINTER:: DLKOTFLW,DLKSTAGE
        CHARACTER(LEN=16),SAVE,DIMENSION(:), POINTER:: SFRAUX
      TYPE GWFSFRTYPE
!        INTEGER,                      POINTER:: IDVFLG   !diverison recharge is active flag
!        INTEGER,       DIMENSION(:),  POINTER:: DVRCH      !Diversions to recharge
!        INTEGER,       DIMENSION(:,:,:),  POINTER:: DVRCELL  !Diversions to recharge
        REAL,          DIMENSION(:,:),POINTER:: RECHSAVE  !Diversions to recharge
!        REAL,          DIMENSION(:,:),POINTER:: DVRPERC  !Diversions to recharge
!        REAL,          DIMENSION(:),POINTER:: DVEFF  !Diversions to recharge
        INTEGER,     POINTER:: NSS, NSTRM, NSFRPAR, ISTCB1, ISTCB2
        INTEGER,     POINTER:: IUZT, MAXPTS, IRTFLG, NUMTIM, NSEGDIM
        INTEGER,     POINTER:: ISFROPT, NSTRAIL, ISUZN, NSFRSETS
        INTEGER,     POINTER:: NUZST, NSTOTRL, NUMAVE
        INTEGER,     POINTER:: ITMP, IRDFLG, IPTFLG, NP
        INTEGER,     POINTER:: NSFRAUX, Ilgrgrid, Ilgrseg
        double precision, POINTER:: CONST, DLEAK, WEIGHT, SFRRATIN,
     &    SFRRATOUT
        double precision, POINTER:: FLWTOL, STRMDELSTOR_CUM,
     &    STRMDELSTOR_RATE
        DOUBLE PRECISION, POINTER:: TOTSPFLOW
        logical, pointer                       :: NeedLgrWaterMover
        logical, pointer                       :: NeedLakWaterMover
        logical, pointer                       :: NeedSfrWaterMover
        character(len=LENPACKAGENAME), pointer :: SfrPackageName
        INTEGER,       DIMENSION(:),  POINTER:: IOTSG, NSEGCK
        INTEGER,       DIMENSION(:),  POINTER:: ITRLSTH
        INTEGER,       DIMENSION(:,:),POINTER:: ISEG, IDIVAR, ISTRM
        INTEGER,       DIMENSION(:,:),POINTER:: LTRLIT, LTRLST
        INTEGER,       DIMENSION(:,:),POINTER:: ITRLIT, ITRLST, NWAVST
        REAL,          DIMENSION(:),  POINTER:: STRIN, STROUT, FXLKOT
        REAL,          DIMENSION(:),  POINTER:: UHC, SGOTFLW, DVRSFLW
        REAL,          DIMENSION(:),  POINTER:: SFRUZBD
        REAL,          DIMENSION(:,:),POINTER:: SEG, STRM, SFRQ
        REAL,          DIMENSION(:,:),POINTER:: HWDTH, HWTPRM
        REAL,          DIMENSION(:,:),POINTER:: QSTAGE, XSEC
        REAL,          DIMENSION(:,:),POINTER:: AVDPT, AVWAT, WAT1
        REAL,          DIMENSION(:,:),POINTER:: CONCQ, CONCRUN, CONCPPT
        REAL,          DIMENSION(:,:),POINTER:: TABFLOW, TABTIME  ! Reading SPecified inflow
        REAL,          DIMENSION(:,:),POINTER:: FNETSEEP          !writing net seepage in UZF
        INTEGER,       DIMENSION(:,:),POINTER:: ISFRLIST
        DOUBLE PRECISION,     DIMENSION(:),  POINTER:: THTS,THTR,EPS
        DOUBLE PRECISION,     DIMENSION(:),  POINTER:: FOLDFLBT, THTI
        DOUBLE PRECISION,     DIMENSION(:),  POINTER:: SUMLEAK, SUMRCH
        DOUBLE PRECISION,     DIMENSION(:),  POINTER:: HLDSFR
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZFLWT, UZSTOR
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZWDTH, UZSEEP
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: DELSTOR, WETPER
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZDPIT, UZDPST
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZTHIT, UZTHST
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZSPIT, UZSPST
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZFLIT, UZFLST
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: UZOLSFLX, HSTRM
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: QSTRM, SLKOTFLW
        DOUBLE PRECISION,     DIMENSION(:,:),POINTER:: DLKOTFLW,DLKSTAGE
        CHARACTER(LEN=16),    DIMENSION(:),  POINTER:: SFRAUX
      END TYPE
      TYPE(GWFSFRTYPE), SAVE:: GWFSFRDAT(10)

      contains

C-------SUBROUTINE GWF2SFR7DA
      SUBROUTINE GWF2SFR7DA(IGRID)
C  Save SFR data for a grid.
C     ------------------------------------------------------------------
C     ARGUMENTS
C     ------------------------------------------------------------------
      INTEGER IGRID
C     ------------------------------------------------------------------
      DEALLOCATE (GWFSFRDAT(IGRID)%NSS)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSTRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSFRPAR)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISTCB1)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISTCB2)
      DEALLOCATE (GWFSFRDAT(IGRID)%IUZT)
      DEALLOCATE (GWFSFRDAT(IGRID)%MAXPTS)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISFROPT)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSTRAIL)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISUZN)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSFRSETS)
      DEALLOCATE (GWFSFRDAT(IGRID)%NUZST)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSTOTRL)
      DEALLOCATE (GWFSFRDAT(IGRID)%NUMAVE)
      DEALLOCATE (GWFSFRDAT(IGRID)%ITMP)
      DEALLOCATE (GWFSFRDAT(IGRID)%IRDFLG)
      DEALLOCATE (GWFSFRDAT(IGRID)%IPTFLG)
      DEALLOCATE (GWFSFRDAT(IGRID)%NUMTIM)
      DEALLOCATE (GWFSFRDAT(IGRID)%WEIGHT)
      DEALLOCATE (GWFSFRDAT(IGRID)%SFRRATIN)
      DEALLOCATE (GWFSFRDAT(IGRID)%SFRRATOUT)
      DEALLOCATE (GWFSFRDAT(IGRID)%FLWTOL)
      DEALLOCATE (GWFSFRDAT(IGRID)%IRTFLG)
      DEALLOCATE (GWFSFRDAT(IGRID)%NP)
      DEALLOCATE (GWFSFRDAT(IGRID)%CONST)
      DEALLOCATE (GWFSFRDAT(IGRID)%DLEAK)
      DEALLOCATE (GWFSFRDAT(IGRID)%IOTSG)
      !DEALLOCATE (GWFSFRDAT(IGRID)%DVRCH)     !cjm
      !DEALLOCATE (GWFSFRDAT(IGRID)%DVEFF)     !cjm
      !DEALLOCATE (GWFSFRDAT(IGRID)%DVRCELL)   !cjm
       DEALLOCATE (GWFSFRDAT(IGRID)%RECHSAVE)  !cjm
      !DEALLOCATE (GWFSFRDAT(IGRID)%DVRPERC)  !cjm
      !DEALLOCATE (GWFSFRDAT(IGRID)%IDVFLG)  !cjm
      DEALLOCATE (GWFSFRDAT(IGRID)%NSEGCK)
      DEALLOCATE (GWFSFRDAT(IGRID)%ITRLSTH)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISEG)
      DEALLOCATE (GWFSFRDAT(IGRID)%IDIVAR)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISTRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%LTRLIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%LTRLST)
      DEALLOCATE (GWFSFRDAT(IGRID)%ITRLIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%ITRLST)
      DEALLOCATE (GWFSFRDAT(IGRID)%NWAVST)
      DEALLOCATE (GWFSFRDAT(IGRID)%STRIN)
      DEALLOCATE (GWFSFRDAT(IGRID)%STROUT)
      DEALLOCATE (GWFSFRDAT(IGRID)%FXLKOT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UHC)
      DEALLOCATE (GWFSFRDAT(IGRID)%SGOTFLW)
      DEALLOCATE (GWFSFRDAT(IGRID)%DVRSFLW)
      DEALLOCATE (GWFSFRDAT(IGRID)%SFRUZBD)
      DEALLOCATE (GWFSFRDAT(IGRID)%SEG)
      DEALLOCATE (GWFSFRDAT(IGRID)%STRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%HSTRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%QSTRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%SLKOTFLW)
      DEALLOCATE (GWFSFRDAT(IGRID)%DLKOTFLW)
      DEALLOCATE (GWFSFRDAT(IGRID)%DLKSTAGE)
      DEALLOCATE (GWFSFRDAT(IGRID)%HWDTH)
      DEALLOCATE (GWFSFRDAT(IGRID)%HWTPRM)
      DEALLOCATE (GWFSFRDAT(IGRID)%SFRQ)
      DEALLOCATE (GWFSFRDAT(IGRID)%QSTAGE)
      DEALLOCATE (GWFSFRDAT(IGRID)%XSEC)
      DEALLOCATE (GWFSFRDAT(IGRID)%AVDPT)
      DEALLOCATE (GWFSFRDAT(IGRID)%AVWAT)
      DEALLOCATE (GWFSFRDAT(IGRID)%WAT1)
      DEALLOCATE (GWFSFRDAT(IGRID)%CONCQ)
      DEALLOCATE (GWFSFRDAT(IGRID)%CONCRUN)
      DEALLOCATE (GWFSFRDAT(IGRID)%CONCPPT)
      DEALLOCATE (GWFSFRDAT(IGRID)%THTS)
      DEALLOCATE (GWFSFRDAT(IGRID)%THTR)
      DEALLOCATE (GWFSFRDAT(IGRID)%EPS)
      DEALLOCATE (GWFSFRDAT(IGRID)%FOLDFLBT)
      DEALLOCATE (GWFSFRDAT(IGRID)%THTI)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZFLWT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZSTOR)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZWDTH)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZSEEP)
      DEALLOCATE (GWFSFRDAT(IGRID)%DELSTOR)
      DEALLOCATE (GWFSFRDAT(IGRID)%WETPER)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZDPIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZDPST)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZTHIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZTHST)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZSPIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZSPST)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZFLIT)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZFLST)
      DEALLOCATE (GWFSFRDAT(IGRID)%UZOLSFLX)
      DEALLOCATE (GWFSFRDAT(IGRID)%SUMRCH)
      DEALLOCATE (GWFSFRDAT(IGRID)%SUMLEAK)
      DEALLOCATE (GWFSFRDAT(IGRID)%HLDSFR)
      DEALLOCATE (GWFSFRDAT(IGRID)%STRMDELSTOR_CUM)
      DEALLOCATE (GWFSFRDAT(IGRID)%STRMDELSTOR_RATE)
      DEALLOCATE (GWFSFRDAT(IGRID)%TOTSPFLOW)
      deallocate (GWFSFRDAT(IGRID)%NeedLgrWaterMover)
      deallocate (GWFSFRDAT(IGRID)%NeedLakWaterMover)
      deallocate (GWFSFRDAT(IGRID)%NeedSfrWaterMover)
      deallocate (GWFSFRDAT(IGRID)%SfrPackageName)
      DEALLOCATE (GWFSFRDAT(IGRID)%TABFLOW)
      DEALLOCATE (GWFSFRDAT(IGRID)%TABTIME)
      DEALLOCATE (GWFSFRDAT(IGRID)%ISFRLIST)
      DEALLOCATE (GWFSFRDAT(IGRID)%FNETSEEP)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSEGDIM)
      DEALLOCATE (GWFSFRDAT(IGRID)%NSFRAUX)
      deallocate (GWFSFRDAT(igrid)%Ilgrgrid)
      deallocate (GWFSFRDAT(igrid)%Ilgrseg)
      DEALLOCATE (GWFSFRDAT(IGRID)%SFRAUX)
C
      END SUBROUTINE GWF2SFR7DA
C
C-------SUBROUTINE GWF2SFR7PNT
      SUBROUTINE SGWF2SFR7PNT(IGRID)
C  Change SFR data to a different grid.
C     ------------------------------------------------------------------
C     ARGUMENTS
C     ------------------------------------------------------------------
      INTEGER IGRID
C     ------------------------------------------------------------------
      NSS=>GWFSFRDAT(IGRID)%NSS
      NSTRM=>GWFSFRDAT(IGRID)%NSTRM
      NSFRPAR=>GWFSFRDAT(IGRID)%NSFRPAR
      ISTCB1=>GWFSFRDAT(IGRID)%ISTCB1
      ISTCB2=>GWFSFRDAT(IGRID)%ISTCB2
      IUZT=>GWFSFRDAT(IGRID)%IUZT
      MAXPTS=>GWFSFRDAT(IGRID)%MAXPTS
      ISFROPT=>GWFSFRDAT(IGRID)%ISFROPT
      NSTRAIL=>GWFSFRDAT(IGRID)%NSTRAIL
      ISUZN=>GWFSFRDAT(IGRID)%ISUZN
      NSFRSETS=>GWFSFRDAT(IGRID)%NSFRSETS
      NUZST=>GWFSFRDAT(IGRID)%NUZST
      NSTOTRL=>GWFSFRDAT(IGRID)%NSTOTRL
      NUMAVE=>GWFSFRDAT(IGRID)%NUMAVE
      ITMP=>GWFSFRDAT(IGRID)%ITMP
      IRDFLG=>GWFSFRDAT(IGRID)%IRDFLG
      IPTFLG=>GWFSFRDAT(IGRID)%IPTFLG
      NP=>GWFSFRDAT(IGRID)%NP
      CONST=>GWFSFRDAT(IGRID)%CONST
      DLEAK=>GWFSFRDAT(IGRID)%DLEAK
      NUMTIM=>GWFSFRDAT(IGRID)%NUMTIM
      WEIGHT=>GWFSFRDAT(IGRID)%WEIGHT
      SFRRATIN=>GWFSFRDAT(IGRID)%SFRRATIN
      SFRRATOUT=>GWFSFRDAT(IGRID)%SFRRATOUT
      FLWTOL=>GWFSFRDAT(IGRID)%FLWTOL
      IRTFLG=>GWFSFRDAT(IGRID)%IRTFLG
      IOTSG=>GWFSFRDAT(IGRID)%IOTSG
      !IDVFLG=>GWFSFRDAT(IGRID)%IDVFLG        !cjm
      !DVRCH=>GWFSFRDAT(IGRID)%DVRCH        !cjm
      !DVEFF=>GWFSFRDAT(IGRID)%DVEFF        !cjm
      !DVRCELL=>GWFSFRDAT(IGRID)%DVRCELL    !cjm
       RECHSAVE=>GWFSFRDAT(IGRID)%RECHSAVE  !cjm
      !DVRPERC=>GWFSFRDAT(IGRID)%DVRPERC  !cjm
      NSEGCK=>GWFSFRDAT(IGRID)%NSEGCK
      ITRLSTH=>GWFSFRDAT(IGRID)%ITRLSTH
      ISEG=>GWFSFRDAT(IGRID)%ISEG
      IDIVAR=>GWFSFRDAT(IGRID)%IDIVAR
      ISTRM=>GWFSFRDAT(IGRID)%ISTRM
      LTRLIT=>GWFSFRDAT(IGRID)%LTRLIT
      LTRLST=>GWFSFRDAT(IGRID)%LTRLST
      ITRLIT=>GWFSFRDAT(IGRID)%ITRLIT
      ITRLST=>GWFSFRDAT(IGRID)%ITRLST
      NWAVST=>GWFSFRDAT(IGRID)%NWAVST
      STRIN=>GWFSFRDAT(IGRID)%STRIN
      STROUT=>GWFSFRDAT(IGRID)%STROUT
      FXLKOT=>GWFSFRDAT(IGRID)%FXLKOT
      UHC=>GWFSFRDAT(IGRID)%UHC
      SGOTFLW=>GWFSFRDAT(IGRID)%SGOTFLW
      DVRSFLW=>GWFSFRDAT(IGRID)%DVRSFLW
      SFRUZBD=>GWFSFRDAT(IGRID)%SFRUZBD
      SEG=>GWFSFRDAT(IGRID)%SEG
      STRM=>GWFSFRDAT(IGRID)%STRM
      HSTRM=>GWFSFRDAT(IGRID)%HSTRM
      QSTRM=>GWFSFRDAT(IGRID)%QSTRM
      HWDTH=>GWFSFRDAT(IGRID)%HWDTH
      HWTPRM=>GWFSFRDAT(IGRID)%HWTPRM
      SFRQ=>GWFSFRDAT(IGRID)%SFRQ
      QSTAGE=>GWFSFRDAT(IGRID)%QSTAGE
      SLKOTFLW=>GWFSFRDAT(IGRID)%SLKOTFLW
      DLKOTFLW=>GWFSFRDAT(IGRID)%DLKOTFLW
      DLKSTAGE=>GWFSFRDAT(IGRID)%DLKSTAGE
      XSEC=>GWFSFRDAT(IGRID)%XSEC
      AVDPT=>GWFSFRDAT(IGRID)%AVDPT
      AVWAT=>GWFSFRDAT(IGRID)%AVWAT
      WAT1=>GWFSFRDAT(IGRID)%WAT1
      CONCQ=>GWFSFRDAT(IGRID)%CONCQ
      CONCRUN=>GWFSFRDAT(IGRID)%CONCRUN
      CONCPPT=>GWFSFRDAT(IGRID)%CONCPPT
      THTS=>GWFSFRDAT(IGRID)%THTS
      THTR=>GWFSFRDAT(IGRID)%THTR
      EPS=>GWFSFRDAT(IGRID)%EPS
      FOLDFLBT=>GWFSFRDAT(IGRID)%FOLDFLBT
      THTI=>GWFSFRDAT(IGRID)%THTI
      UZFLWT=>GWFSFRDAT(IGRID)%UZFLWT
      UZSTOR=>GWFSFRDAT(IGRID)%UZSTOR
      UZWDTH=>GWFSFRDAT(IGRID)%UZWDTH
      UZSEEP=>GWFSFRDAT(IGRID)%UZSEEP
      DELSTOR=>GWFSFRDAT(IGRID)%DELSTOR
      WETPER=>GWFSFRDAT(IGRID)%WETPER
      UZDPIT=>GWFSFRDAT(IGRID)%UZDPIT
      UZDPST=>GWFSFRDAT(IGRID)%UZDPST
      UZTHIT=>GWFSFRDAT(IGRID)%UZTHIT
      UZTHST=>GWFSFRDAT(IGRID)%UZTHST
      UZSPIT=>GWFSFRDAT(IGRID)%UZSPIT
      UZSPST=>GWFSFRDAT(IGRID)%UZSPST
      UZFLIT=>GWFSFRDAT(IGRID)%UZFLIT
      UZFLST=>GWFSFRDAT(IGRID)%UZFLST
      UZOLSFLX=>GWFSFRDAT(IGRID)%UZOLSFLX
      SUMRCH=>GWFSFRDAT(IGRID)%SUMRCH
      SUMLEAK=>GWFSFRDAT(IGRID)%SUMLEAK
      HLDSFR=>GWFSFRDAT(IGRID)%HLDSFR
      STRMDELSTOR_CUM=>GWFSFRDAT(IGRID)%STRMDELSTOR_CUM
      STRMDELSTOR_RATE=>GWFSFRDAT(IGRID)%STRMDELSTOR_RATE
      TOTSPFLOW=>GWFSFRDAT(IGRID)%TOTSPFLOW
      NeedLgrWaterMover => GWFSFRDAT(IGRID)%NeedLgrWaterMover
      NeedLakWaterMover => GWFSFRDAT(IGRID)%NeedLakWaterMover
      NeedSfrWaterMover => GWFSFRDAT(IGRID)%NeedSfrWaterMover
      SfrPackageName => GWFSFRDAT(IGRID)%SfrPackageName
      TABFLOW=>GWFSFRDAT(IGRID)%TABFLOW
      TABTIME=>GWFSFRDAT(IGRID)%TABTIME
      ISFRLIST=>GWFSFRDAT(IGRID)%ISFRLIST
      FNETSEEP=>GWFSFRDAT(IGRID)%FNETSEEP
      NSEGDIM=>GWFSFRDAT(IGRID)%NSEGDIM
      NSFRAUX=>GWFSFRDAT(IGRID)%NSFRAUX
      Ilgrgrid=>GWFSFRDAT(IGRID)%Ilgrgrid
      Ilgrseg=>GWFSFRDAT(IGRID)%Ilgrseg
      SFRAUX=>GWFSFRDAT(IGRID)%SFRAUX
C
      END SUBROUTINE SGWF2SFR7PNT
C
C-------SUBROUTINE SGWF2SFR7PSV
      SUBROUTINE SGWF2SFR7PSV(IGRID)
C  Save SFR data for a grid.
C     ------------------------------------------------------------------
C     ARGUMENTS
C     ------------------------------------------------------------------
      INTEGER IGRID
C     ------------------------------------------------------------------
      GWFSFRDAT(IGRID)%NSS=>NSS
      GWFSFRDAT(IGRID)%NSTRM=>NSTRM
      GWFSFRDAT(IGRID)%NSFRPAR=>NSFRPAR
      GWFSFRDAT(IGRID)%ISTCB1=>ISTCB1
      GWFSFRDAT(IGRID)%ISTCB2=>ISTCB2
      GWFSFRDAT(IGRID)%IUZT=>IUZT
      GWFSFRDAT(IGRID)%MAXPTS=>MAXPTS
      GWFSFRDAT(IGRID)%ISFROPT=>ISFROPT
      GWFSFRDAT(IGRID)%NSTRAIL=>NSTRAIL
      GWFSFRDAT(IGRID)%ISUZN=>ISUZN
      GWFSFRDAT(IGRID)%NSFRSETS=>NSFRSETS
      GWFSFRDAT(IGRID)%NUZST=>NUZST
      GWFSFRDAT(IGRID)%NSTOTRL=>NSTOTRL
      GWFSFRDAT(IGRID)%NUMAVE=>NUMAVE
      GWFSFRDAT(IGRID)%ITMP=>ITMP
      GWFSFRDAT(IGRID)%IRDFLG=>IRDFLG
      GWFSFRDAT(IGRID)%IPTFLG=>IPTFLG
      GWFSFRDAT(IGRID)%NP=>NP
      GWFSFRDAT(IGRID)%CONST=>CONST
      GWFSFRDAT(IGRID)%DLEAK=>DLEAK
      GWFSFRDAT(IGRID)%NUMTIM=>NUMTIM
      GWFSFRDAT(IGRID)%WEIGHT=>WEIGHT
      GWFSFRDAT(IGRID)%SFRRATIN=>SFRRATIN
      GWFSFRDAT(IGRID)%SFRRATOUT=>SFRRATOUT
      GWFSFRDAT(IGRID)%FLWTOL=>FLWTOL
      GWFSFRDAT(IGRID)%IRTFLG=>IRTFLG
      GWFSFRDAT(IGRID)%IOTSG=>IOTSG
      !GWFSFRDAT(IGRID)%IDVFLG=>IDVFLG        !cjm
      !GWFSFRDAT(IGRID)%DVRCH=>DVRCH        !cjm
      !GWFSFRDAT(IGRID)%DVEFF=>DVEFF        !cjm
      !GWFSFRDAT(IGRID)%DVRCELL=>DVRCELL    !cjm
      !GWFSFRDAT(IGRID)%DVRPERC=>DVRPERC  !cjm
      GWFSFRDAT(IGRID)%RECHSAVE=>RECHSAVE  !cjm
      GWFSFRDAT(IGRID)%NSEGCK=>NSEGCK
      GWFSFRDAT(IGRID)%ITRLSTH=>ITRLSTH
      GWFSFRDAT(IGRID)%ISEG=>ISEG
      GWFSFRDAT(IGRID)%IDIVAR=>IDIVAR
      GWFSFRDAT(IGRID)%ISTRM=>ISTRM
      GWFSFRDAT(IGRID)%LTRLIT=>LTRLIT
      GWFSFRDAT(IGRID)%LTRLST=>LTRLST
      GWFSFRDAT(IGRID)%ITRLIT=>ITRLIT
      GWFSFRDAT(IGRID)%ITRLST=>ITRLST
      GWFSFRDAT(IGRID)%NWAVST=>NWAVST
      GWFSFRDAT(IGRID)%STRIN=>STRIN
      GWFSFRDAT(IGRID)%STROUT=>STROUT
      GWFSFRDAT(IGRID)%FXLKOT=>FXLKOT
      GWFSFRDAT(IGRID)%UHC=>UHC
      GWFSFRDAT(IGRID)%SGOTFLW=>SGOTFLW
      GWFSFRDAT(IGRID)%DVRSFLW=>DVRSFLW
      GWFSFRDAT(IGRID)%SFRUZBD=>SFRUZBD
      GWFSFRDAT(IGRID)%SEG=>SEG
      GWFSFRDAT(IGRID)%STRM=>STRM
      GWFSFRDAT(IGRID)%HSTRM=>HSTRM
      GWFSFRDAT(IGRID)%QSTRM=>QSTRM
      GWFSFRDAT(IGRID)%SLKOTFLW=>SLKOTFLW
      GWFSFRDAT(IGRID)%DLKOTFLW=>DLKOTFLW
      GWFSFRDAT(IGRID)%DLKSTAGE=>DLKSTAGE
      GWFSFRDAT(IGRID)%HWDTH=>HWDTH
      GWFSFRDAT(IGRID)%HWTPRM=>HWTPRM
      GWFSFRDAT(IGRID)%SFRQ=>SFRQ
      GWFSFRDAT(IGRID)%QSTAGE=>QSTAGE
      GWFSFRDAT(IGRID)%XSEC=>XSEC
      GWFSFRDAT(IGRID)%AVDPT=>AVDPT
      GWFSFRDAT(IGRID)%AVWAT=>AVWAT
      GWFSFRDAT(IGRID)%WAT1=>WAT1
      GWFSFRDAT(IGRID)%CONCQ=>CONCQ
      GWFSFRDAT(IGRID)%CONCRUN=>CONCRUN
      GWFSFRDAT(IGRID)%CONCPPT=>CONCPPT
      GWFSFRDAT(IGRID)%THTS=>THTS
      GWFSFRDAT(IGRID)%THTR=>THTR
      GWFSFRDAT(IGRID)%EPS=>EPS
      GWFSFRDAT(IGRID)%FOLDFLBT=>FOLDFLBT
      GWFSFRDAT(IGRID)%THTI=>THTI
      GWFSFRDAT(IGRID)%UZFLWT=>UZFLWT
      GWFSFRDAT(IGRID)%UZSTOR=>UZSTOR
      GWFSFRDAT(IGRID)%UZWDTH=>UZWDTH
      GWFSFRDAT(IGRID)%UZSEEP=>UZSEEP
      GWFSFRDAT(IGRID)%DELSTOR=>DELSTOR
      GWFSFRDAT(IGRID)%WETPER=>WETPER
      GWFSFRDAT(IGRID)%UZDPIT=>UZDPIT
      GWFSFRDAT(IGRID)%UZDPST=>UZDPST
      GWFSFRDAT(IGRID)%UZTHIT=>UZTHIT
      GWFSFRDAT(IGRID)%UZTHST=>UZTHST
      GWFSFRDAT(IGRID)%UZSPIT=>UZSPIT
      GWFSFRDAT(IGRID)%UZSPST=>UZSPST
      GWFSFRDAT(IGRID)%UZFLIT=>UZFLIT
      GWFSFRDAT(IGRID)%UZFLST=>UZFLST
      GWFSFRDAT(IGRID)%UZOLSFLX=>UZOLSFLX
      GWFSFRDAT(IGRID)%SUMRCH=>SUMRCH
      GWFSFRDAT(IGRID)%SUMLEAK=>SUMLEAK
      GWFSFRDAT(IGRID)%HLDSFR=>HLDSFR
      GWFSFRDAT(IGRID)%STRMDELSTOR_CUM=>STRMDELSTOR_CUM
      GWFSFRDAT(IGRID)%STRMDELSTOR_RATE=>STRMDELSTOR_RATE
      GWFSFRDAT(IGRID)%TOTSPFLOW=>TOTSPFLOW
      GWFSFRDAT(IGRID)%NeedLgrWaterMover => NeedLgrWaterMover
      GWFSFRDAT(IGRID)%NeedLakWaterMover => NeedLakWaterMover
      GWFSFRDAT(IGRID)%NeedSfrWaterMover => NeedSfrWaterMover
      GWFSFRDAT(IGRID)%SfrPackageName => SfrPackageName
      GWFSFRDAT(IGRID)%TABFLOW=>TABFLOW
      GWFSFRDAT(IGRID)%TABTIME=>TABTIME
      GWFSFRDAT(IGRID)%ISFRLIST=>ISFRLIST
      GWFSFRDAT(IGRID)%FNETSEEP=>FNETSEEP
      GWFSFRDAT(IGRID)%NSEGDIM=>NSEGDIM
      GWFSFRDAT(IGRID)%NSFRAUX=>NSFRAUX
      GWFSFRDAT(IGRID)%Ilgrgrid=>Ilgrgrid
      GWFSFRDAT(IGRID)%Ilgrseg=>Ilgrseg
      GWFSFRDAT(IGRID)%SFRAUX=>SFRAUX
C
      END SUBROUTINE SGWF2SFR7PSV

      END MODULE GWFSFRMODULE
