LMDZ
iniorbit.F90
Go to the documentation of this file.
1 SUBROUTINE iniorbit(paphelie, pperiheli, pyear_day, pperi_day, pobliq)
2  IMPLICIT NONE
3 
4  ! =======================================================================
5 
6  ! Auteur:
7  ! -------
8  ! Frederic Hourdin 22 Fevrier 1991
9 
10  ! Objet:
11  ! ------
12  ! Initialisation du sous programme orbite qui calcule
13  ! a une date donnee de l'annee de duree year_day commencant
14  ! a l'equinoxe de printemps et dont le perihelie se situe
15  ! a la date peri_day, la distance au soleil et la declinaison.
16 
17  ! Interface:
18  ! ----------
19  ! - Doit etre appele avant d'utiliser orbite.
20  ! - initialise une partie du common planete.h
21 
22  ! Arguments:
23  ! ----------
24 
25  ! Input:
26  ! ------
27  ! aphelie \ aphelie et perihelie de l'orbite
28  ! periheli / en millions de kilometres.
29 
30  ! =======================================================================
31 
32  ! -----------------------------------------------------------------------
33  ! Declarations:
34  ! -------------
35 
36  include "planete.h"
37  include "YOMCST.h"
38 
39  ! Arguments:
40  ! ----------
41 
42  REAL paphelie, pperiheli, pyear_day, pperi_day, pobliq
43 
44  ! Local:
45  ! ------
46 
47  REAL zxref, zanom, zz, zx0, zdx, pi
48  INTEGER iter
49 
50  ! -----------------------------------------------------------------------
51 
52  pi = 2.*asin(1.)
53 
54  aphelie = paphelie
55  periheli = pperiheli
56  year_day = pyear_day
57  obliquit = pobliq
58  peri_day = pperi_day
59 
60  print *, 'Perihelie en Mkm ', periheli
61  print *, 'Aphelie en Mkm ', aphelie
62  print *, 'obliquite en degres :', obliquit
63  print *, 'Jours dans l annee : ', year_day
64  print *, 'Date perihelie : ', peri_day
65  unitastr = 149.597870
67  p_elips = 0.5*(periheli+aphelie)*(1-e_elips*e_elips)/unitastr
68 
69  print *, 'e_elips', e_elips
70  print *, 'p_elips', p_elips
71 
72  ! -----------------------------------------------------------------------
73  ! calcul de l'angle polaire et de la distance au soleil :
74  ! -------------------------------------------------------
75 
76  ! calcul de l'zanomalie moyenne
77 
78  zz = (year_day-pperi_day)/year_day
79  zanom = 2.*pi*(zz-nint(zz))
80  zxref = abs(zanom)
81  print *, 'zanom ', zanom
82 
83  ! resolution de l'equation horaire zx0 - e * sin (zx0) = zxref
84  ! methode de Newton
85 
86  zx0 = zxref + r_ecc*sin(zxref)
87  DO iter = 1, 100
88  zdx = -(zx0-r_ecc*sin(zx0)-zxref)/(1.-r_ecc*cos(zx0))
89  IF (abs(zdx)<=(1.e-12)) GO TO 120
90  zx0 = zx0 + zdx
91  END DO
92 120 CONTINUE
93  zx0 = zx0 + zdx
94  IF (zanom<0.) zx0 = -zx0
95  print *, 'zx0 ', zx0
96 
97  ! zteta est la longitude solaire
98 
99  timeperi = 2.*atan(sqrt((1.+r_ecc)/(1.-r_ecc))*tan(zx0/2.))
100  print *, 'longitude solaire du perihelie timeperi = ', timeperi
101 
102  RETURN
103 END SUBROUTINE iniorbit
!INCLUDE planet h COMMON planet periheli
Definition: planete.h:4
!INCLUDE planet h COMMON planet aphelie
Definition: planete.h:4
subroutine iniorbit(paphelie, pperiheli, pyear_day, pperi_day, pobliq)
Definition: iniorbit.F90:2
!INCLUDE planet h COMMON planet & e_elips
Definition: planete.h:4
!INCLUDE planet h COMMON planet peri_day
Definition: planete.h:4
!INCLUDE planet h COMMON planet timeperi
Definition: planete.h:4
!INCLUDE planet h COMMON planet p_elips
Definition: planete.h:4
!$Id mode_top_bound COMMON comconstr omeg dissip_zref year_day
Definition: comconst.h:7
!INCLUDE planet h COMMON planet obliquit
Definition: planete.h:4