subroutine reset_times_to_current_day(current_time, times_1d, rc)
type(ESMF_Time), intent(in) :: current_time
type(ESMF_Time), intent(inout) :: times_1d(:)
integer, optional, intent(out) :: rc
integer :: i,status,h,m,yp,mp,dp,s,ms,us,ns
integer :: year,month,day
call ESMF_TimeGet(current_time,yy=year,mm=month,dd=day,_RC)
do i=1,size(times_1d)
call ESMF_TimeGet(times_1d(i),yy=yp,mm=mp,dd=dp,h=h,m=m,s=s,ms=ms,us=us,ns=ns,_RC)
call ESMF_TimeSet(times_1d(i),yy=year,mm=month,dd=day,h=h,m=m,s=s,ms=ms,us=us,ns=ns,_RC)
enddo
_RETURN(_SUCCESS)
end subroutine reset_times_to_current_day