!------------------------------------------------------------------------------
! This is the main driver program.
! User should change the value of variable "req_temp" to the desired one.
! For example, the current value is set to 200 K.
! The TACS for all transitions are printed in a file named "Output_TACS.out".
!------------------------------------------------------------------------------
	
program obtain_TACS
  use module_init
  implicit none
  integer i, j, funit
  real*8 :: req_temp, out_sigma(n_t)

! Set the value of this variable to the desired temperature (K):
  req_temp = 200.d0

  call interpolate(req_temp, out_sigma)
  open(newunit = funit, file = "Output_TACS.out")
    write(funit, '(a18,f16.8)') "Temperature (K) = ", req_temp
    write(funit, '(2(3(a4,1x),10x),a19)') "j1", "ka1", "kc1", "j2", "ka2", "kc2", "TACS (Ang^2)"
	do i = 1, n_t
      write(funit, '(2(3(i4,1x),10x),e19.12)') j1(i), ka1(i), kc1(i), j2(i), ka2(i), kc2(i), out_sigma(i)
	end do
  close(funit)
end program
