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