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