! real*8 interface generated by r8igen.csh --
! ...in /home/tshare/scratch/tshare/work/tmp/ufiles/src
! csh -f r8igen.csh r8_ufiles.for r8_ufiles.sub
!
! then **by hand** patched up SCVAL(*) args (dmc Jan 2003 -- TESTED). 
!
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  LARCMP
      LOGICAL FUNCTION R8_LARCMP(
     > R8_X1,NX1,R8_X2,NX2,R8_ZABS,R8_ZREL,IPT)
 
      external LARCMP
      LOGICAL LARCMP
 
! argument declarations
      INTEGER NX1
      INTEGER NX2
 ! floating type, input only:
      REAL*8 R8_ZABS
 
 ! floating type, input only:
      REAL*8 R8_ZREL
 
      INTEGER IPT
 ! floating type, input only:
      REAL*8 R8_X1(NX1)
 
 ! floating type, input only:
      REAL*8 R8_X2(NX2)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: X1_act(:)
      REAL, allocatable :: X2_act(:)
      REAL :: ZABS_act
      REAL :: ZREL_act
 
! allocation of working arrays...
 
      ALLOCATE(X1_act(NX1)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LARCMP -- X1_act ALLOCATE error!')
      ALLOCATE(X2_act(NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LARCMP -- X2_act ALLOCATE error!')
 
! executable code:  copy for input
 
      X1_act=R8_X1
      X2_act=R8_X2
      ZABS_act=R8_ZABS
      ZREL_act=R8_ZREL
! call to original routine:  LARCMP
 
      R8_LARCMP=LARCMP(
     > X1_act(1),NX1,X2_act(1),NX2,ZABS_act,ZREL_act,IPT)
 
! copy back outputs if modified.
      DEALLOCATE(X1_act)
      DEALLOCATE(X2_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF0DRD
      SUBROUTINE R8_UF0DRD(
     > ILUN,IDEV,ZSDATE,R8_SCVAL,SCLAB,NDIM,NSC,IER)
 
      external UF0DRD
 
! argument declarations
      INTEGER ILUN
      CHARACTER*4 IDEV
      CHARACTER*10 ZSDATE
      INTEGER NDIM
      INTEGER NSC
      INTEGER IER
 ! floating type, output only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(SCVAL_act(max(1,NDIM))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF0DRD -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      SCVAL_act=0
! call to original routine:  UF0DRD
 
      CALL UF0DRD(
     > ILUN,IDEV,ZSDATE,SCVAL_act(1),SCLAB,NDIM,NSC,IER)
 
! copy back outputs if modified.
      if(NDIM.gt.0) R8_SCVAL(1:NDIM) = SCVAL_act
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF0DWR
      SUBROUTINE R8_UF0DWR(
     > ILUN,IDEV_I,ZSDATE_I,R8_SCVAL,SCLAB_I,NSC,IER)
 
      external UF0DWR
 
! argument declarations
      INTEGER ILUN
      CHARACTER*(*) IDEV_I
      CHARACTER*(*) ZSDATE_I
      INTEGER NSC
      INTEGER IER
 ! floating type, input only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB_I(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(SCVAL_act(max(1,NSC))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF0DWR -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      if(nsc.ge.1) then
         SCVAL_act=R8_SCVAL(1:NSC)
      else
         SCVAL_ACT=0
      endif

! call to original routine:  UF0DWR
 
      CALL UF0DWR(
     > ILUN,IDEV_I,ZSDATE_I,SCVAL_act(1),SCLAB_I,NSC,IER)
 
! copy back outputs if modified.
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF1DRD
      SUBROUTINE R8_UF1DRD(
     > ILUN,IDEV,ZSDATE,R8_X,R8_F,NDIM,NACT,IPROC,XLAB,FLAB,NSCD,NSCA,
     > R8_SCVAL,SCLAB,IER)
 
      external UF1DRD
 
! argument declarations
      INTEGER ILUN
      CHARACTER*4 IDEV
      CHARACTER*10 ZSDATE
      INTEGER NDIM
      INTEGER NACT
      INTEGER IPROC
      CHARACTER*30 XLAB
      CHARACTER*30 FLAB
      INTEGER NSCD
      INTEGER NSCA
      INTEGER IER
 ! floating type, output only:
      REAL*8 R8_X(NDIM)
 
 ! floating type, output only:
      REAL*8 R8_F(NDIM)
 
 ! floating type, output only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: F_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NDIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DRD -- X_act ALLOCATE error!')
      ALLOCATE(F_act(NDIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DRD -- F_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSCD))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DRD -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=0
      F_act=0
      SCVAL_act=0
! call to original routine:  UF1DRD
 
      CALL UF1DRD(
     > ILUN,IDEV,ZSDATE,X_act(1),F_act(1),NDIM,NACT,IPROC,XLAB,FLAB,
     > NSCD,NSCA,SCVAL_act(1),SCLAB,IER)
 
! copy back outputs if modified.
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_F = F_act
      DEALLOCATE(F_act)
      if(nscd.gt.0) R8_SCVAL(1:NSCD) = SCVAL_act
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF1DRE
      SUBROUTINE R8_UF1DRE(
     > ILUN,R8_X,R8_F,NDIM,NACT,IER,LUNO)
 
      external UF1DRE
 
! argument declarations
      INTEGER ILUN
      INTEGER NDIM
      INTEGER NACT
      INTEGER IER
      INTEGER LUNO
 ! floating type, output only:
      REAL*8 R8_X(NDIM)
 
 ! floating type, output only:
      REAL*8 R8_F(NDIM)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: F_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NDIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DRE -- X_act ALLOCATE error!')
      ALLOCATE(F_act(NDIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DRE -- F_act ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=0
      F_act=0
! call to original routine:  UF1DRE
 
      CALL UF1DRE(
     > ILUN,X_act(1),F_act(1),NDIM,NACT,IER,LUNO)
 
! copy back outputs if modified.
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_F = F_act
      DEALLOCATE(F_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF1DWR
      SUBROUTINE R8_UF1DWR(
     > ILUN,IDEV_I,ZSDATE_I,R8_X,R8_F,N,IPROC,XLAB_I,FLAB_I,NSC,
     > R8_SCVAL,SCLAB_I,IER)
 
      external UF1DWR
 
! argument declarations
      INTEGER ILUN
      CHARACTER*(*) IDEV_I
      CHARACTER*(*) ZSDATE_I
      INTEGER N
      INTEGER IPROC
      INTEGER NSC
      INTEGER IER
 ! floating type, input only:
      REAL*8 R8_X(N)
 
 ! floating type, input only:
      REAL*8 R8_F(N)
 
      CHARACTER*(*) XLAB_I(3)
      CHARACTER*(*) FLAB_I(3)
 ! floating type, input only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB_I(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: F_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DWR -- X_act ALLOCATE error!')
      ALLOCATE(F_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DWR -- F_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSC))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1DWR -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      F_act=R8_F
      if(nsc.ge.1) then
         SCVAL_act=R8_SCVAL(1:NSC)
      else
         SCVAL_ACT=0
      endif

! call to original routine:  UF1DWR
 
      CALL UF1DWR(
     > ILUN,IDEV_I,ZSDATE_I,X_act(1),F_act(1),N,IPROC,XLAB_I,FLAB_I,NSC,
     > SCVAL_act(1),SCLAB_I,IER)
 
! copy back outputs if modified.
      DEALLOCATE(X_act)
      DEALLOCATE(F_act)
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF1XTR
      SUBROUTINE R8_UF1XTR(
     > LUN,TDEV,SHDATE,R8_TIME,R8_DTAVE,R8_X,R8_F,NMAX,N,IPROC,XLAB,
     > FLAB,NSCMAX,NSC,R8_SCVAL,SCLAB,IER)
 
      external UF1XTR
 
! argument declarations
      INTEGER LUN
      CHARACTER*4 TDEV
      CHARACTER*10 SHDATE
 ! floating type, input only:
      REAL*8 R8_TIME
 
 ! floating type, input only:
      REAL*8 R8_DTAVE
 
      INTEGER NMAX
      INTEGER N
      INTEGER IPROC
      CHARACTER*30 XLAB
      CHARACTER*30 FLAB
      INTEGER NSCMAX
      INTEGER NSC
      INTEGER IER
 ! floating type, output only:
      REAL*8 R8_X(NMAX)
 
 ! floating type, output only:
      REAL*8 R8_F(NMAX)
 
 ! floating type, output only:
      REAL*8 R8_SCVAL(NSCMAX)
 
      CHARACTER*10 SCLAB(3,NSCMAX)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL :: TIME_act
      REAL :: DTAVE_act
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: F_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NMAX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1XTR -- X_act ALLOCATE error!')
      ALLOCATE(F_act(NMAX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1XTR -- F_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(NSCMAX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF1XTR -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      TIME_act=R8_TIME
      DTAVE_act=R8_DTAVE
      X_act=0
      F_act=0
      SCVAL_act=0
! call to original routine:  UF1XTR
 
      CALL UF1XTR(
     > LUN,TDEV,SHDATE,TIME_act,DTAVE_act,X_act(1),F_act(1),NMAX,N,
     > IPROC,XLAB,FLAB,NSCMAX,NSC,SCVAL_act(1),SCLAB,IER)
 
! copy back outputs if modified.
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_F = F_act
      DEALLOCATE(F_act)
      R8_SCVAL = SCVAL_act
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  EXTR_X
      SUBROUTINE R8_EXTR_X(
     > R8_WORK,NX,NY,R8_X_I,R8_F,R8_TIME,R8_DTAVE)
 
      external EXTR_X
 
! argument declarations
      INTEGER NX
      INTEGER NY
 ! floating type, input only:
      REAL*8 R8_TIME
 
 ! floating type, input only:
      REAL*8 R8_DTAVE
 
 ! floating type, input only:
      REAL*8 R8_WORK(NX,NY)
 
 ! floating type, input only:
      REAL*8 R8_X_I(NX)
 
 ! floating type, output only:
      REAL*8 R8_F(NY)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: WORK_act(:,:)
      REAL, allocatable :: X_I_act(:)
      REAL, allocatable :: F_act(:)
      REAL :: TIME_act
      REAL :: DTAVE_act
 
! allocation of working arrays...
 
      ALLOCATE(WORK_act(NX,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_X -- WORK_act ALLOCATE error!')
      ALLOCATE(X_I_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_X -- X_I_act ALLOCATE error!')
      ALLOCATE(F_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_X -- F_act ALLOCATE error!')
 
! executable code:  copy for input
 
      WORK_act=R8_WORK
      X_I_act=R8_X_I
      F_act=0
      TIME_act=R8_TIME
      DTAVE_act=R8_DTAVE
! call to original routine:  EXTR_X
 
      CALL EXTR_X(
     > WORK_act(1,1),NX,NY,X_I_act(1),F_act(1),TIME_act,DTAVE_act)
 
! copy back outputs if modified.
      DEALLOCATE(WORK_act)
      DEALLOCATE(X_I_act)
      R8_F = F_act
      DEALLOCATE(F_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  EXTR_Y
      SUBROUTINE R8_EXTR_Y(
     > R8_WORK,NX,NY,R8_Y_I,R8_F,R8_TIME,R8_DTAVE)
 
      external EXTR_Y
 
! argument declarations
      INTEGER NX
      INTEGER NY
 ! floating type, input only:
      REAL*8 R8_TIME
 
 ! floating type, input only:
      REAL*8 R8_DTAVE
 
 ! floating type, input only:
      REAL*8 R8_WORK(NX,NY)
 
 ! floating type, input only:
      REAL*8 R8_Y_I(NY)
 
 ! floating type, output only:
      REAL*8 R8_F(NX)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: WORK_act(:,:)
      REAL, allocatable :: Y_I_act(:)
      REAL, allocatable :: F_act(:)
      REAL :: TIME_act
      REAL :: DTAVE_act
 
! allocation of working arrays...
 
      ALLOCATE(WORK_act(NX,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_Y -- WORK_act ALLOCATE error!')
      ALLOCATE(Y_I_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_Y -- Y_I_act ALLOCATE error!')
      ALLOCATE(F_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_EXTR_Y -- F_act ALLOCATE error!')
 
! executable code:  copy for input
 
      WORK_act=R8_WORK
      Y_I_act=R8_Y_I
      F_act=0
      TIME_act=R8_TIME
      DTAVE_act=R8_DTAVE
! call to original routine:  EXTR_Y
 
      CALL EXTR_Y(
     > WORK_act(1,1),NX,NY,Y_I_act(1),F_act(1),TIME_act,DTAVE_act)
 
! copy back outputs if modified.
      DEALLOCATE(WORK_act)
      DEALLOCATE(Y_I_act)
      R8_F = F_act
      DEALLOCATE(F_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF2DRD
      SUBROUTINE R8_UF2DRD(
     > ILUN,IDEV,ZSDATE,R8_F,NF1,R8_X,NX,R8_Y,NY,IPROC,NXACT,NYACT,
     > IFLAG,FLAB,XLAB,YLAB,NSCD,NSCA,R8_SCVAL,SCLAB,IER)
 
      external UF2DRD
 
! argument declarations
      INTEGER ILUN
      CHARACTER*4 IDEV
      CHARACTER*10 ZSDATE
      INTEGER NF1
      INTEGER NX
      INTEGER NY
      INTEGER IPROC
      INTEGER NXACT
      INTEGER NYACT
      INTEGER IFLAG
      CHARACTER*30 FLAB
      CHARACTER*30 XLAB
      CHARACTER*30 YLAB
      INTEGER NSCD
      INTEGER NSCA
      INTEGER IER
 ! floating type, output only:
      REAL*8 R8_F(NF1,NY)
 
 ! floating type, output only:
      REAL*8 R8_X(NX)
 
 ! floating type, output only:
      REAL*8 R8_Y(NY)
 
 ! floating type, output only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRD -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRD -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRD -- Y_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSCD))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRD -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=0
      X_act=0
      Y_act=0
      SCVAL_act=0
! call to original routine:  UF2DRD
 
      CALL UF2DRD(
     > ILUN,IDEV,ZSDATE,F_act(1,1),NF1,X_act(1),NX,Y_act(1),NY,IPROC,
     > NXACT,NYACT,IFLAG,FLAB,XLAB,YLAB,NSCD,NSCA,SCVAL_act(1),SCLAB,
     > IER)
 
! copy back outputs if modified.
      R8_F = F_act
      DEALLOCATE(F_act)
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_Y = Y_act
      DEALLOCATE(Y_act)
      if(nscd.gt.0) R8_SCVAL(1:NSCD) = SCVAL_act
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UFMDS_FMOV
      SUBROUTINE R8_UFMDS_FMOV(
     > R8_FIN,NXIN,NY,R8_FOUT,NXOUT)
 
      external UFMDS_FMOV
 
! argument declarations
      INTEGER NXIN
      INTEGER NY
      INTEGER NXOUT
 ! floating type, input/output:
      REAL*8 R8_FIN(NXIN,NY)
 
 ! floating type, input/output:
      REAL*8 R8_FOUT(NXOUT,NY)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: FIN_act(:,:)
      REAL, allocatable :: FIN_ref(:,:)
      REAL, allocatable :: FOUT_act(:,:)
      REAL, allocatable :: FOUT_ref(:,:)
 
! allocation of working arrays...
 
      ALLOCATE(FIN_act(NXIN,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFMDS_FMOV -- FIN_act ALLOCATE error!')
      ALLOCATE(FIN_ref(NXIN,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFMDS_FMOV -- FIN_ref ALLOCATE error!')
      ALLOCATE(FOUT_act(NXOUT,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFMDS_FMOV -- FOUT_act ALLOCATE error!')
      ALLOCATE(FOUT_ref(NXOUT,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFMDS_FMOV -- FOUT_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      FIN_act=R8_FIN
      FIN_ref=R8_FIN
 
      FOUT_act=R8_FOUT
      FOUT_ref=R8_FOUT
 
! call to original routine:  UFMDS_FMOV
 
      CALL UFMDS_FMOV(
     > FIN_act(1,1),NXIN,NY,FOUT_act(1,1),NXOUT)
 
! copy back outputs if modified.
 
      where(FIN_act.ne.FIN_ref)
         R8_FIN = FIN_act
      end where
      DEALLOCATE(FIN_act)
      DEALLOCATE(FIN_ref)
 
      where(FOUT_act.ne.FOUT_ref)
         R8_FOUT = FOUT_act
      end where
      DEALLOCATE(FOUT_act)
      DEALLOCATE(FOUT_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF2DRE
      SUBROUTINE R8_UF2DRE(
     > ILUN,R8_F,NF1,R8_X,NX,R8_Y,NY,NXACT,NYACT,IFLAG,IER,LUNO)
 
      external UF2DRE
 
! argument declarations
      INTEGER ILUN
      INTEGER NF1
      INTEGER NX
      INTEGER NY
      INTEGER NXACT
      INTEGER NYACT
      INTEGER IFLAG
      INTEGER IER
      INTEGER LUNO
 ! floating type, output only:
      REAL*8 R8_F(NF1,NY)
 
 ! floating type, output only:
      REAL*8 R8_X(NX)
 
 ! floating type, output only:
      REAL*8 R8_Y(NY)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRE -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRE -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DRE -- Y_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=0
      X_act=0
      Y_act=0
! call to original routine:  UF2DRE
 
      CALL UF2DRE(
     > ILUN,F_act(1,1),NF1,X_act(1),NX,Y_act(1),NY,NXACT,NYACT,IFLAG,
     > IER,LUNO)
 
! copy back outputs if modified.
      R8_F = F_act
      DEALLOCATE(F_act)
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_Y = Y_act
      DEALLOCATE(Y_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF2DWR
      SUBROUTINE R8_UF2DWR(
     > ILUN,IDEV_I,ZSDATE_I,R8_F,NF1,R8_X,NX,R8_Y,NY,IPROC,FLAB_I,
     > XLAB_I,YLAB_I,NSC,R8_SCVAL,SCLAB_I,IER)
 
      external UF2DWR
 
! argument declarations
      INTEGER ILUN
      CHARACTER*(*) IDEV_I
      CHARACTER*(*) ZSDATE_I
      INTEGER NF1
      INTEGER NX
      INTEGER NY
      INTEGER IPROC
      INTEGER NSC
      INTEGER IER
 ! floating type, input only:
      REAL*8 R8_F(NF1,NY)
 
 ! floating type, input only:
      REAL*8 R8_X(NX)
 
 ! floating type, input only:
      REAL*8 R8_Y(NY)
 
      CHARACTER*(*) FLAB_I(3)
      CHARACTER*(*) XLAB_I(3)
      CHARACTER*(*) YLAB_I(3)
 ! floating type, input only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB_I(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DWR -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DWR -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DWR -- Y_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSC))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF2DWR -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=R8_F
      X_act=R8_X
      Y_act=R8_Y
      if(nsc.ge.1) then
         SCVAL_act=R8_SCVAL(1:NSC)
      else
         SCVAL_ACT=0
      endif

! call to original routine:  UF2DWR
 
      CALL UF2DWR(
     > ILUN,IDEV_I,ZSDATE_I,F_act(1,1),NF1,X_act(1),NX,Y_act(1),NY,
     > IPROC,FLAB_I,XLAB_I,YLAB_I,NSC,SCVAL_act(1),SCLAB_I,IER)
 
! copy back outputs if modified.
      DEALLOCATE(F_act)
      DEALLOCATE(X_act)
      DEALLOCATE(Y_act)
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF3DRD
      SUBROUTINE R8_UF3DRD(
     > ILUN,IDEV,ZSDATE,R8_F,NF1,NF2,R8_X,NX,R8_Y,NY,R8_Z,NZ,IPROC,
     > NXACT,NYACT,NZACT,IFLAG,FLAB,XLAB,YLAB,ZLAB,NSCD,NSCA,R8_SCVAL,
     > SCLAB,IER)
 
      external UF3DRD
 
! argument declarations
      INTEGER ILUN
      CHARACTER*4 IDEV
      CHARACTER*10 ZSDATE
      INTEGER NF1
      INTEGER NF2
      INTEGER NX
      INTEGER NY
      INTEGER NZ
      INTEGER IPROC
      INTEGER NXACT
      INTEGER NYACT
      INTEGER NZACT
      INTEGER IFLAG
      CHARACTER*30 FLAB
      CHARACTER*30 XLAB
      CHARACTER*30 YLAB
      CHARACTER*30 ZLAB
      INTEGER NSCD
      INTEGER NSCA
      INTEGER IER
 ! floating type, output only:
      REAL*8 R8_F(NF1,NF2,NZ)
 
 ! floating type, output only:
      REAL*8 R8_X(NX)
 
 ! floating type, output only:
      REAL*8 R8_Y(NY)
 
 ! floating type, output only:
      REAL*8 R8_Z(NZ)
 
 ! floating type, output only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: Z_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NF2,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRD -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRD -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRD -- Y_act ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRD -- Z_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSCD))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRD -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=0
      X_act=0
      Y_act=0
      Z_act=0
      SCVAL_act=0
! call to original routine:  UF3DRD
 
      CALL UF3DRD(
     > ILUN,IDEV,ZSDATE,F_act(1,1,1),NF1,NF2,X_act(1),NX,Y_act(1),NY,
     > Z_act(1),NZ,IPROC,NXACT,NYACT,NZACT,IFLAG,FLAB,XLAB,YLAB,ZLAB,
     > NSCD,NSCA,SCVAL_act(1),SCLAB,IER)
 
! copy back outputs if modified.
      R8_F = F_act
      DEALLOCATE(F_act)
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_Y = Y_act
      DEALLOCATE(Y_act)
      R8_Z = Z_act
      DEALLOCATE(Z_act)
      if(nscd.gt.0) R8_SCVAL(1:NSCD) = SCVAL_act
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF3DRE
      SUBROUTINE R8_UF3DRE(
     > ILUN,R8_F,NF1,NF2,R8_X,NX,R8_Y,NY,R8_Z,NZ,NXACT,NYACT,NZACT,
     > IFLAG,IER,LUNO)
 
      external UF3DRE
 
! argument declarations
      INTEGER ILUN
      INTEGER NF1
      INTEGER NF2
      INTEGER NX
      INTEGER NY
      INTEGER NZ
      INTEGER NXACT
      INTEGER NYACT
      INTEGER NZACT
      INTEGER IFLAG
      INTEGER IER
      INTEGER LUNO
 ! floating type, output only:
      REAL*8 R8_F(NF1,NF2,NZ)
 
 ! floating type, output only:
      REAL*8 R8_X(NX)
 
 ! floating type, output only:
      REAL*8 R8_Y(NY)
 
 ! floating type, output only:
      REAL*8 R8_Z(NZ)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: Z_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NF2,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRE -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRE -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRE -- Y_act ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DRE -- Z_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=0
      X_act=0
      Y_act=0
      Z_act=0
! call to original routine:  UF3DRE
 
      CALL UF3DRE(
     > ILUN,F_act(1,1,1),NF1,NF2,X_act(1),NX,Y_act(1),NY,Z_act(1),NZ,
     > NXACT,NYACT,NZACT,IFLAG,IER,LUNO)
 
! copy back outputs if modified.
      R8_F = F_act
      DEALLOCATE(F_act)
      R8_X = X_act
      DEALLOCATE(X_act)
      R8_Y = Y_act
      DEALLOCATE(Y_act)
      R8_Z = Z_act
      DEALLOCATE(Z_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UF3DWR
      SUBROUTINE R8_UF3DWR(
     > ILUN,IDEV_I,ZSDATE_I,R8_F,NF1,NF2,R8_X,NX,R8_Y,NY,R8_Z,NZ,IPROC,
     > FLAB_I,XLAB_I,YLAB_I,ZLAB_I,NSC,R8_SCVAL,SCLAB_I,IER)
 
      external UF3DWR
 
! argument declarations
      INTEGER ILUN
      CHARACTER*(*) IDEV_I
      CHARACTER*(*) ZSDATE_I
      INTEGER NF1
      INTEGER NF2
      INTEGER NX
      INTEGER NY
      INTEGER NZ
      INTEGER IPROC
      INTEGER NSC
      INTEGER IER
 ! floating type, input only:
      REAL*8 R8_F(NF1,NF2,NZ)
 
 ! floating type, input only:
      REAL*8 R8_X(NX)
 
 ! floating type, input only:
      REAL*8 R8_Y(NY)
 
 ! floating type, input only:
      REAL*8 R8_Z(NZ)
 
      CHARACTER*(*) FLAB_I(3)
      CHARACTER*(*) XLAB_I(3)
      CHARACTER*(*) YLAB_I(3)
      CHARACTER*(*) ZLAB_I(3)
 ! floating type, input only:
      REAL*8 R8_SCVAL(*)
 
      CHARACTER*30 SCLAB_I(*)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:,:,:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: Z_act(:)
      REAL, allocatable :: SCVAL_act(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NF2,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DWR -- F_act ALLOCATE error!')
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DWR -- X_act ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DWR -- Y_act ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DWR -- Z_act ALLOCATE error!')
      ALLOCATE(SCVAL_act(max(1,NSC))
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UF3DWR -- SCVAL_act ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=R8_F
      X_act=R8_X
      Y_act=R8_Y
      Z_act=R8_Z
      if(nsc.ge.1) then
         SCVAL_act=R8_SCVAL(1:NSC)
      else
         SCVAL_ACT=0
      endif

! call to original routine:  UF3DWR
 
      CALL UF3DWR(
     > ILUN,IDEV_I,ZSDATE_I,F_act(1,1,1),NF1,NF2,X_act(1),NX,Y_act(1),
     > NY,Z_act(1),NZ,IPROC,FLAB_I,XLAB_I,YLAB_I,ZLAB_I,NSC,
     > SCVAL_act(1),SCLAB_I,IER)
 
! copy back outputs if modified.
      DEALLOCATE(F_act)
      DEALLOCATE(X_act)
      DEALLOCATE(Y_act)
      DEALLOCATE(Z_act)
      DEALLOCATE(SCVAL_act)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UFSWXY2
      SUBROUTINE R8_UFSWXY2(
     > R8_F,R8_FB,ISIZ,R8_X,NX,R8_Y,NY,XLAB,YLAB,XUNITS,YUNITS)
 
      external UFSWXY2
 
! argument declarations
      INTEGER ISIZ
      INTEGER NX
      INTEGER NY
      CHARACTER*(*) XLAB
      CHARACTER*(*) YLAB
      CHARACTER*(*) XUNITS
      CHARACTER*(*) YUNITS
 ! floating type, input/output:
      REAL*8 R8_F(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_FB(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_X(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_Y(ISIZ)
 
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:)
      REAL, allocatable :: F_ref(:)
      REAL, allocatable :: FB_act(:)
      REAL, allocatable :: FB_ref(:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: X_ref(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: Y_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- F_act ALLOCATE error!')
      ALLOCATE(F_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- F_ref ALLOCATE error!')
      ALLOCATE(FB_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- FB_act ALLOCATE error!')
      ALLOCATE(FB_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- FB_ref ALLOCATE error!')
      ALLOCATE(X_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY2 -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=R8_F
      F_ref=R8_F
 
      FB_act=R8_FB
      FB_ref=R8_FB
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
! call to original routine:  UFSWXY2
 
      CALL UFSWXY2(
     > F_act(1),FB_act(1),ISIZ,X_act(1),NX,Y_act(1),NY,XLAB,YLAB,XUNITS,
     > YUNITS)
 
! copy back outputs if modified.
 
      where(F_act.ne.F_ref)
         R8_F = F_act
      end where
      DEALLOCATE(F_act)
      DEALLOCATE(F_ref)
 
      where(FB_act.ne.FB_ref)
         R8_FB = FB_act
      end where
      DEALLOCATE(FB_act)
      DEALLOCATE(FB_ref)
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) REAL*8 interface to:  UFSWXY
      SUBROUTINE R8_UFSWXY(
     > R8_F,R8_FB,ISIZ,R8_X,NX,R8_Y,NY,XLAB,YLAB)
 
      external UFSWXY
 
! argument declarations
      INTEGER ISIZ
      INTEGER NX
      INTEGER NY
 ! floating type, input/output:
      REAL*8 R8_F(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_FB(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_X(ISIZ)
 
 ! floating type, input/output:
      REAL*8 R8_Y(ISIZ)
 
      CHARACTER*10 XLAB(3)
      CHARACTER*10 YLAB(3)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, allocatable :: F_act(:)
      REAL, allocatable :: F_ref(:)
      REAL, allocatable :: FB_act(:)
      REAL, allocatable :: FB_ref(:)
      REAL, allocatable :: X_act(:)
      REAL, allocatable :: X_ref(:)
      REAL, allocatable :: Y_act(:)
      REAL, allocatable :: Y_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- F_act ALLOCATE error!')
      ALLOCATE(F_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- F_ref ALLOCATE error!')
      ALLOCATE(FB_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- FB_act ALLOCATE error!')
      ALLOCATE(FB_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- FB_ref ALLOCATE error!')
      ALLOCATE(X_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(ISIZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_UFSWXY -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=R8_F
      F_ref=R8_F
 
      FB_act=R8_FB
      FB_ref=R8_FB
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
! call to original routine:  UFSWXY
 
      CALL UFSWXY(
     > F_act(1),FB_act(1),ISIZ,X_act(1),NX,Y_act(1),NY,XLAB,YLAB)
 
! copy back outputs if modified.
 
      where(F_act.ne.F_ref)
         R8_F = F_act
      end where
      DEALLOCATE(F_act)
      DEALLOCATE(F_ref)
 
      where(FB_act.ne.FB_ref)
         R8_FB = FB_act
      end where
      DEALLOCATE(FB_act)
      DEALLOCATE(FB_ref)
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
! exit
      return
      end
