|
Last change
on this file since 3948 was
3739,
checked in by emillour, 7 months ago
|
|
Mars PCM:
Code tidying: put routines in modules, remove useless "return" statements, etc.
EM
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | module call_dayperi_mod |
|---|
| 2 | |
|---|
| 3 | implicit none |
|---|
| 4 | |
|---|
| 5 | contains |
|---|
| 6 | |
|---|
| 7 | c ******************************************************* |
|---|
| 8 | subroutine call_dayperi(Lsperi,e_elips,dayperi,year_day) |
|---|
| 9 | IMPLICIT NONE |
|---|
| 10 | |
|---|
| 11 | c======================================================================= |
|---|
| 12 | c |
|---|
| 13 | c Objet: |
|---|
| 14 | c ------ |
|---|
| 15 | c Computing the Martian date (number of sols since Ls=0 = spring |
|---|
| 16 | c equinox) at perihelion |
|---|
| 17 | c |
|---|
| 18 | c Arguments: |
|---|
| 19 | c ---------- |
|---|
| 20 | c |
|---|
| 21 | c Input: |
|---|
| 22 | c ------ |
|---|
| 23 | c Lsperi ! Solar longitude (Ls) of perihelion (rad) |
|---|
| 24 | c e_elips ! Excentricity |
|---|
| 25 | c real year_day ! Number of sols per Mars year |
|---|
| 26 | c |
|---|
| 27 | c output |
|---|
| 28 | c ------ |
|---|
| 29 | c dayperi ! Martian date at perihelion (sol) |
|---|
| 30 | |
|---|
| 31 | c----------------------------------------------------------------------- |
|---|
| 32 | |
|---|
| 33 | c arguments: |
|---|
| 34 | c ---------- |
|---|
| 35 | real Lsperi, e_elips, dayperi |
|---|
| 36 | real year_day ! Number of sols per Mars year |
|---|
| 37 | |
|---|
| 38 | c Local |
|---|
| 39 | real x1, x2,pi |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | pi=2.*asin(1.) |
|---|
| 43 | |
|---|
| 44 | x1 = sqrt( (1-e_elips)/(1+e_elips) ) |
|---|
| 45 | x2 = e_elips*sqrt(1-e_elips**2) |
|---|
| 46 | |
|---|
| 47 | dayperi = 0.5*(year_day/pi)* |
|---|
| 48 | & ( 2*atan(x1*tan(0.5*Lsperi)) |
|---|
| 49 | & -x2*sin(Lsperi)/(1+e_elips*cos(Lsperi)) ) |
|---|
| 50 | if (dayperi < 0) dayperi=dayperi+year_day |
|---|
| 51 | |
|---|
| 52 | end subroutine call_dayperi |
|---|
| 53 | |
|---|
| 54 | end module call_dayperi_mod |
|---|
Note: See
TracBrowser
for help on using the repository browser.