C
C
      SUBROUTINE CALC ( K, NL, N, MMAX, IV, C, ALF, T, ETA )
C
C
      PARAMETER ( MAXN1=11 )
C
      DIMENSION C(N), ALF(NL), T(MMAX,IV)
C
      COMMON /BLKPH/ PH(MAXN1)
C
      DATA PI /3.141592654/
C
      PH(1) = 1.
      PH(2) = T(K,1)
      PH(3) = SIN((2*PI/ALF(1))*(T(K,1)+ALF(3)))
      PH(4) = SIN((2*PI/ALF(2))*(T(K,1)+ALF(4)))
C
      ETA = C(1)*PH(1)+C(2)*PH(2)+C(3)*PH(3)+C(4)*PH(4)
C
      RETURN
      END 
C
C
C-----------------------------------------------------------------------
C
C
      SUBROUTINE DERIV ( K, T, MMAX, IV, ALF, NL, NP1 )
C
C
C    ****** DUMMY SUBROUTINE ******
C
C
      PARAMETER ( MAXN1=11, MAXKG=8 )
C
      DIMENSION ALF(NL),T(MMAX,IV)
C
      COMMON /BLKDPH/ DPH(MAXN1,MAXKG)
C
      DO 10 J=1,NL
        DO 10 I=1,NP1
          DPH(I,J) = 0.0
   10 CONTINUE
C
C  AT THIS POINT INSERT THE STATEMENTS NEEDED TO SET THE
C    REQUIRED NON-ZERO DERIVATIVES IN THE ARRAY DPH(I,J).
C
C  DPH(I,J) = PARTIAL DERIVATIVE OF THE ITH FUNCTION PHI
C             WITH RESPECT TO THE JTH NON-LINEAR PARAMETER ALF
C              EVALUATED AT OBSERVATION NUMBER K, 
C                 I.E. EVALUATED AT T(K,L), L=1,IV
C
      RETURN
      END 
C
C
C-----------------------------------------------------------------------
C
C
      SUBROUTINE WT ( M, WEIGHT, Y )
C
C
      DIMENSION Y(M),WEIGHT(M)
C
C  ****** DUMMY SUBROUTINE ******
C
C  TO GET 1/Y**2 WEIGHTING, SIMPLY ACTIVATE THE NEXT 3 STATEMENTS
C
C      DO 10 I=1,M
C        WEIGHT(I) = 1.0/Y(I)**2
C  10  CONTINUE
C
C  OTHER WEIGHTINGS CAN BE GOTTEN BY CHANGING THE STATEMENT INSIDE
C         THE LOOP. 
C
      RETURN
      END 
C
C-----------------------------------------------------------------------
C
C
      SUBROUTINE TRANS ( T, BT, Y, BY, IV, M, MMAX )
C
C
      DIMENSION T(MMAX,IV), BT(MMAX,IV), Y(M), BY(M)
C
      DO 20 I=1,M
         DO 10 J=1,IV
            BT(I,J) = T(I,J)
C
            T(I,J) = T(I,J) - 1878.0
C
   10    CONTINUE
         BY(I) = Y(I)
C
         Y(I) = ALOG(Y(I))
C
   20 CONTINUE
C
      RETURN
      END 
C
C
C-----------------------------------------------------------------------
C
C
      SUBROUTINE BAKTRN ( ETA, BETA, M )
C
C
      DIMENSION ETA(M), BETA(M)
C
      DO 10 I=1,M
C
         BETA(I) = EXP(ETA(I))
C
   10 CONTINUE
C
      RETURN
      END 
