C+ C NAME: C ECLIPTIC_HELIOGRAPHIC8 C PURPOSE: C Converts ecliptic coordinates into heliographic coordinates or v.v. C CATEGORY: C Math: coordinate transformation C CALLING SEQUENCE: subroutine ECLIPTIC_HELIOGRAPHIC8(ID,iYr,Doy8,PHI,RLAT) C INPUTS: C ID integer ID=0: ecliptic ---> heliographic C ID=1: heliographic ---> ecliptic C iYr integer year of current date C Doy8 real*8 day of year, including a fraction for the time of day C INPUTS/OUTPUTS: C PHI real ecliptic longitude for equinox of current date/ C heliographic longitude C RLAT real ecliptic latitude for equinox of current date/ C heliographic latitude C INCLUDE: include 'sun.h' C CALLS: C Julian, Rotate C SIDE EFFECTS: C ALFA -90 deg. plus ecliptic longitude of ascending node of solar C equator on ecliptic C BETA inclination of solar equator with respect to ecliptic C GAMMA 90 deg. plus angle from ascending node to heliographic prime C meridian C PROCEDURE: C See R. Green, Spherical Astronomy, Cambridge UP, 1985, Section 17.7, C p. 430. C MODIFICATION HISTORY: C Paul Hick (MPAE,UCSD/CASS; pphick@ucsd.edu) C- integer ID integer iYr real PHI real RLAT real*8 Doy8 real*8 JD real*8 JEpoch real*8 GAM real*8 PERIOD PERIOD = Sun__SiderealP if (ID .ne. 0 .and. ID .ne. 1) stop 'ECLIPTIC_HELIOGRAPHIC: invalid ID' Doy = Doy8 ALFA = -16.333333+.5025*(iYr-1850+(Doy-1)/365.25)/36. BETA = Sun__I !7.25 ! Euler angles call Julian8(0,iYr,Doy8,JD,JEpoch) ! Get JD number JD = JD-2398220. GAM = .25+(JD-PERIOD*int(JD/PERIOD))/PERIOD GAMMA = 360.*(GAM-int(GAM)) if (ID .eq. 0) then call Rotate(ALFA,BETA,GAMMA,PHI,RLAT) ! To heliographic system else call Rotate(-GAMMA,-BETA,-ALFA,PHI,RLAT) ! To ecliptic system end if return end