     program EtaHeigth
     implicit none
     integer,parameter     :: lm=60
     integer,parameter     :: lmp1=lm+1
     integer,parameter     :: lmm1=lm-1
     real,parameter        :: G = 9.80
     real,parameter	   :: R = 287.04
     real,parameter	   :: CP = 1004.6
     real,parameter	   :: P00 = 1.E5
     real,parameter	   :: GAMMA = 0.0065
     real,parameter	   :: PRF0 = 101325.0
     real,parameter	   :: T0 = 288.0
     real,parameter	   :: GORG = G / (R * GAMMA)
     real,parameter	   :: RGOG = 1.0 / GORG
     real,parameter	   :: ROG = R / G
     real,parameter	   :: CPOG = CP / G
     real,parameter	   :: CAPA = R / CP
     real,parameter	   :: etop = 20
     real,parameter	   :: PT= etop * 100.0
     real,parameter	   :: PETAT = PT

     integer               :: l
     real, dimension(lm)   :: deta,etal
     real, dimension(lmp1) :: eta,zeta
     include "deta"




      ETA(1) = 0.
     
     do L = 1, LMM1
         ETA(L+1) = ETA(L) + DETA(L)
     enddo
      
     ETA(LMP1) = 1.0
     DETA(LM) = 1.0 - ETA(LM)

     DO L = 1, LM
       ETAL(L) = 0.5 * (ETA(L) + ETA(L+1))
     enddo
      ZETA(1) = T0 * (1.-((PT + ETA(1)*(PRF0 - PT)) / PRF0) ** RGOG)/GAMMA
      print*,1, ETA(1),PT,ZETA(1)
      DO L=2, LMP1
       ZETA(L) = T0 * (1.-((PT + ETA(L)*(PRF0 - PT)) / PRF0) ** RGOG)/GAMMA
       print*,l,ETA(L),ETA(L)*(PRF0 - PT),ZETA(L),ZETA(l-1)-Zeta(l)
      enddo
   
     
     end program EtaHeigth
