get_case_filename Subroutine

subroutine get_case_filename(filename)

Parses command line arguments to find the case configuration file.

If no argument is provided, defaults to case.nml.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(out) :: filename

Calls

proc~~get_case_filename~~CallsGraph proc~get_case_filename lowmach_react_hex::get_case_filename proc~fatal_error mod_kinds::fatal_error proc~get_case_filename->proc~fatal_error

Called by

proc~~get_case_filename~~CalledByGraph proc~get_case_filename lowmach_react_hex::get_case_filename program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~get_case_filename

Source Code

   subroutine get_case_filename(filename)
      character(len=*), intent(out) :: filename

      integer :: argc

      argc = command_argument_count()
      if (argc >= 1) then
         call get_command_argument(1, filename)
      else
         filename = 'case.nml'
      end if

      if (len_trim(filename) == 0) call fatal_error('main', 'empty case filename')
   end subroutine get_case_filename