1 |
MODULE orbite_m |
2 |
|
3 |
IMPLICIT NONE |
4 |
|
5 |
CONTAINS |
6 |
|
7 |
pure SUBROUTINE orbite(xjour, longi, dist) |
8 |
|
9 |
! From phylmd/orbite.F, version 1.1.1.1, 2004/05/19 12:53:08 |
10 |
|
11 |
! Author: Z. X. Li (LMD/CNRS) |
12 |
! Date: 1993/08/18 |
13 |
|
14 |
! Pour un jour donn\'e, calcule la longitude vraie de la Terre et |
15 |
! la distance Terre-Soleil. |
16 |
|
17 |
use nr_util, only: deg_to_rad |
18 |
USE yomcst, ONLY: r_ecc, r_peri |
19 |
|
20 |
REAL, INTENT (IN):: xjour ! jour de l'ann\'ee \`a compter du premier janvier |
21 |
|
22 |
REAL, INTENT (OUT):: longi |
23 |
! longitude vraie de la Terre dans son orbite solaire, par rapport |
24 |
! au point vernal (21 mars), en degr\'es |
25 |
|
26 |
REAL, INTENT (OUT), OPTIONAL:: dist |
27 |
! distance terre-soleil (par rapport \`a la moyenne) |
28 |
|
29 |
! Local: |
30 |
REAL xl, xllp, xee, xse, ranm |
31 |
|
32 |
!---------------------------------------------------------------------- |
33 |
|
34 |
xl = r_peri + 180. |
35 |
xllp = xl * deg_to_rad |
36 |
xee = r_ecc**2 |
37 |
xse = sqrt(1. - xee) |
38 |
ranm = 2. * ((r_ecc / 2 + r_ecc * xee / 8.) * (1. + xse) * sin(xllp) & |
39 |
- xee / 4. * (0.5 + xse) * sin(2.*xllp) + r_ecc * xee / 8. & |
40 |
* (1. / 3. + xse) * sin(3. * xllp)) + (xjour - 81.) * deg_to_rad - xllp |
41 |
xee = xee * r_ecc |
42 |
longi = (ranm + (2. * r_ecc - xee / 4.) * sin(ranm) + 5. / 4. * r_ecc**2 & |
43 |
* sin(2 * ranm) + 13. / 12. * xee * sin(3. * ranm)) / deg_to_rad + xl |
44 |
|
45 |
IF (present(dist)) dist = (1 - r_ecc**2) & |
46 |
/ (1 + r_ecc * cos(deg_to_rad * (longi - (r_peri + 180.)))) |
47 |
|
48 |
END SUBROUTINE orbite |
49 |
|
50 |
END MODULE orbite_m |