| 1 | MODULE evolution |
|---|
| 2 | !----------------------------------------------------------------------- |
|---|
| 3 | ! NAME |
|---|
| 4 | ! evolution |
|---|
| 5 | ! |
|---|
| 6 | ! DESCRIPTION |
|---|
| 7 | ! Time parameters for the evolution of the simulation. |
|---|
| 8 | ! |
|---|
| 9 | ! AUTHORS & DATE |
|---|
| 10 | ! JB Clement, 12/2025 |
|---|
| 11 | ! |
|---|
| 12 | ! NOTES |
|---|
| 13 | ! |
|---|
| 14 | !----------------------------------------------------------------------- |
|---|
| 15 | |
|---|
| 16 | ! DEPENDENCIES |
|---|
| 17 | ! ------------ |
|---|
| 18 | use numerics, only: dp, di |
|---|
| 19 | |
|---|
| 20 | ! DECLARATION |
|---|
| 21 | ! ----------- |
|---|
| 22 | implicit none |
|---|
| 23 | |
|---|
| 24 | ! PARAMETERS |
|---|
| 25 | ! ---------- |
|---|
| 26 | real(dp), protected :: r_plnt2earth_yr ! Conversion ratio from Planetary years to Earth years |
|---|
| 27 | real(dp), protected :: pem_ini_date ! Initial year (in Planetary years) of the simulation of the PEM defined in "run.def" |
|---|
| 28 | real(dp), protected :: dt ! Time step in Planetary years |
|---|
| 29 | real(dp), protected :: nmax_yr_run ! Maximum number of Planetary years of a PEM run if no stopping criterion is reached |
|---|
| 30 | |
|---|
| 31 | ! VARIABLES |
|---|
| 32 | ! --------- |
|---|
| 33 | real(dp) :: n_yr_run ! Number of simulated Planetary years of the PEM run |
|---|
| 34 | real(dp) :: n_yr_sim ! Number of simulated Planetary years of the chained simulations |
|---|
| 35 | real(dp) :: ntot_yr_sim ! Total number of Planetary years of the chained simulations |
|---|
| 36 | integer(di) :: idt ! Number of timesteps of the PEM run |
|---|
| 37 | |
|---|
| 38 | contains |
|---|
| 39 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|---|
| 40 | |
|---|
| 41 | !======================================================================= |
|---|
| 42 | SUBROUTINE set_r_plnt2earth_yr(r_plnt2earth_yr_in) |
|---|
| 43 | !----------------------------------------------------------------------- |
|---|
| 44 | ! NAME |
|---|
| 45 | ! set_r_plnt2earth_yr |
|---|
| 46 | ! |
|---|
| 47 | ! DESCRIPTION |
|---|
| 48 | ! Setter for 'r_plnt2earth_yr'. |
|---|
| 49 | ! |
|---|
| 50 | ! AUTHORS & DATE |
|---|
| 51 | ! JB Clement, 12/2025 |
|---|
| 52 | ! |
|---|
| 53 | ! NOTES |
|---|
| 54 | ! |
|---|
| 55 | !----------------------------------------------------------------------- |
|---|
| 56 | |
|---|
| 57 | ! DECLARATION |
|---|
| 58 | ! ----------- |
|---|
| 59 | implicit none |
|---|
| 60 | |
|---|
| 61 | ! ARGUMENTS |
|---|
| 62 | ! --------- |
|---|
| 63 | real(dp), intent(in) :: r_plnt2earth_yr_in |
|---|
| 64 | |
|---|
| 65 | ! CODE |
|---|
| 66 | ! ---- |
|---|
| 67 | r_plnt2earth_yr = r_plnt2earth_yr_in |
|---|
| 68 | |
|---|
| 69 | END SUBROUTINE set_r_plnt2earth_yr |
|---|
| 70 | !======================================================================= |
|---|
| 71 | |
|---|
| 72 | !======================================================================= |
|---|
| 73 | SUBROUTINE set_evolution_config(pem_ini_earth_date,dt_in,nmax_yr_run_in) |
|---|
| 74 | !----------------------------------------------------------------------- |
|---|
| 75 | ! NAME |
|---|
| 76 | ! set_evolution_config |
|---|
| 77 | ! |
|---|
| 78 | ! DESCRIPTION |
|---|
| 79 | ! Setter for 'evolution' configuration parameters. |
|---|
| 80 | ! |
|---|
| 81 | ! AUTHORS & DATE |
|---|
| 82 | ! JB Clement, 02/2026 |
|---|
| 83 | ! |
|---|
| 84 | ! NOTES |
|---|
| 85 | ! |
|---|
| 86 | !----------------------------------------------------------------------- |
|---|
| 87 | |
|---|
| 88 | ! DEPENDENCIES |
|---|
| 89 | ! ------------ |
|---|
| 90 | use utility, only: real2str, int2str |
|---|
| 91 | use display, only: print_msg |
|---|
| 92 | |
|---|
| 93 | ! DECLARATION |
|---|
| 94 | ! ----------- |
|---|
| 95 | implicit none |
|---|
| 96 | |
|---|
| 97 | ! ARGUMENTS |
|---|
| 98 | ! --------- |
|---|
| 99 | integer(di), intent(in) :: pem_ini_earth_date |
|---|
| 100 | real(dp), intent(in) :: dt_in, nmax_yr_run_in |
|---|
| 101 | |
|---|
| 102 | ! CODE |
|---|
| 103 | ! ---- |
|---|
| 104 | pem_ini_date = real(pem_ini_earth_date,dp)/r_plnt2earth_yr |
|---|
| 105 | dt = dt_in |
|---|
| 106 | nmax_yr_run = nmax_yr_run_in |
|---|
| 107 | call print_msg('pem_ini_earth_date = '//int2str(pem_ini_earth_date)//' | pem_ini_date = '//real2str(pem_ini_date)) |
|---|
| 108 | call print_msg('dt = '//real2str(dt)) |
|---|
| 109 | call print_msg('nmax_yr_run = '//real2str(nmax_yr_run)) |
|---|
| 110 | |
|---|
| 111 | END SUBROUTINE set_evolution_config |
|---|
| 112 | !======================================================================= |
|---|
| 113 | |
|---|
| 114 | END MODULE evolution |
|---|