source: trunk/LMDZ.GENERIC/libf/phystd/orbite.F @ 1330

Last change on this file since 1330 was 1327, checked in by jleconte, 10 years ago

correct previous commit

File size: 1.8 KB
Line 
1      subroutine orbite(pls,pdist_star,pdecli,pright_ascenc)
2
3      use planete_mod, only: p_elips, e_elips, timeperi, obliquit
4      implicit none
5!==================================================================
6!     
7!     Purpose
8!     -------
9!     Distance from star and declination as a function of the stellar
10!     longitude Ls
11!     
12!     Inputs
13!     ------
14!     pls          Ls
15!
16!     Outputs
17!     -------
18!     pdist_star    Distance Star-Planet in UA
19!     pdecli        declinaison ( in radians )
20!     pright_ascenc right ascension ( in radians )
21!
22!=======================================================================
23
24c   Declarations:
25c   -------------
26
27#include "comcstfi.h"
28
29c arguments:
30c ----------
31
32      REAL pday,pdist_star,pdecli,pright_ascenc,pls,i
33
34c-----------------------------------------------------------------------
35
36c Star-Planet Distance
37
38      pdist_star = p_elips/(1.+e_elips*cos(pls+timeperi))
39
40c Stellar declination
41
42c ********************* version before 01/01/2000 *******
43
44      pdecli = asin (sin(pls)*sin(obliquit*pi/180.))
45
46c********************* version after 01/01/2000 *******
47c     i=obliquit*pi/180.
48c     pdecli=asin(sin(pls)*sin(i)/sqrt(sin(pls)**2+
49c    & cos(pls)**2*cos(i)**2))
50c ******************************************************
51
52c right ascencion
53      If((pls.lt.pi/2.d0)) then
54         pright_ascenc= atan(tan(pls)*cos(obliquit*pi/180.))
55      else if((pls.gt.pi/2.d0).and.(pls.lt.3.d0*pi/2.d0)) then
56         pright_ascenc= pi+atan(tan(pls)*cos(obliquit*pi/180.))
57      else if((pls.gt.3.d0*pi/2.d0)) then
58         pright_ascenc= 2.d0*pi+atan(tan(pls)*cos(obliquit*pi/180.))
59      else if (Abs(pls-pi/2.d0).le.1.d-10) then
60         pright_ascenc= pi/2.d0
61      else
62         pright_ascenc=-pi/2.d0
63      end if
64         
65      RETURN
66      END
Note: See TracBrowser for help on using the repository browser.