      subroutine subtecsrss(k1,k2,tecav,cntec)
C............................................................Feb 2023
C determine TEC(gla1,gla2) for sunrise or sunset on terminatop
C
      DIMENSION	 tlat(360)
	  common /BL2/tlat
	sum=0.0
	cnt=0.0
	DO kk=k1,k2
		sum=sum+tlat(kk)
	cnt=cnt+1.0
	 enddo
	tecav=sum/cnt
	cntec=cnt
	RETURN
	END
