1 | MODULE lask_param_mod |
---|
2 | |
---|
3 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
4 | !!! |
---|
5 | !!! Purpose: Define parameters from Laskar et al., 2004 evolution |
---|
6 | !!! |
---|
7 | !!! Author: RV, JBC |
---|
8 | !!! |
---|
9 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
10 | |
---|
11 | implicit none |
---|
12 | |
---|
13 | real, dimension(:), allocatable, save :: yearlask ! year before present from Laskar et al. Tab |
---|
14 | real, dimension(:), allocatable, save :: obllask ! obliquity [deg] |
---|
15 | real, dimension(:), allocatable, save :: ecclask ! eccentricity [deg] |
---|
16 | real, dimension(:), allocatable, save :: lsplask ! ls perihelie [deg] |
---|
17 | integer, save :: last_ilask ! Index of the line in the file year_obl_lask.asc corresponding to the closest lower year to the current year |
---|
18 | |
---|
19 | !======================================================================= |
---|
20 | contains |
---|
21 | !======================================================================= |
---|
22 | |
---|
23 | SUBROUTINE ini_lask_param_mod |
---|
24 | |
---|
25 | implicit none |
---|
26 | |
---|
27 | integer :: nlask ! number of lines in Laskar files |
---|
28 | integer :: ierr |
---|
29 | |
---|
30 | nlask = 0 |
---|
31 | open(1,file = 'obl_ecc_lsp.asc') |
---|
32 | do |
---|
33 | read(1,*,iostat = ierr) |
---|
34 | if (ierr /= 0) exit |
---|
35 | nlask = nlask + 1 |
---|
36 | enddo |
---|
37 | close(1) |
---|
38 | allocate(yearlask(nlask),obllask(nlask),ecclask(nlask),lsplask(nlask)) |
---|
39 | |
---|
40 | END SUBROUTINE ini_lask_param_mod |
---|
41 | |
---|
42 | !======================================================================= |
---|
43 | |
---|
44 | SUBROUTINE end_lask_param_mod |
---|
45 | |
---|
46 | implicit none |
---|
47 | |
---|
48 | if (allocated(yearlask)) deallocate(yearlask) |
---|
49 | if (allocated(obllask)) deallocate(obllask) |
---|
50 | if (allocated(ecclask)) deallocate(ecclask) |
---|
51 | if (allocated(lsplask)) deallocate(lsplask) |
---|
52 | |
---|
53 | END SUBROUTINE end_lask_param_mod |
---|
54 | |
---|
55 | END MODULE lask_param_mod |
---|