1 | ! |
---|
2 | ! $Id: $ |
---|
3 | ! |
---|
4 | MODULE time_phylmdz_mod |
---|
5 | |
---|
6 | IMPLICIT NONE |
---|
7 | REAL,SAVE :: pdtphys ! physics time step (s) |
---|
8 | !$OMP THREADPRIVATE(pdtphys) |
---|
9 | INTEGER,SAVE :: day_step_phy ! number of physical steps per day |
---|
10 | !$OMP THREADPRIVATE(day_step_phy) |
---|
11 | INTEGER,SAVE :: ndays ! number of days to run |
---|
12 | !$OMP THREADPRIVATE(ndays) |
---|
13 | INTEGER,SAVE :: annee_ref ! reference year from the origin |
---|
14 | !$OMP THREADPRIVATE(annee_ref) |
---|
15 | INTEGER,SAVE :: day_ref ! reference year of the origin |
---|
16 | !$OMP THREADPRIVATE(day_ref) |
---|
17 | INTEGER,SAVE :: day_ini ! initial day of the run starting from 1st january of annee_ref |
---|
18 | !$OMP THREADPRIVATE(day_ini) |
---|
19 | INTEGER,SAVE :: day_end ! final day of the run starting from 1st january of annee_ref |
---|
20 | !$OMP THREADPRIVATE(day_end) |
---|
21 | REAL,SAVE :: start_time ! starting time from the begining of the initial day |
---|
22 | !$OMP THREADPRIVATE(start_time) |
---|
23 | INTEGER,SAVE :: raz_date |
---|
24 | !$OMP THREADPRIVATE(raz_date) |
---|
25 | |
---|
26 | INTEGER,SAVE :: itau_phy ! number of physiq iteration from origin |
---|
27 | !$OMP THREADPRIVATE(itau_phy) |
---|
28 | INTEGER,SAVE :: itaufin ! final iteration |
---|
29 | !$OMP THREADPRIVATE(itaufin) |
---|
30 | REAL,SAVE :: current_time ! current elapsed time (s) from the begining of the run |
---|
31 | !$OMP THREADPRIVATE(current_time) |
---|
32 | |
---|
33 | |
---|
34 | CONTAINS |
---|
35 | |
---|
36 | SUBROUTINE init_time(annee_ref_, day_ref_, day_ini_, start_time_, & |
---|
37 | ndays_, pdtphys_) |
---|
38 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
39 | IMPLICIT NONE |
---|
40 | INCLUDE 'YOMCST.h' |
---|
41 | INTEGER, INTENT(IN) :: annee_ref_ |
---|
42 | INTEGER, INTENT(IN) :: day_ref_ |
---|
43 | INTEGER, INTENT(IN) :: day_ini_ |
---|
44 | REAL, INTENT(IN) :: start_time_ |
---|
45 | INTEGER, INTENT(IN) :: ndays_ |
---|
46 | REAL, INTENT(IN) :: pdtphys_ |
---|
47 | |
---|
48 | annee_ref = annee_ref_ |
---|
49 | day_ref = day_ref_ |
---|
50 | day_ini = day_ini_ |
---|
51 | start_time = start_time_ |
---|
52 | ndays = ndays_ |
---|
53 | pdtphys = pdtphys_ |
---|
54 | |
---|
55 | ! Initialize module variable not inherited from dynamics |
---|
56 | day_step_phy = NINT(rday/pdtphys) |
---|
57 | day_end = day_ini + ndays |
---|
58 | |
---|
59 | raz_date = 0 |
---|
60 | CALL getin_p('raz_date', raz_date) |
---|
61 | |
---|
62 | current_time=0 |
---|
63 | |
---|
64 | ! CALL phys_cal_init(annee_ref,day_ref) |
---|
65 | |
---|
66 | END SUBROUTINE init_time |
---|
67 | |
---|
68 | END MODULE time_phylmdz_mod |
---|
69 | |
---|