1 | MODULE time_phylmdz_mod |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | REAL,SAVE :: dtphys ! physics time step (s) |
---|
5 | !$OMP THREADPRIVATE(dtphys) |
---|
6 | |
---|
7 | REAL,SAVE :: daysec ! length of day (s) |
---|
8 | !$OMP THREADPRIVATE(daysec) |
---|
9 | |
---|
10 | INTEGER,SAVE :: steps_per_sol ! number of physics steps per sol |
---|
11 | !$OMP THREADPRIVATE(steps_per_sol) |
---|
12 | |
---|
13 | INTEGER,SAVE :: day_ini ! initial day of the run |
---|
14 | !$OMP THREADPRIVATE(day_ini) |
---|
15 | INTEGER,SAVE :: day_end ! final day of the run |
---|
16 | !$OMP THREADPRIVATE(day_end) |
---|
17 | REAL,SAVE :: hour_ini ! start time (fraction of day) of the run |
---|
18 | ! 0=<hour_ini<1 |
---|
19 | !$OMP THREADPRIVATE(hour_ini) |
---|
20 | |
---|
21 | INTEGER,SAVE :: outputs_per_sol ! for diagfi.nc outputs, number of outputs |
---|
22 | ! per sol (set via conf_phys) |
---|
23 | !$OMP THREADPRIVATE(outputs_per_sol) |
---|
24 | |
---|
25 | INTEGER,SAVE :: iphysiq ! call physics every iphysiq dynamical step |
---|
26 | ! (set via conf_phys) |
---|
27 | !$OMP THREADPRIVATE(iphysiq) |
---|
28 | INTEGER,SAVE :: ecritstart ! write a restart state every ecritstart |
---|
29 | ! dynamical steps (set via conf_phys) |
---|
30 | !$OMP THREADPRIVATE(ecritstart) |
---|
31 | CONTAINS |
---|
32 | |
---|
33 | SUBROUTINE init_time(day_ini_, day_end_, hour_ini_, daysec_, dtphys_) |
---|
34 | |
---|
35 | IMPLICIT NONE |
---|
36 | INTEGER,INTENT(IN) :: day_ini_ |
---|
37 | INTEGER,INTENT(IN) :: day_end_ |
---|
38 | REAL,INTENT(IN) :: hour_ini_ |
---|
39 | REAL,INTENT(IN) :: daysec_ |
---|
40 | REAL,INTENT(IN) :: dtphys_ |
---|
41 | |
---|
42 | day_ini=day_ini_ |
---|
43 | day_end=day_end_ |
---|
44 | hour_ini=hour_ini_ |
---|
45 | daysec=daysec_ |
---|
46 | dtphys=dtphys_ |
---|
47 | |
---|
48 | ! compute number of physics steps per sol |
---|
49 | steps_per_sol=nint(daysec/dtphys) |
---|
50 | |
---|
51 | END SUBROUTINE init_time |
---|
52 | |
---|
53 | END MODULE time_phylmdz_mod |
---|