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

Contents of /trunk/phylmd/orbite.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 98 - (show annotations)
Tue May 13 17:23:16 2014 UTC (10 years ago) by guez
File size: 1720 byte(s)
Split inter_barxy.f : one procedure per module, one module per
file. Grouped the files into a directory.

Split orbite.f.

Value of raz_date read from the namelist is taken into account
(resetting the step counter) even if annee_ref == anneeref and day_ref
== dayref. raz_date is no longer modified by gcm main unit. (Following
LMDZ.)

Removed argument klon of interfsur_lim. Renamed arguments lmt_alb,
lmt_rug to alb_new, z0_new (same name as corresponding actual
arguments in interfsurf_hq).

Removed argument klon of interfsurf_hq.

Removed arguments qs and d_qs of diagetpq. Were always
zero. Downgraded arguments d_qw, d_ql of diagetpq to local variables,
they were not used in physiq. Removed all computations for solid water
in diagetpq, was just zero.


Downgraded arguments fs_bound, fq_bound of diagphy to local variables,
they were not used in physiq. Encapsulated in a test on iprt all
computations in diagphy.

Removed parameter nbtr of module dimphy. Replaced it everywhere in the
program by nqmx - 2.

Removed parameter rnpb of procedure physiq. Kept the true case in
physiq and phytrac. Could not work with false case anyway.

Removed arguments klon, llm, airephy of qcheck. Removed argument ftsol
of initrrnpb, was not used.

1 MODULE orbite_m
2
3 ! From phylmd/orbite.F, v 1.1.1.1 2004/05/19 12:53:08
4
5 IMPLICIT NONE
6
7 CONTAINS
8
9 SUBROUTINE orbite(xjour, longi, dist)
10
11 USE yomcst, ONLY : r_ecc, r_peri
12 use nr_util, only: pi
13
14 ! Auteur(s): Z.X. Li (LMD/CNRS)
15 ! Date: 1993/08/18
16 ! Pour un jour donné, calcule la longitude vraie de la Terre (par
17 ! rapport au point vernal, 21 mars) dans son orbite solaire. Calcule aussi
18 ! la distance Terre-Soleil, c'est-à-dire l'unité astronomique.
19
20 REAL, INTENT (IN):: xjour ! jour de l'année à compter du premier janvier
21
22 REAL, INTENT (OUT):: longi
23 ! longitude vraie de la Terre dans son orbite solaire, par
24 ! rapport au point vernal (21 mars), en degrés
25
26 REAL, INTENT (OUT), OPTIONAL:: dist
27 ! distance terre-soleil (par rapport a la moyenne)
28
29 ! Variables locales
30 REAL pir, xl, xllp, xee, xse, xlam, anm, ranm, ranv
31
32 !----------------------------------------------------------------------
33
34 pir = pi / 180.
35 xl = r_peri + 180.
36 xllp = xl * pir
37 xee = r_ecc * r_ecc
38 xse = sqrt(1. - xee)
39 xlam = (r_ecc / 2 + r_ecc * xee / 8.) * (1. + xse) * sin(xllp) &
40 - xee / 4. * (0.5 + xse) * sin(2.*xllp) &
41 + r_ecc * xee / 8. * (1. / 3. + xse) * sin(3.*xllp)
42 xlam = 2. * xlam / pir
43 anm = xlam + (xjour - 81.) - xl
44 ranm = anm * pir
45 xee = xee * r_ecc
46 ranv = ranm + (2. * r_ecc - xee / 4.) * sin(ranm) + &
47 5. / 4. * r_ecc * r_ecc * sin(2 * ranm) &
48 + 13. / 12. * xee * sin(3.*ranm)
49
50 longi = ranv / pir + xl
51
52 IF (present(dist)) then
53 dist = (1 - r_ecc*r_ecc) &
54 / (1 + r_ecc*cos(pir*(longi - (r_peri + 180.))))
55 end IF
56
57 END SUBROUTINE orbite
58
59 END MODULE orbite_m

  ViewVC Help
Powered by ViewVC 1.1.21