create_timeunit Subroutine

public subroutine create_timeunit(time, datetime_units, input_unit, rc)

print*, ‘datetime_units:’, trim(datetime_units)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: time
character(len=*), intent(out) :: datetime_units
character(len=*), intent(in), optional :: input_unit
integer, intent(out), optional :: rc

Calls

proc~~create_timeunit~~CallsGraph proc~create_timeunit create_timeunit ESMF_TimeGet ESMF_TimeGet proc~create_timeunit->ESMF_TimeGet proc~mapl_return MAPL_Return proc~create_timeunit->proc~mapl_return proc~mapl_verify MAPL_Verify proc~create_timeunit->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 create_timeunit (time, datetime_units, input_unit, rc)
    type(ESMF_Time), intent(in) :: time
    character(len=*), intent(out) :: datetime_units
    character(len=*), optional, intent(in) :: input_unit
    integer, optional, intent(out) :: rc

    integer :: i, len
    integer :: status
    character(len=ESMF_MAXSTR) :: string

    call ESMF_timeget (time, timestring=string, _RC)
    datetime_units = 'seconds'
    if (present(input_unit)) datetime_units = trim(input_unit)
    datetime_units = trim(datetime_units) // trim(string)
    !!print*, 'datetime_units:', trim(datetime_units)

    _RETURN(_SUCCESS)
  end subroutine create_timeunit