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