set_paths Subroutine

private subroutine set_paths(params)

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(inout) :: params

Core KORC simulation parameters.


Contents

Source Code


Source Code

subroutine set_paths(params)
  !! @note Subroutine that sets the input/output paths.@endnote
  TYPE(KORC_PARAMS), INTENT(INOUT) 	:: params
    !! Core KORC simulation parameters.
  INTEGER 				:: argn
    !! Number of command line inputs. The default value is 
    !! two: the input files path and the outputs path.

  argn = command_argument_count()

  if (argn .EQ. 2_idef) then
     call get_command_argument(1,params%path_to_inputs)
     call get_command_argument(2,params%path_to_outputs)
  else
     call korc_abort()
  end if

  if (params%mpi_params%rank .EQ. 0) then
     write(6,'(/,"* * * * * PATHS * * * * *")')
     write(6,'("The input file is:",A70)') TRIM(params%path_to_inputs)
     write(6,'("The output folder is:",A70)') TRIM(params%path_to_outputs)
     write(6,'("* * * * * * * * * * * * *",/)')
  end if
end subroutine set_paths