/[lmdze]/trunk/phylmd/orbite.f90
ViewVC logotype

Contents of /trunk/phylmd/orbite.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations)
Thu Jun 13 14:40:06 2019 UTC (4 years, 11 months ago) by guez
File size: 1461 byte(s)
Change all `.f` suffixes to `.f90`. (The opposite was done in revision
82.)  Because of change of philosopy in GNUmakefile: we already had a
rewritten rule for `.f`, so it does not make the makefile longer to
replace it by a rule for `.f90`. And it spares us options of
makedepf90 and of the compiler. Also we prepare the way for a simpler
`CMakeLists.txt`.

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, rad_to_deg
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 ! distance terre-soleil, en ua
27
28 ! Local:
29 REAL xl, xllp, xee, xse, ranm
30
31 !----------------------------------------------------------------------
32
33 xl = r_peri + 180.
34 xllp = xl * deg_to_rad
35 xee = r_ecc**2
36 xse = sqrt(1. - xee)
37 ranm = 2. * ((r_ecc / 2 + r_ecc * xee / 8.) * (1. + xse) * sin(xllp) &
38 - xee / 4. * (0.5 + xse) * sin(2.*xllp) + r_ecc * xee / 8. &
39 * (1. / 3. + xse) * sin(3. * xllp)) + (xjour - 81.) * deg_to_rad - xllp
40 xee = xee * r_ecc
41 longi = ranm + (2. * r_ecc - xee / 4.) * sin(ranm) &
42 + 5. / 4. * r_ecc**2 * sin(2 * ranm) + 13. / 12. * xee * sin(3. * ranm)
43 IF (present(dist)) dist = (1 - r_ecc**2) / (1 + r_ecc * cos(longi))
44 longi = longi * rad_to_deg + xl
45
46 END SUBROUTINE orbite
47
48 END MODULE orbite_m

  ViewVC Help
Powered by ViewVC 1.1.21