construct_filename Function

function construct_filename(l, m)

Uses

  • proc~~construct_filename~~UsesGraph proc~construct_filename construct_filename module~parameters parameters proc~construct_filename->module~parameters module~kinds kinds module~parameters->module~kinds

Construct unique filenames using a base name and the mode numbers l and m for reading in external inital data. The base name is constructed based on the run time parameters input_directory and input_basename.

Arguments

Type IntentOptional AttributesName
integer(kind=ip), intent(in) :: l

The -mode of this mode.

integer(kind=ip), intent(in) :: m

The -mode of this mode.

Return Value character(len=1024)

The return value is the concatenation of the input_directory and input_basename and the mode information.


Calls

proc~~construct_filename~~CallsGraph proc~construct_filename construct_filename proc~count_digits count_digits proc~construct_filename->proc~count_digits

Called by

proc~~construct_filename~~CalledByGraph proc~construct_filename construct_filename proc~read_all_modes read_all_modes proc~read_all_modes->proc~construct_filename interface~read_all_modes read_all_modes interface~read_all_modes->proc~read_all_modes

Contents

Source Code


Source Code

  function construct_filename ( l, m )
  !! Construct unique filenames using a base name and the mode numbers l and m
  !! for reading in external inital data. The base name is constructed based
  !! on the run time parameters [[parameters:input_directory]] and
  !! [[parameters:input_basename]].

    use parameters, only : input_directory, input_basename

    implicit none

    integer(ip), intent(in) :: l
    !! The \(\ell\)-mode of this mode.
    integer(ip), intent(in) :: m
    !! The \(m\)-mode of this mode.
    character(len=1024) :: construct_filename
    !! The return value is the concatenation of the
    !! [[parameters:input_directory]] and [[parameters:input_basename]] and the
    !! mode information.
    character(len=6) :: lstr, mstr
    character(len=4), dimension(6) :: form = (/ "(i1)", "(i2)", "(i3)", &
                                                "(i4)", "(i5)", "(i6)" /)

    write(lstr,form(count_digits(l))) l
    write(mstr,form(count_digits(m))) m

    construct_filename = trim(input_directory)//'/'//trim(input_basename) &
                         //'_l'//trim(lstr)//'m'//trim(mstr)//'.dat'
  end function construct_filename