Entry point: initialise needed modules, run checks, and write namelists
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ingen_config_type), | intent(in), | optional | :: | ingen_config_in |
Input options. Defaults to reading the 'ingen_knobs' namelist from the input file |
|
character(len=*), | intent(in), | optional | :: | input_file |
Filename of input file. Default is to read from the command line |
subroutine run_ingen(ingen_config_in, input_file)
use file_utils, only: init_file_utils
use standard_header, only: standard_header_type
use mp, only: init_mp, finish_mp, proc0
implicit none
!> Input options. Defaults to reading the 'ingen_knobs' namelist from the input file
type(ingen_config_type), intent(in), optional :: ingen_config_in
!> Filename of input file. Default is to read from the command line
character(len=*), intent(in), optional :: input_file
type(standard_header_type) :: local_header
logical :: list
call init_mp
local_header = standard_header_type()
call init_file_utils (list, name="template", input_file=input_file)
call init_ingen(ingen_config_in)
if (debug) write(6,*) 'ingen: call get_namelists'
call get_namelists
if (debug) write(6,*) 'ingen: call report'
if (proc0) call report(local_header)
if (debug) write(6,*) 'ingen: call write_namelists=',write_nml
if (write_nml) call write_namelists(header=local_header)
if (debug) write(6,*) 'ingen: call interactive, scan=',scan
if (scan) call interactive
call finish_ingen
call finish_mp
end subroutine run_ingen