time_esmf_2_nc_int Subroutine

public subroutine time_esmf_2_nc_int(time, tunit, n, rc)

Uses

  • proc~~time_esmf_2_nc_int~~UsesGraph proc~time_esmf_2_nc_int time_esmf_2_nc_int ESMF ESMF proc~time_esmf_2_nc_int->ESMF

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: time
character(len=*), intent(in) :: tunit
integer(kind=ESMF_KIND_I8), intent(out) :: n
integer, intent(out), optional :: rc

Calls

proc~~time_esmf_2_nc_int~~CallsGraph proc~time_esmf_2_nc_int time_esmf_2_nc_int ESMF_TimeIntervalGet ESMF_TimeIntervalGet proc~time_esmf_2_nc_int->ESMF_TimeIntervalGet interface~parse_timeunit parse_timeunit proc~time_esmf_2_nc_int->interface~parse_timeunit proc~mapl_return MAPL_Return proc~time_esmf_2_nc_int->proc~mapl_return proc~mapl_verify MAPL_Verify proc~time_esmf_2_nc_int->proc~mapl_verify proc~parse_timeunit_i4 parse_timeunit_i4 interface~parse_timeunit->proc~parse_timeunit_i4 proc~parse_timeunit_i8 parse_timeunit_i8 interface~parse_timeunit->proc~parse_timeunit_i8 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 proc~parse_timeunit_i4->interface~parse_timeunit proc~parse_timeunit_i4->proc~mapl_return proc~parse_timeunit_i4->proc~mapl_verify proc~parse_timeunit_i8->proc~mapl_return proc~parse_timeunit_i8->proc~mapl_verify ESMF_TimeIntervalSet ESMF_TimeIntervalSet proc~parse_timeunit_i8->ESMF_TimeIntervalSet ESMF_TimeSet ESMF_TimeSet proc~parse_timeunit_i8->ESMF_TimeSet interface~mapl_assert MAPL_Assert proc~parse_timeunit_i8->interface~mapl_assert

Called by

proc~~time_esmf_2_nc_int~~CalledByGraph proc~time_esmf_2_nc_int time_esmf_2_nc_int interface~convert_time_esmf2nc convert_time_esmf2nc interface~convert_time_esmf2nc->proc~time_esmf_2_nc_int

Source Code

  subroutine time_esmf_2_nc_int(time, tunit, n, rc)
    use ESMF
    implicit none

    type(ESMF_TIME), intent(in) :: time
    integer(ESMF_KIND_I8), intent(out) :: n
    character(len=*), intent(in) :: tunit
    integer, intent(out), optional :: rc
    integer :: status

    type(ESMF_Time) :: time0
    type(ESMF_TimeInterval) :: dt

    n=0
    call parse_timeunit(tunit, n, time0, dt, _RC)
    dt = time - time0

    ! assume unit is second
    !
    call ESMF_TimeIntervalGet(dt, s_i8=n, _RC)

    _RETURN(_SUCCESS)

  end subroutine time_esmf_2_nc_int