! real*8 interface generated by r8igen.csh --
! ...in /transp/users/dmccune/troot/tmp/trgraf2
! csh -f r8igen.csh r8_trgraf.for foo.msg
 
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GMMSEL
      SUBROUTINE R8_GMMSEL(
     > R8_R,R8_Y,ND1,NC,R8_Z,NZ,RUN,YUN,ZLAB,ZUN,MNLAB,KYLAB,FZLAB)
 
      external GMMSEL
 
! argument declarations
      REAL*8 R8_R(ND1,NZ)
      REAL*8 R8_Y(ND1,NZ)
      INTEGER ND1
      INTEGER NC
      REAL*8 R8_Z(NZ)
      INTEGER NZ
      CHARACTER*(*) RUN
      CHARACTER*(*) YUN
      CHARACTER*(*) ZLAB
      CHARACTER*(*) ZUN
      CHARACTER*(*) MNLAB(3)
      CHARACTER*(*) KYLAB(5)
      CHARACTER*(*) FZLAB(15)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: R_act(:,:)
      REAL, pointer :: R_ref(:,:)
      REAL, pointer :: Y_act(:,:)
      REAL, pointer :: Y_ref(:,:)
      REAL, pointer :: Z_act(:)
      REAL, pointer :: Z_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(R_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- R_act ALLOCATE error!')
      ALLOCATE(R_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- R_ref ALLOCATE error!')
      ALLOCATE(Y_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- Y_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GMMSEL -- Z_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      R_act=R8_R
      R_ref=R8_R
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
! call to original routine:  GMMSEL
 
      CALL GMMSEL(
     > R_act(1,1),Y_act(1,1),ND1,NC,Z_act(1),NZ,RUN,YUN,ZLAB,ZUN,MNLAB,
     > KYLAB,FZLAB)
 
! copy back outputs if modified.
 
      where(R_act.ne.R_ref)
         R8_R = R_act
      end where
      DEALLOCATE(R_act)
      DEALLOCATE(R_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFC2
      SUBROUTINE R8_GRAFC2(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFC2
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC2 -- Y2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
! call to original routine:  GRAFC2
 
      CALL GRAFC2(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,XUN,YUN,LBL1,LBL2,
     > LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFC3
      SUBROUTINE R8_GRAFC3(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,R8_X3,R8_Y3,N3,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFC3
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      REAL*8 R8_X3(N3)
      REAL*8 R8_Y3(N3)
      INTEGER N3
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      REAL, pointer :: X3_act(:)
      REAL, pointer :: X3_ref(:)
      REAL, pointer :: Y3_act(:)
      REAL, pointer :: Y3_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y2_ref ALLOCATE error!')
      ALLOCATE(X3_act(N3)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X3_act ALLOCATE error!')
      ALLOCATE(X3_ref(N3)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- X3_ref ALLOCATE error!')
      ALLOCATE(Y3_act(N3)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y3_act ALLOCATE error!')
      ALLOCATE(Y3_ref(N3)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFC3 -- Y3_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
      X3_act=R8_X3
      X3_ref=R8_X3
 
      Y3_act=R8_Y3
      Y3_ref=R8_Y3
 
! call to original routine:  GRAFC3
 
      CALL GRAFC3(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,X3_act(1),Y3_act(1),
     > N3,XUN,YUN,LBL1,LBL2,LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
      where(X3_act.ne.X3_ref)
         R8_X3 = X3_act
      end where
      DEALLOCATE(X3_act)
      DEALLOCATE(X3_ref)
 
      where(Y3_act.ne.Y3_ref)
         R8_Y3 = Y3_act
      end where
      DEALLOCATE(Y3_act)
      DEALLOCATE(Y3_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFWC
      SUBROUTINE R8_GRAFWC(
     > R8_X,R8_Y,R8_Y2,N,XUN,YUN,LBL1,LBL2,LBL3,JCUT,R8_X5,R8_Y5)
 
      external GRAFWC
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      REAL*8 R8_Y2(N)
      INTEGER N
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
      INTEGER JCUT(2)
      REAL*8 R8_X5(5)
      REAL*8 R8_Y5(5)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      REAL, pointer :: X5_act(:)
      REAL, pointer :: X5_ref(:)
      REAL, pointer :: Y5_act(:)
      REAL, pointer :: Y5_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y2_ref ALLOCATE error!')
      ALLOCATE(X5_act(5)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- X5_act ALLOCATE error!')
      ALLOCATE(X5_ref(5)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- X5_ref ALLOCATE error!')
      ALLOCATE(Y5_act(5)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y5_act ALLOCATE error!')
      ALLOCATE(Y5_ref(5)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFWC -- Y5_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
      X5_act=R8_X5
      X5_ref=R8_X5
 
      Y5_act=R8_Y5
      Y5_ref=R8_Y5
 
! call to original routine:  GRAFWC
 
      CALL GRAFWC(
     > X_act(1),Y_act(1),Y2_act(1),N,XUN,YUN,LBL1,LBL2,LBL3,JCUT,
     > X5_act(1),Y5_act(1))
 
! copy back outputs if modified.
 
      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)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
      where(X5_act.ne.X5_ref)
         R8_X5 = X5_act
      end where
      DEALLOCATE(X5_act)
      DEALLOCATE(X5_ref)
 
      where(Y5_act.ne.Y5_ref)
         R8_Y5 = Y5_act
      end where
      DEALLOCATE(Y5_act)
      DEALLOCATE(Y5_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFX1
      SUBROUTINE R8_GRAFX1(
     > R8_X,R8_Y,N,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFX1
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX1 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX1 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX1 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX1 -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
! call to original routine:  GRAFX1
 
      CALL GRAFX1(
     > X_act(1),Y_act(1),N,XUN,YUN,LBL1,LBL2,LBL3)
 
! copy back outputs if modified.
 
      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:  GRAFX2
      SUBROUTINE R8_GRAFX2(
     > R8_X,R8_Y,R8_Y2,N,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFX2
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      REAL*8 R8_Y2(N)
      INTEGER N
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- Y_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX2 -- Y2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
! call to original routine:  GRAFX2
 
      CALL GRAFX2(
     > X_act(1),Y_act(1),Y2_act(1),N,XUN,YUN,LBL1,LBL2,LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFX3
      SUBROUTINE R8_GRAFX3(
     > R8_X,R8_Y,R8_Y2,R8_Y3,N,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFX3
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      REAL*8 R8_Y2(N)
      REAL*8 R8_Y3(N)
      INTEGER N
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      REAL, pointer :: Y3_act(:)
      REAL, pointer :: Y3_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y2_ref ALLOCATE error!')
      ALLOCATE(Y3_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y3_act ALLOCATE error!')
      ALLOCATE(Y3_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX3 -- Y3_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
      Y3_act=R8_Y3
      Y3_ref=R8_Y3
 
! call to original routine:  GRAFX3
 
      CALL GRAFX3(
     > X_act(1),Y_act(1),Y2_act(1),Y3_act(1),N,XUN,YUN,LBL1,LBL2,LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
      where(Y3_act.ne.Y3_ref)
         R8_Y3 = Y3_act
      end where
      DEALLOCATE(Y3_act)
      DEALLOCATE(Y3_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFX4
      SUBROUTINE R8_GRAFX4(
     > R8_X,R8_Y,R8_Y2,R8_Y3,R8_Y4,N,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFX4
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      REAL*8 R8_Y2(N)
      REAL*8 R8_Y3(N)
      REAL*8 R8_Y4(N)
      INTEGER N
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      REAL, pointer :: Y3_act(:)
      REAL, pointer :: Y3_ref(:)
      REAL, pointer :: Y4_act(:)
      REAL, pointer :: Y4_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y2_ref ALLOCATE error!')
      ALLOCATE(Y3_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y3_act ALLOCATE error!')
      ALLOCATE(Y3_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y3_ref ALLOCATE error!')
      ALLOCATE(Y4_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y4_act ALLOCATE error!')
      ALLOCATE(Y4_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFX4 -- Y4_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
      Y3_act=R8_Y3
      Y3_ref=R8_Y3
 
      Y4_act=R8_Y4
      Y4_ref=R8_Y4
 
! call to original routine:  GRAFX4
 
      CALL GRAFX4(
     > X_act(1),Y_act(1),Y2_act(1),Y3_act(1),Y4_act(1),N,XUN,YUN,LBL1,
     > LBL2,LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
      where(Y3_act.ne.Y3_ref)
         R8_Y3 = Y3_act
      end where
      DEALLOCATE(Y3_act)
      DEALLOCATE(Y3_ref)
 
      where(Y4_act.ne.Y4_ref)
         R8_Y4 = Y4_act
      end where
      DEALLOCATE(Y4_act)
      DEALLOCATE(Y4_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFXE
      SUBROUTINE R8_GRAFXE(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,IX2E,R8_X2E,IY2E,R8_Y2E,XUN,YUN,LBL1,
     > LBL2,LBL3)
 
      external GRAFXE
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      INTEGER IX2E
      REAL*8 R8_X2E(N2)
      INTEGER IY2E
      REAL*8 R8_Y2E(N2)
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      REAL, pointer :: X2E_act(:)
      REAL, pointer :: X2E_ref(:)
      REAL, pointer :: Y2E_act(:)
      REAL, pointer :: Y2E_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y2_ref ALLOCATE error!')
      ALLOCATE(X2E_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X2E_act ALLOCATE error!')
      ALLOCATE(X2E_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- X2E_ref ALLOCATE error!')
      ALLOCATE(Y2E_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y2E_act ALLOCATE error!')
      ALLOCATE(Y2E_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXE -- Y2E_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
      X2E_act=R8_X2E
      X2E_ref=R8_X2E
 
      Y2E_act=R8_Y2E
      Y2E_ref=R8_Y2E
 
! call to original routine:  GRAFXE
 
      CALL GRAFXE(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,IX2E,X2E_act(1),IY2E,
     > Y2E_act(1),XUN,YUN,LBL1,LBL2,LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
      where(X2E_act.ne.X2E_ref)
         R8_X2E = X2E_act
      end where
      DEALLOCATE(X2E_act)
      DEALLOCATE(X2E_ref)
 
      where(Y2E_act.ne.Y2E_ref)
         R8_Y2E = Y2E_act
      end where
      DEALLOCATE(Y2E_act)
      DEALLOCATE(Y2E_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFXF
      SUBROUTINE R8_GRAFXF(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,XUN,YUN,LBL1,LBL2,LBL3)
 
      external GRAFXF
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
! call to original routine:  GRAFXF
 
      CALL GRAFXF(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,XUN,YUN,LBL1,LBL2,
     > LBL3)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFXF
      SUBROUTINE R8_GRAFXF_icod(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,XUN,YUN,LBL1,LBL2,LBL3,icdd)
 
      external GRAFXF
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      integer :: icdd
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
! call to original routine:  GRAFXF
 
      CALL GRAFXF_icod(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,XUN,YUN,LBL1,LBL2,
     > LBL3,icdd)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRAFXF
      SUBROUTINE R8_GRAFXF_icod0(
     > R8_X,R8_Y,N,R8_X2,R8_Y2,N2,XUN,YUN,LBL1,LBL2,LBL3,icdd)
! same as R8_GRAFXF_icod but with small size of individual points
 
      external GRAFXF
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      REAL*8 R8_X2(N2)
      REAL*8 R8_Y2(N2)
      INTEGER N2
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) LBL1
      CHARACTER*(*) LBL2
      CHARACTER*(*) LBL3
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: Y2_act(:)
      REAL, pointer :: Y2_ref(:)
      integer :: icdd
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y_ref ALLOCATE error!')
      ALLOCATE(X2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- X2_ref ALLOCATE error!')
      ALLOCATE(Y2_act(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_act ALLOCATE error!')
      ALLOCATE(Y2_ref(N2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRAFXF -- Y2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      Y2_act=R8_Y2
      Y2_ref=R8_Y2
 
! call to original routine:  GRAFXF
 
      CALL GRAFXF_icod0(
     > X_act(1),Y_act(1),N,X2_act(1),Y2_act(1),N2,XUN,YUN,LBL1,LBL2,
     > LBL3,icdd)
 
! copy back outputs if modified.
 
      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)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(Y2_act.ne.Y2_ref)
         R8_Y2 = Y2_act
      end where
      DEALLOCATE(Y2_act)
      DEALLOCATE(Y2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRF3
      SUBROUTINE R8_GRF3(
     > R8_X,R8_Z,R8_Y,R8_Z2,NX,NY,NZ1,XLAB,YLAB,ZLAB,XUN,YUN,ZUN,ZTITLE,
     > ITITLE,IDIR,ISF,IDEV,NSHOT,IAVTYP,NSHOT2,NS2,ISMTYP)
 
      external GRF3
 
! argument declarations
      REAL*8 R8_X(NX)
      REAL*8 R8_Z(NZ1,NY)
      REAL*8 R8_Y(NY)
      REAL*8 R8_Z2(NY)
      INTEGER NX
      INTEGER NY
      INTEGER NZ1
      CHARACTER*10 XLAB
      CHARACTER*10 YLAB
      CHARACTER*10 ZLAB(2)
      CHARACTER*10 XUN
      CHARACTER*10 YUN
      CHARACTER*10 ZUN
      CHARACTER*10 ZTITLE(3)
      INTEGER ITITLE
      INTEGER IDIR
      INTEGER ISF
      CHARACTER*4 IDEV
      INTEGER NSHOT
      INTEGER IAVTYP
      INTEGER NSHOT2(NS2)
      INTEGER NS2
      INTEGER ISMTYP
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Z_act(:,:)
      REAL, pointer :: Z_ref(:,:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: Z2_act(:)
      REAL, pointer :: Z2_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- X_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Z_ref ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Y_ref ALLOCATE error!')
      ALLOCATE(Z2_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Z2_act ALLOCATE error!')
      ALLOCATE(Z2_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3 -- Z2_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Z2_act=R8_Z2
      Z2_ref=R8_Z2
 
! call to original routine:  GRF3
 
      CALL GRF3(
     > X_act(1),Z_act(1,1),Y_act(1),Z2_act(1),NX,NY,NZ1,XLAB,YLAB,ZLAB,
     > XUN,YUN,ZUN,ZTITLE,ITITLE,IDIR,ISF,IDEV,NSHOT,IAVTYP,NSHOT2,NS2,
     > ISMTYP)
 
! copy back outputs if modified.
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(Z2_act.ne.Z2_ref)
         R8_Z2 = Z2_act
      end where
      DEALLOCATE(Z2_act)
      DEALLOCATE(Z2_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRF3F1
      SUBROUTINE R8_GRF3F1(
     > R8_X,R8_Z,R8_Y,R8_WK,NX,NY,NZ1,XLAB,ZLAB,YLAB,XUN,ZUN,YUN,ZTITLE,
     > ZLABEL,IPROC)
 
      external GRF3F1
 
! argument declarations
      REAL*8 R8_X(NX)
      REAL*8 R8_Z(NZ1,NY)
      REAL*8 R8_Y(NY)
      REAL*8 R8_WK(NY)
      INTEGER NX
      INTEGER NY
      INTEGER NZ1
      CHARACTER*(*) XLAB
      CHARACTER*(*) ZLAB
      CHARACTER*(*) YLAB
      CHARACTER*(*) XUN
      CHARACTER*(*) ZUN
      CHARACTER*(*) YUN
      CHARACTER*(*) ZTITLE
      CHARACTER*(*) ZLABEL
      INTEGER IPROC
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Z_act(:,:)
      REAL, pointer :: Z_ref(:,:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: WK_act(:)
      REAL, pointer :: WK_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- X_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- Z_ref ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- Y_ref ALLOCATE error!')
      ALLOCATE(WK_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- WK_act ALLOCATE error!')
      ALLOCATE(WK_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F1 -- WK_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      WK_act=R8_WK
      WK_ref=R8_WK
 
! call to original routine:  GRF3F1
 
      CALL GRF3F1(
     > X_act(1),Z_act(1,1),Y_act(1),WK_act(1),NX,NY,NZ1,XLAB,ZLAB,YLAB,
     > XUN,ZUN,YUN,ZTITLE,ZLABEL,IPROC)
 
! copy back outputs if modified.
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(WK_act.ne.WK_ref)
         R8_WK = WK_act
      end where
      DEALLOCATE(WK_act)
      DEALLOCATE(WK_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRF3F2
      SUBROUTINE R8_GRF3F2(
     > R8_X,R8_Z,R8_Z2,R8_Y,R8_WK,NX,NY,NZ1,XLAB,ZLAB,ZLAB2,YLAB,XUN,
     > ZUN,YUN,ZTITLE,ZLABEL,IPROC)
 
      external GRF3F2
 
! argument declarations
      REAL*8 R8_X(NX)
      REAL*8 R8_Z(NZ1,NY)
      REAL*8 R8_Z2(NZ1,NY)
      REAL*8 R8_Y(NY)
      REAL*8 R8_WK(NY,2)
      INTEGER NX
      INTEGER NY
      INTEGER NZ1
      CHARACTER*(*) XLAB
      CHARACTER*(*) ZLAB
      CHARACTER*(*) ZLAB2
      CHARACTER*(*) YLAB
      CHARACTER*(*) XUN
      CHARACTER*(*) ZUN
      CHARACTER*(*) YUN
      CHARACTER*(*) ZTITLE
      CHARACTER*(*) ZLABEL
      INTEGER IPROC
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Z_act(:,:)
      REAL, pointer :: Z_ref(:,:)
      REAL, pointer :: Z2_act(:,:)
      REAL, pointer :: Z2_ref(:,:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: WK_act(:,:)
      REAL, pointer :: WK_ref(:,:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- X_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Z_ref ALLOCATE error!')
      ALLOCATE(Z2_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Z2_act ALLOCATE error!')
      ALLOCATE(Z2_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Z2_ref ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- Y_ref ALLOCATE error!')
      ALLOCATE(WK_act(NY,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- WK_act ALLOCATE error!')
      ALLOCATE(WK_ref(NY,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3F2 -- WK_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
      Z2_act=R8_Z2
      Z2_ref=R8_Z2
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      WK_act=R8_WK
      WK_ref=R8_WK
 
! call to original routine:  GRF3F2
 
      CALL GRF3F2(
     > X_act(1),Z_act(1,1),Z2_act(1,1),Y_act(1),WK_act(1,1),NX,NY,NZ1,
     > XLAB,ZLAB,ZLAB2,YLAB,XUN,ZUN,YUN,ZTITLE,ZLABEL,IPROC)
 
! copy back outputs if modified.
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
      where(Z2_act.ne.Z2_ref)
         R8_Z2 = Z2_act
      end where
      DEALLOCATE(Z2_act)
      DEALLOCATE(Z2_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(WK_act.ne.WK_ref)
         R8_WK = WK_act
      end where
      DEALLOCATE(WK_act)
      DEALLOCATE(WK_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRF3X2
      SUBROUTINE R8_GRF3X2(
     > R8_X,R8_Z,R8_Z2,R8_Y,R8_ZWK,NX,NY,NZ1,XLAB,YLAB,ZLAB1,ZLAB2,XUN,
     > YUN,ZUN,ZTITLE,ITITLE,IDIR,ISF,IDEV,NSHOT,IAVTYP,NSHOT2,NS2,
     > ISMTYP)
 
      external GRF3X2
 
! argument declarations
      REAL*8 R8_X(NX)
      REAL*8 R8_Z(NZ1,NY)
      REAL*8 R8_Z2(NZ1,NY)
      REAL*8 R8_Y(NY)
      REAL*8 R8_ZWK(NY,2)
      INTEGER NX
      INTEGER NY
      INTEGER NZ1
      CHARACTER*10 XLAB
      CHARACTER*10 YLAB
      CHARACTER*10 ZLAB1(2)
      CHARACTER*10 ZLAB2(2)
      CHARACTER*10 XUN
      CHARACTER*10 YUN
      CHARACTER*10 ZUN
      CHARACTER*10 ZTITLE(3)
      INTEGER ITITLE
      INTEGER IDIR
      INTEGER ISF
      CHARACTER*4 IDEV
      INTEGER NSHOT
      INTEGER IAVTYP
      INTEGER NSHOT2(NS2)
      INTEGER NS2
      INTEGER ISMTYP
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Z_act(:,:)
      REAL, pointer :: Z_ref(:,:)
      REAL, pointer :: Z2_act(:,:)
      REAL, pointer :: Z2_ref(:,:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL, pointer :: ZWK_act(:,:)
      REAL, pointer :: ZWK_ref(:,:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- X_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Z_ref ALLOCATE error!')
      ALLOCATE(Z2_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Z2_act ALLOCATE error!')
      ALLOCATE(Z2_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Z2_ref ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- Y_ref ALLOCATE error!')
      ALLOCATE(ZWK_act(NY,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- ZWK_act ALLOCATE error!')
      ALLOCATE(ZWK_ref(NY,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRF3X2 -- ZWK_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
      Z2_act=R8_Z2
      Z2_ref=R8_Z2
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      ZWK_act=R8_ZWK
      ZWK_ref=R8_ZWK
 
! call to original routine:  GRF3X2
 
      CALL GRF3X2(
     > X_act(1),Z_act(1,1),Z2_act(1,1),Y_act(1),ZWK_act(1,1),NX,NY,NZ1,
     > XLAB,YLAB,ZLAB1,ZLAB2,XUN,YUN,ZUN,ZTITLE,ITITLE,IDIR,ISF,IDEV,
     > NSHOT,IAVTYP,NSHOT2,NS2,ISMTYP)
 
! copy back outputs if modified.
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
      where(Z2_act.ne.Z2_ref)
         R8_Z2 = Z2_act
      end where
      DEALLOCATE(Z2_act)
      DEALLOCATE(Z2_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(ZWK_act.ne.ZWK_ref)
         R8_ZWK = ZWK_act
      end where
      DEALLOCATE(ZWK_act)
      DEALLOCATE(ZWK_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRFAH0
      SUBROUTINE R8_GRFAH0(
     > R8_X,R8_Y,N,XLAB,YLAB,ZTITL,IFIXD,ZFIXD)
 
      external GRFAH0
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      CHARACTER*30 XLAB
      CHARACTER*30 YLAB
      CHARACTER*(*) ZTITL
      INTEGER IFIXD
      CHARACTER*(*) ZFIXD
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFAH0 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFAH0 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFAH0 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFAH0 -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
! call to original routine:  GRFAH0
 
      CALL GRFAH0(
     > X_act(1),Y_act(1),N,XLAB,YLAB,ZTITL,IFIXD,ZFIXD)
 
! copy back outputs if modified.
 
      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:  GRFFIT
      SUBROUTINE R8_GRFFIT(
     > R8_X,R8_Y,N,IPROC,LBLY,LBLX,ISHOT,IDEV,ZDATE,NXTR,R8_XTRVAL,
     > XTRLAB,NDPT,R8_XDPT,R8_YDPT)
 
      external GRFFIT
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      INTEGER IPROC
      CHARACTER*10 LBLY(3)
      CHARACTER*10 LBLX(3)
      INTEGER ISHOT
      CHARACTER*4 IDEV
      CHARACTER*10 ZDATE
      INTEGER NXTR
      REAL*8 R8_XTRVAL
      CHARACTER*10 XTRLAB(3)
      INTEGER NDPT
      REAL*8 R8_XDPT(NDPT)
      REAL*8 R8_YDPT(NDPT)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL :: XTRVAL_act
      REAL :: XTRVAL_ref
      REAL, pointer :: XDPT_act(:)
      REAL, pointer :: XDPT_ref(:)
      REAL, pointer :: YDPT_act(:)
      REAL, pointer :: YDPT_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- Y_ref ALLOCATE error!')
      ALLOCATE(XDPT_act(NDPT)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- XDPT_act ALLOCATE error!')
      ALLOCATE(XDPT_ref(NDPT)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- XDPT_ref ALLOCATE error!')
      ALLOCATE(YDPT_act(NDPT)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- YDPT_act ALLOCATE error!')
      ALLOCATE(YDPT_ref(NDPT)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFFIT -- YDPT_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      XTRVAL_act=R8_XTRVAL
      XTRVAL_ref=R8_XTRVAL
 
      XDPT_act=R8_XDPT
      XDPT_ref=R8_XDPT
 
      YDPT_act=R8_YDPT
      YDPT_ref=R8_YDPT
 
! call to original routine:  GRFFIT
 
      CALL GRFFIT(
     > X_act(1),Y_act(1),N,IPROC,LBLY,LBLX,ISHOT,IDEV,ZDATE,NXTR,
     > XTRVAL_act,XTRLAB,NDPT,XDPT_act(1),YDPT_act(1))
 
! copy back outputs if modified.
 
      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)
 
      if(XTRVAL_act.ne.XTRVAL_ref) then
         R8_XTRVAL = XTRVAL_act
      endif
 
      where(XDPT_act.ne.XDPT_ref)
         R8_XDPT = XDPT_act
      end where
      DEALLOCATE(XDPT_act)
      DEALLOCATE(XDPT_ref)
 
      where(YDPT_act.ne.YDPT_ref)
         R8_YDPT = YDPT_act
      end where
      DEALLOCATE(YDPT_act)
      DEALLOCATE(YDPT_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRFMF1
      SUBROUTINE R8_GRFMF1(
     > R8_F,NF1,R8_X1,NX1,R8_X2,NX2,R8_ZW,ISELX,ISELF,NSEL,FUNS,XUNS,
     > MNLAB,KYLAB,LBSEL)
 
      external GRFMF1
 
! argument declarations
      REAL*8 R8_F(NF1,NX2)
      INTEGER NF1
      REAL*8 R8_X1(NX1)
      INTEGER NX1
      REAL*8 R8_X2(NX2)
      INTEGER NX2
      REAL*8 R8_ZW(NX2)
      INTEGER ISELX
      INTEGER ISELF(NSEL)
      INTEGER NSEL
      CHARACTER*(*) FUNS
      CHARACTER*(*) XUNS
      CHARACTER*(*) MNLAB(3)
      CHARACTER*(*) KYLAB(5)
      CHARACTER*(*) LBSEL(NSEL)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: F_act(:,:)
      REAL, pointer :: F_ref(:,:)
      REAL, pointer :: X1_act(:)
      REAL, pointer :: X1_ref(:)
      REAL, pointer :: X2_act(:)
      REAL, pointer :: X2_ref(:)
      REAL, pointer :: ZW_act(:)
      REAL, pointer :: ZW_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(F_act(NF1,NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- F_act ALLOCATE error!')
      ALLOCATE(F_ref(NF1,NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- F_ref ALLOCATE error!')
      ALLOCATE(X1_act(NX1)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- X1_act ALLOCATE error!')
      ALLOCATE(X1_ref(NX1)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- X1_ref ALLOCATE error!')
      ALLOCATE(X2_act(NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- X2_act ALLOCATE error!')
      ALLOCATE(X2_ref(NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- X2_ref ALLOCATE error!')
      ALLOCATE(ZW_act(NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- ZW_act ALLOCATE error!')
      ALLOCATE(ZW_ref(NX2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMF1 -- ZW_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      F_act=R8_F
      F_ref=R8_F
 
      X1_act=R8_X1
      X1_ref=R8_X1
 
      X2_act=R8_X2
      X2_ref=R8_X2
 
      ZW_act=R8_ZW
      ZW_ref=R8_ZW
 
! call to original routine:  GRFMF1
 
      CALL GRFMF1(
     > F_act(1,1),NF1,X1_act(1),NX1,X2_act(1),NX2,ZW_act(1),ISELX,ISELF,
     > NSEL,FUNS,XUNS,MNLAB,KYLAB,LBSEL)
 
! copy back outputs if modified.
 
      where(F_act.ne.F_ref)
         R8_F = F_act
      end where
      DEALLOCATE(F_act)
      DEALLOCATE(F_ref)
 
      where(X1_act.ne.X1_ref)
         R8_X1 = X1_act
      end where
      DEALLOCATE(X1_act)
      DEALLOCATE(X1_ref)
 
      where(X2_act.ne.X2_ref)
         R8_X2 = X2_act
      end where
      DEALLOCATE(X2_act)
      DEALLOCATE(X2_ref)
 
      where(ZW_act.ne.ZW_ref)
         R8_ZW = ZW_act
      end where
      DEALLOCATE(ZW_act)
      DEALLOCATE(ZW_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRFMM1
      SUBROUTINE R8_GRFMM1(
     > R8_R,R8_Y,ND1,NC,NNC,R8_Z,NZ,ISELF,NSEL,RUN,YUN,MNLAB,KYLAB,
     > LBSEL)
 
      external GRFMM1
 
! argument declarations
      REAL*8 R8_R(ND1,NZ)
      REAL*8 R8_Y(ND1,NZ)
      INTEGER ND1
      INTEGER NC(NNC)
      INTEGER NNC
      REAL*8 R8_Z(NZ)
      INTEGER NZ
      INTEGER ISELF(NSEL)
      INTEGER NSEL
      CHARACTER*(*) RUN
      CHARACTER*(*) YUN
      CHARACTER*(*) MNLAB(3)
      CHARACTER*(*) KYLAB(5)
      CHARACTER*(*) LBSEL(NSEL)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: R_act(:,:)
      REAL, pointer :: R_ref(:,:)
      REAL, pointer :: Y_act(:,:)
      REAL, pointer :: Y_ref(:,:)
      REAL, pointer :: Z_act(:)
      REAL, pointer :: Z_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(R_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- R_act ALLOCATE error!')
      ALLOCATE(R_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- R_ref ALLOCATE error!')
      ALLOCATE(Y_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- Y_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1 -- Z_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      R_act=R8_R
      R_ref=R8_R
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
! call to original routine:  GRFMM1
 
      CALL GRFMM1(
     > R_act(1,1),Y_act(1,1),ND1,NC,NNC,Z_act(1),NZ,ISELF,NSEL,RUN,YUN,
     > MNLAB,KYLAB,LBSEL)
 
! copy back outputs if modified.
 
      where(R_act.ne.R_ref)
         R8_R = R_act
      end where
      DEALLOCATE(R_act)
      DEALLOCATE(R_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRFMM1B
      SUBROUTINE R8_GRFMM1B(
     > R8_R,R8_Y,ND1,NC,NNC,R8_Z,NZ,ISELF,NSEL,RUN,YUN,MNLAB)
 
      external GRFMM1B
 
! argument declarations
      REAL*8 R8_R(ND1,NZ)
      REAL*8 R8_Y(ND1,NZ)
      INTEGER ND1
      INTEGER NC(NNC)
      INTEGER NNC
      REAL*8 R8_Z(NZ)
      INTEGER NZ
      INTEGER ISELF(NSEL)
      INTEGER NSEL
      CHARACTER*(*) RUN
      CHARACTER*(*) YUN
      CHARACTER*(*) MNLAB(3)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: R_act(:,:)
      REAL, pointer :: R_ref(:,:)
      REAL, pointer :: Y_act(:,:)
      REAL, pointer :: Y_ref(:,:)
      REAL, pointer :: Z_act(:)
      REAL, pointer :: Z_ref(:)
 
! allocation of working arrays...
 
      ALLOCATE(R_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- R_act ALLOCATE error!')
      ALLOCATE(R_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- R_ref ALLOCATE error!')
      ALLOCATE(Y_act(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(ND1,NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- Y_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFMM1B -- Z_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      R_act=R8_R
      R_ref=R8_R
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
! call to original routine:  GRFMM1B
 
      CALL GRFMM1B(
     > R_act(1,1),Y_act(1,1),ND1,NC,NNC,Z_act(1),NZ,ISELF,NSEL,RUN,YUN,
     > MNLAB)
 
! copy back outputs if modified.
 
      where(R_act.ne.R_ref)
         R8_R = R_act
      end where
      DEALLOCATE(R_act)
      DEALLOCATE(R_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GRFUF1
      SUBROUTINE R8_GRFUF1(
     > R8_X,R8_Y,N,IPROC,LBLY,LBLX,ISHOT,IDEV,ZDATE,NXTR,R8_XTRVAL,
     > XTRLAB)
 
      external GRFUF1
 
! argument declarations
      REAL*8 R8_X(N)
      REAL*8 R8_Y(N)
      INTEGER N
      INTEGER IPROC
      CHARACTER*10 LBLY(3)
      CHARACTER*10 LBLX(3)
      INTEGER ISHOT
      CHARACTER*4 IDEV
      CHARACTER*10 ZDATE
      INTEGER NXTR
      REAL*8 R8_XTRVAL
      CHARACTER*10 XTRLAB(3)
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL :: XTRVAL_act
      REAL :: XTRVAL_ref
 
! allocation of working arrays...
 
      ALLOCATE(X_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFUF1 -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFUF1 -- X_ref ALLOCATE error!')
      ALLOCATE(Y_act(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFUF1 -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(N)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_GRFUF1 -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      XTRVAL_act=R8_XTRVAL
      XTRVAL_ref=R8_XTRVAL
 
! call to original routine:  GRFUF1
 
      CALL GRFUF1(
     > X_act(1),Y_act(1),N,IPROC,LBLY,LBLX,ISHOT,IDEV,ZDATE,NXTR,
     > XTRVAL_act,XTRLAB)
 
! copy back outputs if modified.
 
      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)
 
      if(XTRVAL_act.ne.XTRVAL_ref) then
         R8_XTRVAL = XTRVAL_act
      endif
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GSCGDF
      SUBROUTINE R8_GSCGDF(
     > IAX,ISEL,R8_ZARG1,R8_ZARG2)
 
      external GSCGDF
 
! argument declarations
      INTEGER IAX
      INTEGER ISEL
      REAL*8 R8_ZARG1
      REAL*8 R8_ZARG2
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL :: ZARG1_act
      REAL :: ZARG1_ref
      REAL :: ZARG2_act
      REAL :: ZARG2_ref
 
! allocation of working arrays...
 
 
! executable code:  copy for input
 
      ZARG1_act=R8_ZARG1
      ZARG1_ref=R8_ZARG1
 
      ZARG2_act=R8_ZARG2
      ZARG2_ref=R8_ZARG2
 
! call to original routine:  GSCGDF
 
      CALL GSCGDF(
     > IAX,ISEL,ZARG1_act,ZARG2_act)
 
! copy back outputs if modified.
 
      if(ZARG1_act.ne.ZARG1_ref) then
         R8_ZARG1 = ZARG1_act
      endif
 
      if(ZARG2_act.ne.ZARG2_ref) then
         R8_ZARG2 = ZARG2_act
      endif
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GSCGT1
      SUBROUTINE R8_GSCGT1(
     > ZSUB,ZNAME,R8_ZVAL,R8_ZDEFLT,IRET,XTRA)
 
      external GSCGT1
 
! argument declarations
      CHARACTER*(*) ZSUB
      CHARACTER*(*) ZNAME
      REAL*8 R8_ZVAL
      REAL*8 R8_ZDEFLT
      INTEGER IRET
      CHARACTER*(*) XTRA
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL :: ZVAL_act
      REAL :: ZVAL_ref
      REAL :: ZDEFLT_act
      REAL :: ZDEFLT_ref
 
! allocation of working arrays...
 
 
! executable code:  copy for input
 
      ZVAL_act=R8_ZVAL
      ZVAL_ref=R8_ZVAL
 
      ZDEFLT_act=R8_ZDEFLT
      ZDEFLT_ref=R8_ZDEFLT
 
! call to original routine:  GSCGT1
 
      CALL GSCGT1(
     > ZSUB,ZNAME,ZVAL_act,ZDEFLT_act,IRET,XTRA)
 
! copy back outputs if modified.
 
      if(ZVAL_act.ne.ZVAL_ref) then
         R8_ZVAL = ZVAL_act
      endif
 
      if(ZDEFLT_act.ne.ZDEFLT_ref) then
         R8_ZDEFLT = ZDEFLT_act
      endif
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  GSCSPC
      SUBROUTINE R8_GSCSPC(
     > IAX,ISEL,R8_ZARG1,R8_ZARG2)
 
      external GSCSPC
 
! argument declarations
      INTEGER IAX
      INTEGER ISEL
      REAL*8 R8_ZARG1
      REAL*8 R8_ZARG2
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL :: ZARG1_act
      REAL :: ZARG1_ref
      REAL :: ZARG2_act
      REAL :: ZARG2_ref
 
! allocation of working arrays...
 
 
! executable code:  copy for input
 
      ZARG1_act=R8_ZARG1
      ZARG1_ref=R8_ZARG1
 
      ZARG2_act=R8_ZARG2
      ZARG2_ref=R8_ZARG2
 
! call to original routine:  GSCSPC
 
      CALL GSCSPC(
     > IAX,ISEL,ZARG1_act,ZARG2_act)
 
! copy back outputs if modified.
 
      if(ZARG1_act.ne.ZARG1_ref) then
         R8_ZARG1 = ZARG1_act
      endif
 
      if(ZARG2_act.ne.ZARG2_ref) then
         R8_ZARG2 = ZARG2_act
      endif
 
! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  LIMPLOTR
      SUBROUTINE R8_LIMPLOTR(
     > RUNID,R8_ZTIME,R8_RMCB,R8_YMCB,MIMOM,NMOMD,NONLIN,MILIM,NLINLM,
     > R8_ALNLMR,R8_ALNLMY,R8_ALNLMT,NCIRLM,R8_CRLMR1,R8_CRLMY1,
     > R8_CRLMRD,mnlim,r8_rpts,r8_ypts,irflim,r8_rrf,r8_yrf,
     > nant,nrz_ant,namax,r8_ranta,r8_yanta)
 
      external LIMPLOTR
 
! argument declarations
      CHARACTER*(*) RUNID
      REAL*8 R8_ZTIME
      REAL*8 R8_RMCB(0:MIMOM,2)
      REAL*8 R8_YMCB(0:MIMOM,2)
      INTEGER MIMOM
      INTEGER NMOMD
      INTEGER NONLIN
      INTEGER MILIM
      INTEGER NLINLM
      REAL*8 R8_ALNLMR(MILIM)
      REAL*8 R8_ALNLMY(MILIM)
      REAL*8 R8_ALNLMT(MILIM)
      INTEGER NCIRLM
      REAL*8 R8_CRLMR1(MILIM)
      REAL*8 R8_CRLMY1(MILIM)
      REAL*8 R8_CRLMRD(MILIM)

      integer mnlim
      real*8 r8_rpts(mnlim),r8_ypts(mnlim)
 
      integer irflim
      real*8 r8_rrf(irflim),r8_yrf(irflim)

! hand modified:
      integer nant
      integer nrz_ant(nant)

      integer namax
      real*8 r8_ranta(namax,nant),r8_yanta(namax,nant)

! local (automatic array) declarations
 
      integer alloc_stat
      REAL :: ZTIME_act
      REAL :: ZTIME_ref
      REAL, pointer :: RMCB_act(:,:)
      REAL, pointer :: RMCB_ref(:,:)
      REAL, pointer :: YMCB_act(:,:)
      REAL, pointer :: YMCB_ref(:,:)
      REAL, pointer :: ALNLMR_act(:)
      REAL, pointer :: ALNLMR_ref(:)
      REAL, pointer :: ALNLMY_act(:)
      REAL, pointer :: ALNLMY_ref(:)
      REAL, pointer :: ALNLMT_act(:)
      REAL, pointer :: ALNLMT_ref(:)
      REAL, pointer :: CRLMR1_act(:)
      REAL, pointer :: CRLMR1_ref(:)
      REAL, pointer :: CRLMY1_act(:)
      REAL, pointer :: CRLMY1_ref(:)
      REAL, pointer :: CRLMRD_act(:)
      REAL, pointer :: CRLMRD_ref(:)
 
      real, dimension(:), allocatable :: rpts,ypts,rf_rpts,rf_ypts

      real, dimension(:,:), allocatable :: ranta,yanta
! allocation of working arrays...
 
      ALLOCATE(RMCB_act(0:MIMOM,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- RMCB_act ALLOCATE error!')
      ALLOCATE(RMCB_ref(0:MIMOM,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- RMCB_ref ALLOCATE error!')
      ALLOCATE(YMCB_act(0:MIMOM,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- YMCB_act ALLOCATE error!')
      ALLOCATE(YMCB_ref(0:MIMOM,2)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- YMCB_ref ALLOCATE error!')
      ALLOCATE(ALNLMR_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMR_act ALLOCATE error!')
      ALLOCATE(ALNLMR_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMR_ref ALLOCATE error!')
      ALLOCATE(ALNLMY_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMY_act ALLOCATE error!')
      ALLOCATE(ALNLMY_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMY_ref ALLOCATE error!')
      ALLOCATE(ALNLMT_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMT_act ALLOCATE error!')
      ALLOCATE(ALNLMT_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- ALNLMT_ref ALLOCATE error!')
      ALLOCATE(CRLMR1_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMR1_act ALLOCATE error!')
      ALLOCATE(CRLMR1_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMR1_ref ALLOCATE error!')
      ALLOCATE(CRLMY1_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMY1_act ALLOCATE error!')
      ALLOCATE(CRLMY1_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMY1_ref ALLOCATE error!')
      ALLOCATE(CRLMRD_act(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMRD_act ALLOCATE error!')
      ALLOCATE(CRLMRD_ref(MILIM)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_LIMPLOTR -- CRLMRD_ref ALLOCATE error!')
 
      allocate(rpts(mnlim),ypts(mnlim))
      allocate(rf_rpts(irflim),rf_ypts(irflim))

      allocate(ranta(namax,nant),yanta(namax,nant))

! executable code:  copy for input
 
      ZTIME_act=R8_ZTIME
      ZTIME_ref=R8_ZTIME
 
      RMCB_act=R8_RMCB
      RMCB_ref=R8_RMCB
 
      YMCB_act=R8_YMCB
      YMCB_ref=R8_YMCB
 
      ALNLMR_act=R8_ALNLMR
      ALNLMR_ref=R8_ALNLMR
 
      ALNLMY_act=R8_ALNLMY
      ALNLMY_ref=R8_ALNLMY
 
      ALNLMT_act=R8_ALNLMT
      ALNLMT_ref=R8_ALNLMT
 
      CRLMR1_act=R8_CRLMR1
      CRLMR1_ref=R8_CRLMR1
 
      CRLMY1_act=R8_CRLMY1
      CRLMY1_ref=R8_CRLMY1
 
      CRLMRD_act=R8_CRLMRD
      CRLMRD_ref=R8_CRLMRD
 
      rpts = r8_rpts
      ypts = r8_ypts

      rf_rpts = r8_rrf
      rf_ypts = r8_yrf

      ranta = r8_ranta
      yanta = r8_yanta

! call to original routine:  LIMPLOTR
 
      CALL LIMPLOTR(
     > RUNID,ZTIME_act,RMCB_act(0,1),YMCB_act(0,1),MIMOM,NMOMD,NONLIN,
     > MILIM,NLINLM,ALNLMR_act(1),ALNLMY_act(1),ALNLMT_act(1),NCIRLM,
     > CRLMR1_act(1),CRLMY1_act(1),CRLMRD_act(1),
     >     mnlim,rpts,ypts, irflim,rf_rpts,rf_ypts, 
     >     nant,nrz_ant,namax,ranta,yanta)
 
! copy back outputs if modified.
 
      if(ZTIME_act.ne.ZTIME_ref) then
         R8_ZTIME = ZTIME_act
      endif
 
      where(RMCB_act.ne.RMCB_ref)
         R8_RMCB = RMCB_act
      end where
      DEALLOCATE(RMCB_act)
      DEALLOCATE(RMCB_ref)
 
      where(YMCB_act.ne.YMCB_ref)
         R8_YMCB = YMCB_act
      end where
      DEALLOCATE(YMCB_act)
      DEALLOCATE(YMCB_ref)
 
      where(ALNLMR_act.ne.ALNLMR_ref)
         R8_ALNLMR = ALNLMR_act
      end where
      DEALLOCATE(ALNLMR_act)
      DEALLOCATE(ALNLMR_ref)
 
      where(ALNLMY_act.ne.ALNLMY_ref)
         R8_ALNLMY = ALNLMY_act
      end where
      DEALLOCATE(ALNLMY_act)
      DEALLOCATE(ALNLMY_ref)
 
      where(ALNLMT_act.ne.ALNLMT_ref)
         R8_ALNLMT = ALNLMT_act
      end where
      DEALLOCATE(ALNLMT_act)
      DEALLOCATE(ALNLMT_ref)
 
      where(CRLMR1_act.ne.CRLMR1_ref)
         R8_CRLMR1 = CRLMR1_act
      end where
      DEALLOCATE(CRLMR1_act)
      DEALLOCATE(CRLMR1_ref)
 
      where(CRLMY1_act.ne.CRLMY1_ref)
         R8_CRLMY1 = CRLMY1_act
      end where
      DEALLOCATE(CRLMY1_act)
      DEALLOCATE(CRLMY1_ref)
 
      where(CRLMRD_act.ne.CRLMRD_ref)
         R8_CRLMRD = CRLMRD_act
      end where
      DEALLOCATE(CRLMRD_act)
      DEALLOCATE(CRLMRD_ref)
 
      deallocate(rpts,ypts,rf_rpts,rf_ypts)

! exit
      return
      end
!----------------------------------------------------------
! r8real -- generated (f90 fixed form) real*8 interface to:  TGRF3D
      SUBROUTINE R8_TGRF3D(
     > R8_X,R8_Z,R8_Y,NX,NY,NZ1,XLAB,YLAB,ZLAB,XUN,YUN,ZUN,ZTITLE,IPROC,
     > ZRNLBL,IINT,ZINT,NPAGE,ZLLAB,ZLLUN,R8_ZX0,IRET)
 
      external TGRF3D
 
! argument declarations
      REAL*8 R8_X(NX)
      REAL*8 R8_Z(NZ1,NY)
      REAL*8 R8_Y(NY)
      INTEGER NX
      INTEGER NY
      INTEGER NZ1
      CHARACTER*(*) XLAB
      CHARACTER*(*) YLAB
      CHARACTER*(*) ZLAB
      CHARACTER*(*) XUN
      CHARACTER*(*) YUN
      CHARACTER*(*) ZUN
      CHARACTER*(*) ZTITLE
      INTEGER IPROC
      CHARACTER*(*) ZRNLBL
      INTEGER IINT
      CHARACTER*(*) ZINT
      INTEGER NPAGE
      CHARACTER*(*) ZLLAB
      CHARACTER*(*) ZLLUN
      REAL*8 R8_ZX0
      INTEGER IRET
 
! local (automatic array) declarations
 
      integer alloc_stat
      REAL, pointer :: X_act(:)
      REAL, pointer :: X_ref(:)
      REAL, pointer :: Z_act(:,:)
      REAL, pointer :: Z_ref(:,:)
      REAL, pointer :: Y_act(:)
      REAL, pointer :: Y_ref(:)
      REAL :: ZX0_act
      REAL :: ZX0_ref
 
! allocation of working arrays...
 
      ALLOCATE(X_act(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- X_act ALLOCATE error!')
      ALLOCATE(X_ref(NX)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- X_ref ALLOCATE error!')
      ALLOCATE(Z_act(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- Z_act ALLOCATE error!')
      ALLOCATE(Z_ref(NZ1,NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- Z_ref ALLOCATE error!')
      ALLOCATE(Y_act(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- Y_act ALLOCATE error!')
      ALLOCATE(Y_ref(NY)
     >   ,stat=alloc_stat)
      if(alloc_stat.ne.0) call errmsg_exit(
     >  ' ?R8_TGRF3D -- Y_ref ALLOCATE error!')
 
! executable code:  copy for input
 
      X_act=R8_X
      X_ref=R8_X
 
      Z_act=R8_Z
      Z_ref=R8_Z
 
      Y_act=R8_Y
      Y_ref=R8_Y
 
      ZX0_act=R8_ZX0
      ZX0_ref=R8_ZX0
 
! call to original routine:  TGRF3D
 
      CALL TGRF3D(
     > X_act(1),Z_act(1,1),Y_act(1),NX,NY,NZ1,XLAB,YLAB,ZLAB,XUN,YUN,
     > ZUN,ZTITLE,IPROC,ZRNLBL,IINT,ZINT,NPAGE,ZLLAB,ZLLUN,ZX0_act,IRET)
 
! copy back outputs if modified.
 
      where(X_act.ne.X_ref)
         R8_X = X_act
      end where
      DEALLOCATE(X_act)
      DEALLOCATE(X_ref)
 
      where(Z_act.ne.Z_ref)
         R8_Z = Z_act
      end where
      DEALLOCATE(Z_act)
      DEALLOCATE(Z_ref)
 
      where(Y_act.ne.Y_ref)
         R8_Y = Y_act
      end where
      DEALLOCATE(Y_act)
      DEALLOCATE(Y_ref)
 
      if(ZX0_act.ne.ZX0_ref) then
         R8_ZX0 = ZX0_act
      endif
 
! exit
      return
      end
