c23456                                                                          
      program height                                                            
      parameter (nlevel=53)                                                     
      dimension p(nlevel),t(nlevel),z(nlevel)                                   
      data rgas/287./,grav/9.80665/,tzero/273./                                 
c                                                                               
      open(unit=10,file='PT.341',form='formatted',status='old')              
c                                                                               
      do i = 1, nlevel                                                          
      read(10,*) p(i), t(i)                                                     
c*    p(i) = p(i) * 100.                                                        
      t(i) = t(i) + tzero                                                       
      end do                                                                    
c                                                                               
      selv = 1288.                                                              
      z(1) = selv                                                               
c                                                                               
      do i = 2, nlevel                                                          
      tavg = 0.5 * ( t(i) + t(i-1) )                                            
      z(i) = z(i-1) - rgas * tavg / grav * alog ( p(i) / p(i-1) )               
      end do                                                                    
c                                                                               
      do i = 1, nlevel                                                          
      write(20,100) p(i), t(i), z(i)                                            
      end do                                                                    
c                                                                               
  100 format (f10.2, f10.2, f10.0)                                              
c                                                                               
      stop                                                                      
      end                                                                       
