subroutine CoreLevelSpectrum

  use m_CoreLevel_Spectrum, only : m_CLS_rd_n, m_CLS_read_data_from_pp, &
       &                      m_CLS_alloc_core_states, m_CLS_set_core_states, &
       &                      m_CLS_alloc_DensityResponseFn, &
       &                      m_CLS_calc_DensityResponseFn, &
       &                      m_CLS_print_spectrum, sw_corelevel_spectrum
  use m_Const_Parameters,  only : OFF
  use m_Files,            only : m_Files_open_nf_LR, m_Files_close_nf_LR, nf_LR_spectra
  use m_Parallelization,  only : mype

  implicit none

  call m_CLS_rd_n
  if ( sw_corelevel_spectrum == OFF ) return

  call m_CLS_read_data_from_pp
  call m_CLS_alloc_core_states
  call m_CLS_set_core_states

  call m_CLS_alloc_DensityResponseFn
  call m_CLS_calc_DensityResponseFn

  if ( mype == 0 ) then
     call m_Files_open_nf_LR()
     call m_CLS_print_spectrum( nf_LR_spectra )
     call m_Files_close_nf_LR()
  endif

end subroutine CoreLevelSpectrum
