read_from_contour_file Subroutine

public subroutine read_from_contour_file(iunit)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iunit

Contents


Source Code

    subroutine read_from_contour_file(iunit)
        use CalcData, only: nmcyc
        use real_time_data, only: tauCache, alphaCache
        implicit none
        integer, intent(in) :: iunit
        integer :: i

        ! Then, the cache for the values of alpha and tau is allocated
        if (allocated(tauCache)) deallocate(tauCache)
        if (allocated(alphaCache)) deallocate(alphaCache)
        allocate(tauCache(nmcyc))
        allocate(alphaCache(nmcyc))

        ! And then the values for alpha/tau
        open(iunit, file=trajFile, status='old')
        ! Here, we read in the timesteps and alphas that shall be used
        do i = 1, nmcyc
            read(iunit, *) tauCache(i), alphaCache(i)
        end do
        close(iunit)
    end subroutine read_from_contour_file