Class timeset
In: src/setup/timeset.f90

Methods

Included Modules

dc_trace dc_message

Public Instance methods

cfgfile :character(*), intent(in)
: Input

[Source]

  subroutine timeset_init(cfgfile)

    !=== Dependency


    !=== Input
    character(*), intent(in) :: cfgfile
    
    !=== NAMELIST
    NAMELIST /timeset/  DelTimeLong, DelTimeShort, TimeInt, TimeDisp
                                                                 !=end    

    call BeginSub("timeset_init",                  fmt="%c",                        c1="Initialize parameters of time integration. ")
        
    open (10, FILE=cfgfile)
    read(10, NML=timeset)
    close(10)

    !--- ループ回数
    NstepLong = TimeInt / DelTimeLong 
    NstepShort = 2 * DelTimeLong / DelTimeShort

    !=== 積分時間が長い時間ステップで割り切れない場合には警告を出す
    if(mod(TimeInt, DelTimeLong) /= 0) then 
       call MessageNotify("Message", "timeset_init",                          "mod(TimeInt, DelTimeLong) is not zero")
    end if
    
    !=== 長い時間ステップが短い時間ステップで割り切れない場合には警告を出す
    if(mod(DelTimeLong, DelTimeShort) /= 0) then 
       call MessageNotify("Message", "timeset_init",                          "mod(DelTimeLong, DelTimeShort) is not zero")
    end if

    !=== 積分時間が出力時間間隔で割り切れない場合には警告を出す
    if(mod(TimeDisp, DelTimeLong) /= 0) then 
       call MessageNotify("Message", "timeset_init",                          "mod(TimeDisp, DelTimeLong) is not zero")
    end if


    !==== 確認
    write(*,*) "DelTimeLong, DelTimeShort", DelTimeLong, DelTimeShort
!    write(*,*) "TimeInt", TimeInt
!    write(*,*) "TimeDisp", TimeDisp
    write(*,*) "NstepLong, NstepShort", NstepLong, NstepShort

    call EndSub("timeset_init")

  end subroutine timeset_init

[Validate]