fill_time_dict Subroutine

public subroutine fill_time_dict(dict)

Arguments

Type IntentOptional Attributes Name
type(StringUnlimitedmap), intent(out) :: dict

Calls

proc~~fill_time_dict~~CallsGraph proc~fill_time_dict fill_time_dict ESMF_ClockGet ESMF_ClockGet proc~fill_time_dict->ESMF_ClockGet ESMF_ClockValidate ESMF_ClockValidate proc~fill_time_dict->ESMF_ClockValidate ESMF_TimeGet ESMF_TimeGet proc~fill_time_dict->ESMF_TimeGet insert insert proc~fill_time_dict->insert

Source Code

   subroutine fill_time_dict(dict)
      type (StringUnlimitedmap), intent(out) :: dict

      integer :: status
      type(ESMF_Time) :: time

      integer :: yy, mm, dd, h, m, s

      call ESMF_ClockValidate(reference_clock, rc=status)
      if (status /= 0) error stop "Must pass reference via set_reference_clock() before use."

      call ESMF_ClockGet(reference_clock, currTime=time, rc=status)
      if (status /= 0) error stop "could not get current time in SimulationTime.F90"

      call ESMF_TimeGet(time, yy=yy, mm=mm, dd=dd, h=h, m=m, s=s, rc=status)
      if (status /= 0) error stop "Failed to get data from ESMF_TimeGet()."

      call dict%insert('Y',yy)
      call dict%insert('M',mm)
      call dict%insert('D',dd)
      call dict%insert('HH',h)
      call dict%insert('MM',m)
      call dict%insert('SS',s)
      call dict%insert('MS',0)

   end subroutine Fill_Time_Dict