subroutine call_mode(arg_pos) !This code is used to parse the command line argument for the mode information and calls the required !mode module. use mode_create use mode_convert use mode_merge use mode_metric use mode_calc use parameters implicit none integer, intent(out) :: arg_pos select case(mode) case('--create') call create(arg_pos) case('--convert') call convert(arg_pos) case('--merge') call merge(arg_pos) case('--metric') call metric(arg_pos) case('--calc') call calc(arg_pos) case default print *, "Mode ", trim(adjustl(mode)), " currently not accepted. Please check documentation for ", & "accepted modes and rerun." stop 3 end select end subroutine call_mode