anchor.diff:      subroutine bc_clean()
           if (allocated(passbands) .eqv. .true.) deallocate(passbands)
           if (allocated(bc_table) .eqv. .true.) deallocate(bc_table)
  +        if (allocated(pm13_table) .eqv. .true.) deallocate(pm13_table)
           if (allocated(teffs) .eqv. .true.) deallocate(teffs)
           if (allocated(loggs) .eqv. .true.) deallocate(loggs)
           if (allocated(end_teff) .eqv. .true.) deallocate(end_teff)
  
positive.code:     subroutine bc_mamajek(teff, logl, mag_length, init, magnitudes)
          use interpolate, only: lagrange
  
          integer :: i, j
  
          integer,  intent(in) :: init, mag_length
          real(dp), intent(in) :: teff, logl
          real(dp), dimension(mag_length), intent(out) :: magnitudes
  
          if (init == 1) then
              ! read in the bolometric correction table
              n_teffs = 102
              n_loggs = 1
              n_fehs  = 0
  
              if (allocated(bc_table) .eqv. .false.) then
                  call log_note('allocating memory for bc table')
                  allocate(bc_table(n_teffs, 18, 0))
              else
                  call log_warn('bc table already allocated to memory, reallocating')
                  deallocate(bc_table)
                  allocate(bc_table(n_teffs, 18, 0))
              end if
  
              open(90, file="color/tab/pm13/Pecaut_Mamajek_2013_BCs.txt", status="old")
              ! read file header
              do i = 1, 21
                  read(90)
              end do
  
              ! read in BC table
              do i = 1, n_teffs
                  read(90) teffs(i), (bc_table(i, j), j = 1, 18)
              end do
              close(90)
  
              return
          else if (init == 0 .and. allocated(bc_table) .eqv. .false.) then
              ! initialization error
              call log_error('BC tables were not initialized.')
              return
          else
              ! interpolate using 3-point lagrange interpolation
          end if
  
      end subroutine bc_mamajek
  
negative.code:     integer, dimension(:), allocatable :: end_teff
  
      real(dp), dimension(:), allocatable :: fehs, teffs, loggs
      real(dp), dimension(:,:), allocatable :: pm13_table
      real(dp), dimension(:,:,:), allocatable :: bc_table
  
      character(len=15) :: bc_type
  