test_set_start_stop_time Subroutine

public subroutine test_set_start_stop_time()

Arguments

None

Calls

proc~~test_set_start_stop_time~~CallsGraph proc~test_set_start_stop_time test_set_start_stop_time ESMF_ClockCreate ESMF_ClockCreate proc~test_set_start_stop_time->ESMF_ClockCreate ESMF_HConfigCreate ESMF_HConfigCreate proc~test_set_start_stop_time->ESMF_HConfigCreate ESMF_TimeIntervalSet ESMF_TimeIntervalSet proc~test_set_start_stop_time->ESMF_TimeIntervalSet ESMF_TimeSet ESMF_TimeSet proc~test_set_start_stop_time->ESMF_TimeSet anyexceptions anyexceptions proc~test_set_start_stop_time->anyexceptions assert_that assert_that proc~test_set_start_stop_time->assert_that proc~set_start_stop_time set_start_stop_time proc~test_set_start_stop_time->proc~set_start_stop_time sourcelocation sourcelocation proc~test_set_start_stop_time->sourcelocation true true proc~test_set_start_stop_time->true proc~set_start_stop_time->ESMF_TimeSet ESMF_ClockGet ESMF_ClockGet proc~set_start_stop_time->ESMF_ClockGet esmf_hconfigasstring esmf_hconfigasstring proc~set_start_stop_time->esmf_hconfigasstring esmf_hconfigcreateat esmf_hconfigcreateat proc~set_start_stop_time->esmf_hconfigcreateat esmf_hconfigisdefined esmf_hconfigisdefined proc~set_start_stop_time->esmf_hconfigisdefined proc~mapl_return MAPL_Return proc~set_start_stop_time->proc~mapl_return proc~mapl_verify MAPL_Verify proc~set_start_stop_time->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_set_start_stop_time()
      type(ESMF_HConfig) :: hconfig
      type(ESMF_Time) :: time,start_stop_time(2)
      integer :: status
      type(ESMF_Time) :: start_time, stop_time
      type(ESMF_TimeInterval) :: dt
      type(ESMF_Clock) :: clock

      call ESMF_TimeIntervalSet(dt, h=1, _RC)
      call ESMF_TimeSet(start_time, timeString="2000-04-03T21:00:00", _RC)
      call ESMF_TimeSet(stop_time, timeString="2000-04-22T21:00:00", _RC)
      clock = ESMF_ClockCreate(timeStep=dt, startTime=start_time, stopTime=stop_time, _RC)

      hconfig = ESMF_HConfigCreate(content = &
        "{time_spec: {frequency: PT3H}}", _RC)

      start_stop_time = set_start_stop_time(clock, hconfig, _RC)
      @assert_that(start_time == start_stop_time(1), is(true()))
      @assert_that(stop_time == start_stop_time(2), is(true()))
 
      hconfig = ESMF_HConfigCreate(content = &
        "{time_spec: {start: 2000-04-14T21:00:00, stop: 2000-04-15T21:00:00}}", _RC)
      call ESMF_TimeSet(start_time, timeString="2000-04-14T21:00:00", _RC)
      call ESMF_TimeSet(stop_time, timeString="2000-04-15T21:00:00", _RC)

      start_stop_time = set_start_stop_time(clock, hconfig, _RC)
      @assert_that(start_time == start_stop_time(1), is(true()))
      @assert_that(stop_time == start_stop_time(2), is(true()))

   end subroutine test_set_start_stop_time