subroutine OptParseInit(exec_name, brief)
    !
    ! option_parser モジュールの初期設定を行います. 
    !
    ! Initialize "option_parser" module. 
    !
    ! モジュール引用 ; USE statements
    !
    ! 文字列操作
    ! Character handling
    !
    use dc_string, only: StoA
    ! コマンドライン引数処理下請け
    ! Command line option parser subcontractor
    !
    use dc_args, only: ARGS, DCArgsOpen,  DCArgsHelpMsg, DCArgsOption, DCArgsDebug, DCArgsHelp,    DCArgsStrict, DCArgsClose
    ! 組み込み関数 PRESENT の拡張版関数
    ! Extended functions of intrinsic function "PRESENT"
    !
    use dc_present, only: present_and_not_empty
    ! 宣言文 ; Declaration statements
    !
    implicit none
    character(*), intent(in), optional:: exec_name
                              ! 実行ファイル名. 
                              ! Executable file name
    character(*), intent(in), optional:: brief
                              ! 実行ファイルの簡潔な説明
                              ! Brief account of executable file
    character(STRING):: ename
                              ! 実行ファイル名. 
                              ! Executable file name
    character(STRING):: brief_msg
                              ! 実行ファイルの簡潔な説明
                              ! Brief account of executable file
    type(ARGS):: arg          ! コマンドライン引数. 
                              ! Command line options
    ! 実行文 ; Executable statement
    !
    if ( option_parser_inited ) return
    call InitCheck
    ! オプショナル引数の処理. 
    ! Handling of optional arguments 
    !
    if ( present_and_not_empty(exec_name) ) then
      ename = exec_name
    else
      ename = 'dcpam'
    end if
    if ( present_and_not_empty(brief) ) then
      brief_msg = brief
    else
      brief_msg = 'dcpam main program'
    end if
    ! コマンドライン引数の解析処理
    ! Parse command line arguments
    !
    call DCArgsOpen( arg )               ! (out)
    call DCArgsHelpMsg( arg, category = 'Title', msg = trim(ename) // ': ' // trim(brief_msg) )  ! (in)
    call DCArgsHelpMsg( arg, category = 'Usage', msg = './' // trim(ename) // ' [Options]' ) ! (in)
    call DCArgsOption( arg, options = StoA('-N', '--namelist'), flag = namelist_flag, value = namelist_filename, help = "Namelist filename")           ! (in)
    call DCArgsDebug( arg )  ! (inout)
    call DCArgsHelp( arg )   ! (inout)
    call DCArgsStrict( arg ) ! (inout)
    call DCArgsClose( arg )  ! (inout)
    option_parser_inited = .true.
  end subroutine OptParseInit