time_module Module

Time conversion routines.


Uses

  • module~~time_module~~UsesGraph module~time_module time_module module~kind_module kind_module module~time_module->module~kind_module iso_fortran_env iso_fortran_env module~kind_module->iso_fortran_env

Used by

  • module~~time_module~~UsedByGraph module~time_module time_module module~fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~fortran_astrodynamics_toolkit->module~time_module module~standish_module standish_module module~fortran_astrodynamics_toolkit->module~standish_module module~transformation_module transformation_module module~fortran_astrodynamics_toolkit->module~transformation_module module~standish_module->module~time_module module~transformation_module->module~time_module proc~get_rv_from_jpl_ephemeris jpl_ephemeris_module::jpl_ephemeris%get_rv_from_jpl_ephemeris proc~get_rv_from_jpl_ephemeris->module~time_module

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private, parameter :: jd_j2000 = 2451545.0_wp

julian date of J2000 epoch


Interfaces

public interface julian_date

calendar date to julian date

  • private pure function julian_date_realsec(y, m, d, hour, minute, second) result(julian_date)

    Author
    Jacob Williams
    Date
    1/21/2015

    Returns the Julian date for the specified YEAR, MONTH, DAY, HR, MIN, SEC.

    Valid for any Gregorian calendar date producing a Julian date greater than zero.

    History

    • JW : 10/4/2017 : made second a real value & renamed routine.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: y
    integer, intent(in) :: m
    integer, intent(in) :: d
    integer, intent(in) :: hour
    integer, intent(in) :: minute
    real(kind=wp), intent(in) :: second

    Return Value real(kind=wp)

  • private pure function julian_date_intsec(y, m, d, hour, minute, second) result(julian_date)

    Author
    Jacob Williams
    Date
    1/21/2015

    Returns the Julian date for the specified YEAR, MONTH, DAY, HR, MIN, SEC.

    Valid for any Gregorian calendar date producing a Julian date greater than zero.

    History

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: y
    integer, intent(in) :: m
    integer, intent(in) :: d
    integer, intent(in) :: hour
    integer, intent(in) :: minute
    integer, intent(in) :: second

    Return Value real(kind=wp)

public interface julian_date_to_calendar_date

  • private pure subroutine calendar_date_realsec(julian_date, year, month, day, hrs, min, sec)

    Author
    Jacob Williams

    Returns the year, month, day, hr, min, sec for the specified Julian date.

    See also

    • https://aa.usno.navy.mil/faq/JD_formula.html
    • http://www.davidgsimpson.com/software/jd2greg_f90.txt

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: julian_date

    julian date

    integer, intent(out) :: year
    integer, intent(out) :: month
    integer, intent(out) :: day
    integer, intent(out) :: hrs
    integer, intent(out) :: min
    real(kind=wp), intent(out) :: sec

Functions

public pure function et_to_jd(et) result(jd)

Author
Jacob Williams
Date
2/3/2015

Convert ephemeris time (seconds from J2000 epoch) to Julian date.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: et

ephemeris time [sec from J2000 epoch]

Return Value real(kind=wp)

Julian date [days]

public pure function jd_to_et(jd) result(et)

Author
Jacob Williams
Date
3/19/2016

Convert Julian date to ephemeris time (seconds from J2000 epoch).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: jd

Julian date [days]

Return Value real(kind=wp)

ephemeris time [sec from J2000 epoch]

public pure function jd_to_mjd(jd) result(mjd)

Author
Jacob Williams
Date
3/15/2015

Converts Julian date to Modified Julian date.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: jd

julian date

Return Value real(kind=wp)

modified julian date

public pure function mjd_to_jd(mjd) result(jd)

Author
Jacob Williams
Date
3/15/2015

Converts Modified Julian date to Julian date.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mjd

modified julian date

Return Value real(kind=wp)

julian date

public pure function julian_day(y, m, d)

Author
Jacob Williams

Returns the Julian day number (i.e., the Julian date at Greenwich noon) on the specified YEAR, MONTH, and DAY.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y

year (YYYY)

integer, intent(in) :: m

month (MM)

integer, intent(in) :: d

day (DD)

Return Value integer

private pure function julian_date_intsec(y, m, d, hour, minute, second) result(julian_date)

Author
Jacob Williams
Date
1/21/2015

Returns the Julian date for the specified YEAR, MONTH, DAY, HR, MIN, SEC.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y
integer, intent(in) :: m
integer, intent(in) :: d
integer, intent(in) :: hour
integer, intent(in) :: minute
integer, intent(in) :: second

Return Value real(kind=wp)

private pure function julian_date_realsec(y, m, d, hour, minute, second) result(julian_date)

Author
Jacob Williams
Date
1/21/2015

Returns the Julian date for the specified YEAR, MONTH, DAY, HR, MIN, SEC.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y
integer, intent(in) :: m
integer, intent(in) :: d
integer, intent(in) :: hour
integer, intent(in) :: minute
real(kind=wp), intent(in) :: second

Return Value real(kind=wp)


Subroutines

private pure subroutine calendar_date_realsec(julian_date, year, month, day, hrs, min, sec)

Author
Jacob Williams

Returns the year, month, day, hr, min, sec for the specified Julian date.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: julian_date

julian date

integer, intent(out) :: year
integer, intent(out) :: month
integer, intent(out) :: day
integer, intent(out) :: hrs
integer, intent(out) :: min
real(kind=wp), intent(out) :: sec

public subroutine time_module_test()

Author
Jacob Williams
Date
1/21/2015

Test routine for the Julian date routines.

Arguments

None