source: trunk/LMDZ.COMMON/libf/evolution/evolution.F90 @ 4074

Last change on this file since 4074 was 4072, checked in by jbclement, 11 days ago

PEM:
Modify the PEM semantics to standardize file/functions/variable names and avoid ambiguity: workflow = repetion of cycles; cycle = PCM phase + PEM phase; PCM phase = 2+ PCM runs of 1 year each, PEM phase = 1 PEM run of 'x' years.
JBC

File size: 3.1 KB
Line 
1MODULE 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! ------------
18use numerics, only: dp, di
19
20! DECLARATION
21! -----------
22implicit none
23
24! PARAMETERS
25! ----------
26real(dp), protected :: r_plnt2earth_yr ! Conversion ratio from Planetary years to Earth years
27real(dp), protected :: pem_ini_date    ! Initial year (in Planetary years) of the simulation of the PEM defined in "run.def"
28real(dp), protected :: dt              ! Time step in Planetary years
29real(dp), protected :: nmax_yr_run     ! Maximum number of Planetary years of a PEM run if no stopping criterion is reached
30
31! VARIABLES
32! ---------
33real(dp)    :: n_yr_run    ! Number of simulated Planetary years of the PEM run
34real(dp)    :: n_yr_sim    ! Number of simulated Planetary years of the chained simulations
35real(dp)    :: ntot_yr_sim ! Total number of Planetary years of the chained simulations
36integer(di) :: idt         ! Number of timesteps of the PEM run
37
38contains
39!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
40
41!=======================================================================
42SUBROUTINE 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! -----------
59implicit none
60
61! ARGUMENTS
62! ---------
63real(dp), intent(in) :: r_plnt2earth_yr_in
64
65! CODE
66! ----
67r_plnt2earth_yr = r_plnt2earth_yr_in
68
69END SUBROUTINE set_r_plnt2earth_yr
70!=======================================================================
71
72!=======================================================================
73SUBROUTINE 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! ------------
90use utility, only: real2str, int2str
91use display, only: print_msg
92
93! DECLARATION
94! -----------
95implicit none
96
97! ARGUMENTS
98! ---------
99integer(di), intent(in) :: pem_ini_earth_date
100real(dp),    intent(in) :: dt_in, nmax_yr_run_in
101
102! CODE
103! ----
104pem_ini_date = real(pem_ini_earth_date,dp)/r_plnt2earth_yr
105dt = dt_in
106nmax_yr_run = nmax_yr_run_in
107call print_msg('pem_ini_earth_date = '//int2str(pem_ini_earth_date)//' | pem_ini_date = '//real2str(pem_ini_date))
108call print_msg('dt                 = '//real2str(dt))
109call print_msg('nmax_yr_run        = '//real2str(nmax_yr_run))
110
111END SUBROUTINE set_evolution_config
112!=======================================================================
113
114END MODULE evolution
Note: See TracBrowser for help on using the repository browser.