/[lmdze]/trunk/Sources/phylmd/orbite.f
ViewVC logotype

Contents of /trunk/Sources/phylmd/orbite.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 208 - (show annotations)
Wed Dec 7 16:44:53 2016 UTC (7 years, 4 months ago) by guez
File size: 1535 byte(s)
Module academic was not used.

Useful values for iflag_phys were only 0 and 1 so changed type to logical.

Definition of fmagic was duplicated in procedures alboc and alboc_cd
so moved it up to interfsurf_hq and also moved multiplication by
fmagic (following LMDZ).

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 la
15 ! distance Terre-Soleil, c'est-\`a-dire l'unit\'e astronomique.
16
17 use nr_util, only: pi
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 pir, xl, xllp, xee, xse, ranm
31
32 !----------------------------------------------------------------------
33
34 pir = pi / 180.
35 xl = r_peri + 180.
36 xllp = xl * pir
37 xee = r_ecc**2
38 xse = sqrt(1. - xee)
39 ranm = 2. * ((r_ecc / 2 + r_ecc * xee / 8.) * (1. + xse) * sin(xllp) &
40 - xee / 4. * (0.5 + xse) * sin(2.*xllp) + r_ecc * xee / 8. &
41 * (1. / 3. + xse) * sin(3. * xllp)) + (xjour - 81.) * pir - xllp
42 xee = xee * r_ecc
43 longi = (ranm + (2. * r_ecc - xee / 4.) * sin(ranm) + 5. / 4. * r_ecc**2 &
44 * sin(2 * ranm) + 13. / 12. * xee * sin(3. * ranm)) / pir + xl
45
46 IF (present(dist)) dist = (1 - r_ecc * r_ecc) &
47 / (1 + r_ecc * cos(pir * (longi - (r_peri + 180.))))
48
49 END SUBROUTINE orbite
50
51 END MODULE orbite_m

  ViewVC Help
Powered by ViewVC 1.1.21