subroutine timeset_init()
    !
    !NAMELIST から必要な情報を読み取り, 時間関連の変数の設定を行う. 
    !
    !暗黙の型宣言禁止
    implicit none
    !内部変数
    integer    :: unit
    !---------------------------------------------------------------    
    ! NAMELIST から情報を取得
    !
    NAMELIST /timeset_nml/ DelTimeLong, DelTimeShort, IntegPeriod, RestartTime, DelTimeOutput
    
    call FileOpen(unit, file=namelist_filename, mode='r')
    read(unit, NML=timeset_nml)
    close(unit)
    ! 計算終了時刻
    !
    EndTime = RestartTime + IntegPeriod
    
    ! 時刻・タイムステップの設定
    !   実数の割り算なので, 念の為に. 
    !    
    NstepShort = 2 * ( nint( DelTimeLong * 1.0d2 ) / nint( DelTimeShort * 1.0d2 ) )
    ! 時間刻みの設定
    !   元々の値を保管しておく
    DelTimeLongSave = DelTimeLong
    NstepShortSave  = NstepShort
    ! リスタートファイルを書き出すタイミング
    !
    NstepOutput = nint( DelTimeOutput * 1.0d2 ) / nint( DelTimeLong * 1.0d2 )
    ! 時刻の設定
    !
    TimeB = RestartTime - DelTimeLong
    TimeN = RestartTime
    TimeA = RestartTime + DelTimeLong      
    
    ! リスタートか否か. リスタートなら  .false.
    !
    if ( nint( RestartTime * 1.0d2 ) == 0 ) then 
      FlagInitialRun = .true.
    else
      FlagInitialRun = .false.
    end if
    !---------------------------------------------------------------
    ! 確認
    !
    if (myrank == 0) then
      call MessageNotify( "M", "timeset_init", "DelTimeLong  = %f", d=(/DelTimeLong/) )
      call MessageNotify( "M", "timeset_init", "DelTimeShort = %f", d=(/DelTimeShort/) )
      call MessageNotify( "M", "timeset_init", "Restarttime  = %f", d=(/Restarttime/)  )
      call MessageNotify( "M", "timeset_init", "IntegPeriod  = %f", d=(/IntegPeriod/) )
      call MessageNotify( "M", "timeset_init", "EndTime      = %f", d=(/EndTime/) )
      call MessageNotify( "M", "timeset_init", "DelTimeOutput= %f", d=(/DelTimeOutput/) )
      call MessageNotify( "M", "timeset_init", "NstepShort   = %d", i=(/NstepShort/) )
      call MessageNotify( "M", "timeset_init", "NstepOutput  = %d", i=(/NstepOutput/) )
    end if
    
  end subroutine timeset_init