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
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:72
scale_time::time_dstep_atmos_phy_cp
integer, public time_dstep_atmos_phy_cp
step interval of physics(cumulus )
Definition: scale_time.F90:53
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:60
scale_time::time_dstep_ocean
integer, public time_dstep_ocean
step interval of ocean step
Definition: scale_time.F90:62
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:57
scale_time::time_nowsubsec
real(dp), public time_nowsubsec
subsecond part of current time [sec]
Definition: scale_time.F90:71
scale_time::time_dstep_atmos_phy_lt
integer, public time_dstep_atmos_phy_lt
step interval of physics(lightning )
Definition: scale_time.F90:61
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:70
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:66
scale_io
module STDIO
Definition: scale_io.F90:10
scale_time::time_dtsec_da
real(dp), public time_dtsec_da
time interval of data-assim. step [sec]
Definition: scale_time.F90:49
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:50
scale_time::time_nowstep
integer, public time_nowstep
current step [number]
Definition: scale_time.F90:73
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:58
scale_time::time_dstep_da
integer, public time_dstep_da
step interval of data-assim. step
Definition: scale_time.F90:65
scale_time::time_dstep_atmos_phy_rd
integer, public time_dstep_atmos_phy_rd
step interval of physics(radiation )
Definition: scale_time.F90:55
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:93
scale_time::time_dstep_atmos_dyn
integer, public time_dstep_atmos_dyn
step interval of dynamics
Definition: scale_time.F90:52
scale_time::time_dstep_atmos_phy_sf
integer, public time_dstep_atmos_phy_sf
step interval of physics(surface flux)
Definition: scale_time.F90:56
scale_time::time_nowdate
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
Definition: scale_time.F90:68
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:63
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:74
scale_time::time_time2label
subroutine, public time_time2label(date, subsec, timelabel)
generate time label
Definition: scale_time.F90:109
scale_time::time_dstep_atmos_phy_ch
integer, public time_dstep_atmos_phy_ch
step interval of physics(chemistry )
Definition: scale_time.F90:59
scale_time::time_dstep_atmos_phy_mp
integer, public time_dstep_atmos_phy_mp
step interval of physics(microphysics)
Definition: scale_time.F90:54
scale_time::time_startdaysec
real(dp), public time_startdaysec
second of start time [sec]
Definition: scale_time.F90:77
scale_time::time_offset_year
integer, public time_offset_year
time offset [year]
Definition: scale_time.F90:76
scale_time::time_nowday
integer, public time_nowday
absolute day of current time [day]
Definition: scale_time.F90:69
scale_time::time_dstep_urban
integer, public time_dstep_urban
step interval of urban step
Definition: scale_time.F90:64