OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
earthsundist.f
Go to the documentation of this file.
1 c --------------------------------------------------------------
2 c Subroutine EarthSunDist
3 c
4 c Returns Earth-Sun distance in AU.
5 c
6 c Modification History:
7 c
8 c - More accurrate formulation. B Franz, 26 June 1998.
9 c
10 c --------------------------------------------------------------
11  real*8 function earthsundist(day,dutc)
12 c
13  implicit none
14 c
15  integer*4 day
16  real*8 dutc
17  real*8 pi2
18  real*8 rjd
19 c
20  pi2 = 2.d0 * 3.141592654
21  rjd = day + dutc/24.0
22 c
23 c EarthSunDist = 1.D0 + 0.0167 * cos(pi2*(rjd-3.0)/365.0)
24 c
25  earthsundist = (1.00014
26  . - 0.01671*cos(1.0*pi2*(0.9856002831*rjd-3.4532868)/360.0)
27  . - 0.00014*cos(2.0*pi2*(0.9856002831*rjd-3.4532868)/360.0))
28 
29 c
30  return
31  end
32 
#define real
Definition: DbAlgOcean.cpp:26
real *8 function earthsundist(day, dutc)
Definition: earthsundist.f:12