update_epoch Subroutine

public subroutine update_epoch(me)

Update the variables for the reference epoch in the mission class. Either computes the et from the calendar state, or vice versa.

Type Bound

mission_type

Arguments

Type IntentOptional Attributes Name
class(mission_type), intent(inout) :: me

Calls

proc~~update_epoch~~CallsGraph proc~update_epoch mission_type%update_epoch et_to_jd et_to_jd proc~update_epoch->et_to_jd jd_to_et jd_to_et proc~update_epoch->jd_to_et julian_date julian_date proc~update_epoch->julian_date julian_date_to_calendar_date julian_date_to_calendar_date proc~update_epoch->julian_date_to_calendar_date

Called by

proc~~update_epoch~~CalledByGraph proc~update_epoch mission_type%update_epoch proc~read_config_file my_solver_type%read_config_file proc~read_config_file->proc~update_epoch proc~initialize_the_solver my_solver_type%initialize_the_solver proc~initialize_the_solver->proc~read_config_file proc~halo_solver_main halo_solver_main proc~halo_solver_main->proc~initialize_the_solver

Source Code

    subroutine update_epoch(me)

    implicit none

    class(mission_type),intent(inout) :: me

    select case (me%epoch_mode)
    case(1)
        ! compute reference epoch from the date (TDB):
        ! save this in the mission class
        me%et_ref = jd_to_et(julian_date(me%year,&
                                         me%month,&
                                         me%day,&
                                         me%hour,&
                                         me%minute,&
                                         me%sec))
    case(2)
        ! then compute calendar from et
        call julian_date_to_calendar_date(et_to_jd(me%et_ref),&
                                          me%year,&
                                          me%month,&
                                          me%day,&
                                          me%hour,&
                                          me%minute,&
                                          me%sec)
    case default
        error stop 'error: epoch_mode must be 1 or 2.'
    end select

    end subroutine update_epoch