      SUBROUTINE GZFBP (PHI,PEE,PS,TMEAN,PEEMN,PSMN,LA,ILEV,RGAS) 
C 
C     * JUN 27/79 - J.D.HENDERSON 
C     * CALCULATES GEOPOTENTIAL PHI(LA,ILEV) FROM PEE.
C     * PHI AND PEE CAN BE EQUIVALENCED.
C 
C     * LEVEL 2,PHI,PEE,PS
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)
      COMPLEX PHI(LA,1),PEE(LA,1),PS(1) 
      REAL TMEAN(1),PEEMN(1)
C-------------------------------------------------------------------- 
C 
      DO 130 L=1,ILEV 
C 
      DO 120 MN=1,LA
  120 PHI(MN,L)=PEE(MN,L)-RGAS*TMEAN(L)*PS(MN)
C 
  130 PHI(1,L)=PHI(1,L)+PEEMN(L)-RGAS*TMEAN(L)*PSMN 
C 
      RETURN
      END 
