source: trunk/LMDZ.MARS/libf/phymars/call_dayperi.F @ 3118

Last change on this file since 3118 was 3040, checked in by jbclement, 15 months ago

Mars PCM:
The variable 'timeperi' (defined in "planete_h.F90" and computed in "iniorbit.F") is renamed into 'lsperi' and thus slightly changed to be coherent to the solar longitude of perihelion in radian. It can now be used out of the box by other subroutines/programs like the PEM.
JBC

File size: 1.1 KB
Line 
1c *******************************************************
2      subroutine call_dayperi(Lsperi,e_elips,dayperi,year_day)
3      IMPLICIT NONE
4
5c=======================================================================
6c
7c   Objet:
8c   ------
9c   Computing the Martian date (number of sols since Ls=0 = spring
10c   equinox) at perihelion
11c
12c   Arguments:
13c   ----------
14c
15c   Input:
16c   ------
17c   Lsperi        ! Solar longitude (Ls) of perihelion (rad)
18c   e_elips       ! Excentricity
19c   real year_day ! Number of sols per Mars year
20c
21c   output
22c   ------
23c   dayperi       ! Martian date at perihelion (sol)
24
25c-----------------------------------------------------------------------
26
27c arguments:
28c ----------
29       real Lsperi, e_elips, dayperi
30       real year_day ! Number of sols per Mars year
31
32c      Local
33       real x1, x2,pi
34
35
36       pi=2.*asin(1.)
37
38       x1 = sqrt( (1-e_elips)/(1+e_elips) )
39       x2 = e_elips*sqrt(1-e_elips**2)
40
41       dayperi = 0.5*(year_day/pi)*
42     &   ( 2*atan(x1*tan(0.5*Lsperi))
43     &     -x2*sin(Lsperi)/(1+e_elips*cos(Lsperi)) )
44       if (dayperi < 0) dayperi=dayperi+year_day
45       return
46
47       end
Note: See TracBrowser for help on using the repository browser.