Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Time), | intent(in) | :: | initial_time | |||
type(ESMF_Time), | intent(in) | :: | current_time | |||
type(ESMF_TimeInterval), | intent(in) | :: | frequency |
function get_current_time_index(initial_time, current_time, frequency) result(time_index) integer :: time_index type(ESMF_Time), intent(in) :: initial_time type(ESMF_Time), intent(in) :: current_time type(ESMF_TimeInterval), intent(in) :: frequency type(ESMF_Time) :: temp_time time_index = 0 temp_time = initial_time do while( temp_time <= current_time) temp_time = temp_time + frequency time_index = time_index + 1 enddo end function get_current_time_index