C+ C NAME: C EARTH8 C PURPOSE: C Returns the heliographic or ecliptic longitude (in degrees) of the C sub-Earth point C CATEGORY: C Celestial mechanics C CALLING SEQUENCE: function EARTH8(iYrIn,Doy8) C INPUTS: C iYr integer year C (if iYr<0 then the ecliptic longitude is returned) C Doy8 real*8 day of year, including fraction for time of day C OUTPUTS: C EARTH real heliographic longitude (degrees, 0<=EARTH<360) C CALLS: C SunNewcomb, ECLIPTIC_HELIOGRAPHIC C SEE ALSO: C XMAP_SC_POS C PROCEDURE: C Typically used as external function to e.g. href=XMAP_SC_POS C MODIFICATION HISTORY: C JAN-1991, Paul Hick (UCSD/CASS) C JUL-1993, Paul Hick (UCSD/CASS; pphick@ucsd.edu), added option to return ecliptic longitude C- integer iYrIn real*8 Doy8 real*8 rLng real*8 rLat real*8 rDist iYr = abs(iYrIn) call SunNewcomb8(0,iYr,Doy8,rLng,rLat,rDist) XLNG = mod(sngl(rLng)+180.,360.) if (iYrIn .ge. 0) then XLAT = 0. call ECLIPTIC_HELIOGRAPHIC8(0,iYr,Doy8,XLNG,XLAT) end if EARTH8 = XLNG return end