source: trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90 @ 2909

Last change on this file since 2909 was 2894, checked in by romain.vande, 2 years ago

Mars PEM:
New Boolean options for following orbital parameters of ob_ex_lsp.asc: var_obl, var_ex, var_lsp.
If using evol_orbit_pem=true, you can specify which parameter to follow.
True by default: Do you want to change the parameter XXX during the PEM run as prescribed in ob_ex_lsp.asc.
If false, it is set to constant (to the value of the tab_cntrl in the start)
RV

File size: 3.1 KB
Line 
1      MODULE recomp_orb_param_mod
2!=======================================================================
3!
4! Purpose: Recompute orbit parameters based on values by Laskar et al.,
5! 2004
6!
7! Authors: RV
8!=======================================================================
9      IMPLICIT NONE
10
11      CONTAINS
12
13      SUBROUTINE recomp_orb_param(final_iter)
14
15      USE temps_mod_evol, ONLY: year_bp_ini, year_PEM, var_obl, var_ex, var_lsp
16#ifndef CPP_STD     
17      USE comconst_mod, ONLY: pi
18      USE planete_h, ONLY: e_elips, obliquit, timeperi
19#else
20      use planete_mod, only: e_elips, obliquit, timeperi
21      USE comcstfi_mod, only: pi
22
23#endif
24
25      USE lask_param_mod, only: yearlask,oblask,exlask,lsplask, &
26                                end_lask_param_mod,last_ilask
27
28      IMPLICIT NONE
29
30!--------------------------------------------------------
31! Input Variables
32!--------------------------------------------------------
33
34      integer,intent(in) :: final_iter ! Number of year iteration of the PEM
35
36!--------------------------------------------------------
37! Output Variables
38!--------------------------------------------------------
39
40!--------------------------------------------------------
41! Local variables
42!--------------------------------------------------------
43
44      real :: Year                      ! Year of the simulation
45      real :: timeperi_ls               ! time of peri in ls
46      integer ilask                     ! Loop variable
47
48
49      ! **********************************************************************
50      ! 0. Initializations
51      ! **********************************************************************
52
53
54          Year=year_bp_ini+year_PEM+final_iter
55
56          timeperi_ls=timeperi*360/2/pi
57
58!          Year=-953200
59          print *, "recomp_orb_param, Old year=", year_bp_ini+year_PEM
60          print *, "recomp_orb_param, New year=", Year
61          print *, "recomp_orb_param, Old obl=", obliquit
62          print *, "recomp_orb_param, Old ex=", e_elips
63          print *, "recomp_orb_param, Old lsp=", timeperi_ls
64          print *, "recomp_orb_param, Old timeperi=", timeperi
65
66        do ilask=last_ilask,1,-1
67           if(yearlask(ilask) .GT.Year) then
68             if(var_obl) then
69               obliquit=oblask(ilask+1)+(oblask(ilask)-oblask(ilask+1))*(Year-yearlask(ilask+1))/(yearlask(ilask)-yearlask(ilask+1))
70             endif
71             if(var_ex) then
72               e_elips=exlask(ilask+1)+(exlask(ilask)-exlask(ilask+1))*(Year-yearlask(ilask+1))/(yearlask(ilask)-yearlask(ilask+1))
73             endif
74             if(var_lsp) then
75               timeperi_ls=lsplask(ilask+1)+(lsplask(ilask)-lsplask(ilask+1))*(Year-yearlask(ilask+1))/(yearlask(ilask)-yearlask(ilask+1))
76             endif
77              exit
78           endif
79        enddo
80        timeperi=timeperi_ls*2*pi/360
81
82       print *, "recomp_orb_param, Final year of the PEM run:", Year
83       print *, "recomp_orb_param, New obl=", obliquit
84       print *, "recomp_orb_param, New ex=", e_elips
85       print *, "recomp_orb_param, New timeperi=", timeperi
86
87      END SUBROUTINE recomp_orb_param
88
89!********************************************************************************   
90     
91      END MODULE recomp_orb_param_mod
Note: See TracBrowser for help on using the repository browser.