      SUBROUTINE SET_ZATV(ML,ZBOT,ZTOP,ZINC,NCEL,ZATV)
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C SET_ZATV SETS UP THE ALTITUDE GRID FOR THE CO2/TV MODEL. THE GRID
C IS EVENLY SPACED.
C
C INPUT PARAMETERS:
C
C  ML   --- MAXIMUM LEVELS IN MODEL ATMOSPHERE.
C  ZBOT --- LOWEST ALTITUDE ON MODEL GRID (KM). 
C  ZTOP --- HIGHEST ALTITUDE ON MODEL GRID (KM).
C  ZINC --- MODEL GRID SPACING (KM).
C   
C OUTPUT PARAMETER:
C
C  ZA   --- TV MODEL ALTITUDE GRID (KM). 
C  NCEL --- NUMBER OF LEVELS ON TV MODEL GRID.
C
C SOFTWARE WRITTEN BY  Christopher J. Mertens
C                      NASA Langley Research Center
C                      Atmospheric Sciences Competency
C                      21 Langley Blvd., Mail Stop 401B
C                      Hampton, VA 23681-2199
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      DIMENSION ZATV(ML)

      ZMAX=MAX(ZBOT,ZTOP)
      ZMIN=MIN(ZBOT,ZTOP)
      RNSEG=ABS(ZTOP-ZBOT)/ZINC
      NSEG=INT(RNSEG)
      IF(RNSEG.GT.NSEG) NSEG=NSEG+1
C      WRITE(*,*) NSEG
      NCEL=NSEG+1
C      WRITE(*,*) NCEL
      ZATV(1)=ZMAX
      DO I=2,NCEL
        ZATV(I)=ZATV(I-1)-ZINC
      ENDDO

      RETURN
      END
      
      
