[3076] | 1 | MODULE lask_param_mod |
---|
| 2 | |
---|
[2855] | 3 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 4 | !!! |
---|
| 5 | !!! Purpose: Define parameters from Laskar et al., 2004 evolution |
---|
[3076] | 6 | !!! |
---|
[3039] | 7 | !!! Author: RV, JBC |
---|
[2855] | 8 | !!! |
---|
| 9 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[2835] | 10 | |
---|
| 11 | implicit none |
---|
| 12 | |
---|
[3076] | 13 | real, dimension(:), allocatable, save :: yearlask ! year before present from Laskar et al. Tab |
---|
| 14 | real, dimension(:), allocatable, save :: obllask ! obliquity [deg] |
---|
[3149] | 15 | real, dimension(:), allocatable, save :: ecclask ! eccentricity [deg] |
---|
[3076] | 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 |
---|
[2835] | 18 | |
---|
[3076] | 19 | !======================================================================= |
---|
[2835] | 20 | contains |
---|
[3076] | 21 | !======================================================================= |
---|
[2835] | 22 | |
---|
[3076] | 23 | SUBROUTINE ini_lask_param_mod |
---|
[3039] | 24 | |
---|
[3076] | 25 | implicit none |
---|
[3039] | 26 | |
---|
[3076] | 27 | integer :: nlask ! number of lines in Laskar files |
---|
| 28 | integer :: ierr |
---|
[2835] | 29 | |
---|
[3076] | 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)) |
---|
[2835] | 39 | |
---|
[3076] | 40 | END SUBROUTINE ini_lask_param_mod |
---|
[2835] | 41 | |
---|
[3076] | 42 | !======================================================================= |
---|
[2835] | 43 | |
---|
[3076] | 44 | SUBROUTINE end_lask_param_mod |
---|
[2835] | 45 | |
---|
[3076] | 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 |
---|