Skip to content

Commit

Permalink
Added ability to read in the name of the input file as a command line…
Browse files Browse the repository at this point in the history
… argument. Default is ctem.in
  • Loading branch information
daminton committed Mar 9, 2022
1 parent 59d9a3c commit 12a318e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/CTEM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ program CTEM
real(DP) :: lambda
!$ real(DP) :: t1,t2
real(DP),dimension(:,:),allocatable :: nflux
integer(I4B) :: narg, ierr

!$ t1 = omp_get_wtime()
call io_splash()
!write(*,*) 'Reading input files'
infile="ctem.in"
narg = command_argument_count()
if (narg /= 0) then
call get_command_argument(1, infile, status = ierr)
else
infile="ctem.in"
end if
write(*,*) 'Reading input file ',trim(adjustl(infile))
call io_input(infile,user)

! Initialize distribution arrays (crater size, number)
Expand Down

0 comments on commit 12a318e

Please sign in to comment.