SCALE-RM
scale_time.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
11 module scale_time
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: time_gettimelabel
27  public :: time_time2label
28 
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public parameters & variables
32  !
33  real(dp), public :: time_dtsec
34 
35  real(dp), public :: time_dtsec_atmos_dyn
36  integer, public :: time_nstep_atmos_dyn
37  real(dp), public :: time_dtsec_atmos_phy_cp
38  real(dp), public :: time_dtsec_atmos_phy_mp
39  real(dp), public :: time_dtsec_atmos_phy_rd
40  real(dp), public :: time_dtsec_atmos_phy_sf
41  real(dp), public :: time_dtsec_atmos_phy_tb
42  real(dp), public :: time_dtsec_atmos_phy_bl
43  real(dp), public :: time_dtsec_atmos_phy_ch
44  real(dp), public :: time_dtsec_atmos_phy_ae
45  real(dp), public :: time_dtsec_atmos_phy_lt
46  real(dp), public :: time_dtsec_ocean
47  real(dp), public :: time_dtsec_land
48  real(dp), public :: time_dtsec_urban
49  real(dp), public :: time_dtsec_da
50  real(dp), public :: time_dtsec_wallclock_check
51 
52  integer, public :: time_dstep_atmos_dyn
53  integer, public :: time_dstep_atmos_phy_cp
54  integer, public :: time_dstep_atmos_phy_mp
55  integer, public :: time_dstep_atmos_phy_rd
56  integer, public :: time_dstep_atmos_phy_sf
57  integer, public :: time_dstep_atmos_phy_tb
58  integer, public :: time_dstep_atmos_phy_bl
59  integer, public :: time_dstep_atmos_phy_ch
60  integer, public :: time_dstep_atmos_phy_ae
61  integer, public :: time_dstep_atmos_phy_lt
62  integer, public :: time_dstep_ocean
63  integer, public :: time_dstep_land
64  integer, public :: time_dstep_urban
65  integer, public :: time_dstep_da
66  integer, public :: time_dstep_wallclock_check
67 
68  integer, public :: time_nowdate(6)
69  integer, public :: time_nowday
70  real(dp), public :: time_nowsec
71  real(dp), public :: time_nowsubsec
72  real(dp), public :: time_nowdaysec
73  integer, public :: time_nowstep
74  integer, public :: time_nstep
75 
76  integer, public :: time_offset_year
77  real(dp), public :: time_startdaysec
78 
79  !-----------------------------------------------------------------------------
80  !
81  !++ Private procedure
82  !
83  !-----------------------------------------------------------------------------
84  !
85  !++ Private parameters & variables
86  !
87  !-----------------------------------------------------------------------------
88 contains
89  !-----------------------------------------------------------------------------
91  subroutine time_gettimelabel( &
92  timelabel )
93  implicit none
94 
95  character(len=19), intent(out) :: timelabel
96  !---------------------------------------------------------------------------
97 
98  ! YYYYMMDD-hhmmss.sss
99  call time_time2label( time_nowdate(:), time_nowsubsec, & ! [IN]
100  timelabel ) ! [OUT]
101 
102  return
103  end subroutine time_gettimelabel
104 
106  subroutine time_time2label( &
107  date, subsec, &
108  timelabel )
109  implicit none
110 
111  integer, intent(in) :: date(6)
112  real(dp), intent(in) :: subsec
113 
114  character(len=*), intent(out) :: timelabel
115  !---------------------------------------------------------------------------
116 
117  ! YYYYMMDD-hhmmss.sss
118  write(timelabel,'(I4.4,I2.2,I2.2,A1,I2.2,I2.2,I2.2,A1,I3.3)') &
119  date(1:3), '-', date(4:6), '.', int(subsec*1000.0_dp)
120 
121  return
122  end subroutine time_time2label
123 
124 end module scale_time
module STDIO
Definition: scale_io.F90:10
module PRECISION
integer, parameter, public dp
module profiler
Definition: scale_prof.F90:11
module TIME
Definition: scale_time.F90:11
integer, public time_nowstep
current step [number]
Definition: scale_time.F90:73
real(dp), public time_dtsec_atmos_phy_rd
time interval of physics(radiation ) [sec]
Definition: scale_time.F90:39
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
Definition: scale_time.F90:68
real(dp), public time_dtsec_ocean
time interval of ocean step [sec]
Definition: scale_time.F90:46
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:93
integer, public time_nowday
absolute day of current time [day]
Definition: scale_time.F90:69
real(dp), public time_dtsec_atmos_phy_sf
time interval of physics(surface flux) [sec]
Definition: scale_time.F90:40
integer, public time_nstep
total steps [number]
Definition: scale_time.F90:74
integer, public time_dstep_atmos_dyn
step interval of dynamics
Definition: scale_time.F90:52
real(dp), public time_dtsec_wallclock_check
time interval of wallclock terminator [sec]
Definition: scale_time.F90:50
integer, public time_nstep_atmos_dyn
small step of dynamics
Definition: scale_time.F90:36
integer, public time_dstep_atmos_phy_rd
step interval of physics(radiation )
Definition: scale_time.F90:55
real(dp), public time_startdaysec
second of start time [sec]
Definition: scale_time.F90:77
real(dp), public time_dtsec_urban
time interval of urban step [sec]
Definition: scale_time.F90:48
integer, public time_offset_year
time offset [year]
Definition: scale_time.F90:76
real(dp), public time_dtsec_atmos_phy_ae
time interval of physics(aerosol ) [sec]
Definition: scale_time.F90:44
real(dp), public time_dtsec_atmos_phy_mp
time interval of physics(microphysics) [sec]
Definition: scale_time.F90:38
integer, public time_dstep_atmos_phy_bl
step interval of physics(pbl )
Definition: scale_time.F90:58
real(dp), public time_dtsec_land
time interval of land step [sec]
Definition: scale_time.F90:47
integer, public time_dstep_atmos_phy_tb
step interval of physics(turbulence )
Definition: scale_time.F90:57
real(dp), public time_nowdaysec
second of current time [sec]
Definition: scale_time.F90:72
real(dp), public time_dtsec_atmos_phy_bl
time interval of physics(pbl ) [sec]
Definition: scale_time.F90:42
real(dp), public time_dtsec
time interval of model [sec]
Definition: scale_time.F90:33
integer, public time_dstep_atmos_phy_lt
step interval of physics(lightning )
Definition: scale_time.F90:61
real(dp), public time_nowsubsec
subsecond part of current time [sec]
Definition: scale_time.F90:71
integer, public time_dstep_atmos_phy_cp
step interval of physics(cumulus )
Definition: scale_time.F90:53
integer, public time_dstep_wallclock_check
step interval of wallclock terminator
Definition: scale_time.F90:66
integer, public time_dstep_atmos_phy_ae
step interval of physics(aerosol )
Definition: scale_time.F90:60
integer, public time_dstep_atmos_phy_sf
step interval of physics(surface flux)
Definition: scale_time.F90:56
real(dp), public time_nowsec
subday part of current time [sec]
Definition: scale_time.F90:70
integer, public time_dstep_atmos_phy_ch
step interval of physics(chemistry )
Definition: scale_time.F90:59
integer, public time_dstep_urban
step interval of urban step
Definition: scale_time.F90:64
real(dp), public time_dtsec_atmos_dyn
time interval of dynamics [sec]
Definition: scale_time.F90:35
real(dp), public time_dtsec_atmos_phy_cp
time interval of physics(cumulus ) [sec]
Definition: scale_time.F90:37
integer, public time_dstep_ocean
step interval of ocean step
Definition: scale_time.F90:62
subroutine, public time_time2label(date, subsec, timelabel)
generate time label
Definition: scale_time.F90:109
integer, public time_dstep_da
step interval of data-assim. step
Definition: scale_time.F90:65
real(dp), public time_dtsec_da
time interval of data-assim. step [sec]
Definition: scale_time.F90:49
real(dp), public time_dtsec_atmos_phy_ch
time interval of physics(chemistry ) [sec]
Definition: scale_time.F90:43
integer, public time_dstep_land
step interval of land step
Definition: scale_time.F90:63
integer, public time_dstep_atmos_phy_mp
step interval of physics(microphysics)
Definition: scale_time.F90:54
real(dp), public time_dtsec_atmos_phy_lt
time interval of physics(lightning ) [sec]
Definition: scale_time.F90:45
real(dp), public time_dtsec_atmos_phy_tb
time interval of physics(turbulence ) [sec]
Definition: scale_time.F90:41