SCALE-RM
mod_admin_time.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
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 :: admin_time_setup
27  public :: admin_time_checkstate
28  public :: admin_time_advance
29 
30  !-----------------------------------------------------------------------------
31  !
32  !++ Public parameters & variables
33  !
34  real(dp), public :: time_dtsec_atmos_restart
35  real(dp), public :: time_dtsec_ocean_restart
36  real(dp), public :: time_dtsec_land_restart
37  real(dp), public :: time_dtsec_urban_restart
38  real(dp), public :: time_dtsec_resume
39 
40  integer, public :: time_dstep_atmos_restart
41  integer, public :: time_dstep_ocean_restart
42  integer, public :: time_dstep_land_restart
43  integer, public :: time_dstep_urban_restart
44  integer, public :: time_dstep_resume
45 
46  logical, public :: time_doatmos_step
47  logical, public :: time_doatmos_dyn
48  logical, public :: time_doatmos_phy_cp
49  logical, public :: time_doatmos_phy_mp
50  logical, public :: time_doatmos_phy_rd
51  logical, public :: time_doatmos_phy_sf
52  logical, public :: time_doatmos_phy_tb
53  logical, public :: time_doatmos_phy_bl
54  logical, public :: time_doatmos_phy_ch
55  logical, public :: time_doatmos_phy_ae
56  logical, public :: time_doatmos_phy_lt
57  logical, public :: time_doatmos_restart
58  logical, public :: time_doocean_step
59  logical, public :: time_doocean_restart
60  logical, public :: time_doland_step
61  logical, public :: time_doland_restart
62  logical, public :: time_dourban_step
63  logical, public :: time_dourban_restart
64  logical, public :: time_doresume
65  logical, public :: time_doend
66 
67  !-----------------------------------------------------------------------------
68  !
69  !++ Private procedure
70  !
71  !-----------------------------------------------------------------------------
72  !
73  !++ Private parameters & variables
74  !
75  integer, private :: time_startdate(6) = (/ -999, 1, 1, 0, 0, 0 /)
76  real(dp), private :: time_startms = 0.0_dp
77  real(dp), private :: time_startsubsec
78  integer, private :: time_startday
79  real(dp), private :: time_startsec
80 
81  integer, private :: time_enddate(6)
82  real(dp), private :: time_endsubsec
83  integer, private :: time_endday
84  real(dp), private :: time_endsec
85 
86  integer, private :: time_res_atmos_dyn = 0
87  integer, private :: time_res_atmos_phy_cp = 0
88  integer, private :: time_res_atmos_phy_mp = 0
89  integer, private :: time_res_atmos_phy_rd = 0
90  integer, private :: time_res_atmos_phy_sf = 0
91  integer, private :: time_res_atmos_phy_tb = 0
92  integer, private :: time_res_atmos_phy_bl = 0
93  integer, private :: time_res_atmos_phy_ch = 0
94  integer, private :: time_res_atmos_phy_ae = 0
95  integer, private :: time_res_atmos_phy_lt = 0
96  integer, private :: time_res_atmos_restart = 0
97  integer, private :: time_res_ocean = 0
98  integer, private :: time_res_ocean_restart = 0
99  integer, private :: time_res_land = 0
100  integer, private :: time_res_land_restart = 0
101  integer, private :: time_res_urban = 0
102  integer, private :: time_res_urban_restart = 0
103  integer, private :: time_res_resume
104 
105  real(dp), private :: time_wallclock_start ! Start time of wall clock [sec]
106  real(dp), private :: time_wallclock_limit = -1.0_dp ! Elapse time limit of wall clock time [sec]
107  real(dp), private :: time_wallclock_safe = 0.9_dp ! Safety coefficient for elapse time limit
108  real(dp), private :: time_wallclock_safelim ! TIME_WALLCLOCK_LIMIT * TIME_WALLCLOCK_SAFE
109 
110  logical, private :: debug = .false.
111 
112  real(dp), private, parameter :: eps = 1.e-6_dp
113 
114  !-----------------------------------------------------------------------------
115 contains
116  !-----------------------------------------------------------------------------
118  subroutine admin_time_setup( &
119  setup_TimeIntegration )
120  use scale_file, only: &
121  file_get_attribute
122  use scale_prc, only: &
123  prc_myrank, &
124  prc_abort, &
126  use scale_const, only: &
127  undef8 => const_undef8
128  use scale_calendar, only: &
136  use scale_time, only: &
137  time_dtsec, &
138  time_nowdate, &
139  time_nowsubsec, &
140  time_nowday, &
141  time_nowsec, &
142  time_nowdaysec, &
143  time_nowstep, &
144  time_nstep, &
146  nstep_dyn => time_nstep_atmos_dyn, &
157  time_dtsec_land, &
171  time_dstep_land, &
176  use mod_atmos_vars, only: &
177  restart_in_basename => atmos_restart_in_basename
178  implicit none
179 
180  logical, intent(in) :: setup_timeintegration
181 
182  real(dp) :: time_duration = undef8
183  character(len=H_SHORT) :: time_duration_unit = "SEC"
184  real(dp) :: time_dt = undef8
185  character(len=H_SHORT) :: time_dt_unit = "SEC"
186 
187  real(dp) :: time_dt_atmos_dyn = undef8
188  character(len=H_SHORT) :: time_dt_atmos_dyn_unit = "SEC"
189  integer :: time_nstep_atmos_dyn = -1
190  real(dp) :: time_dt_atmos_phy_cp = undef8
191  character(len=H_SHORT) :: time_dt_atmos_phy_cp_unit = ""
192  real(dp) :: time_dt_atmos_phy_mp = undef8
193  character(len=H_SHORT) :: time_dt_atmos_phy_mp_unit = ""
194  real(dp) :: time_dt_atmos_phy_rd = undef8
195  character(len=H_SHORT) :: time_dt_atmos_phy_rd_unit = ""
196  real(dp) :: time_dt_atmos_phy_sf = undef8
197  character(len=H_SHORT) :: time_dt_atmos_phy_sf_unit = ""
198  real(dp) :: time_dt_atmos_phy_tb = undef8
199  character(len=H_SHORT) :: time_dt_atmos_phy_tb_unit = ""
200  real(dp) :: time_dt_atmos_phy_bl = undef8
201  character(len=H_SHORT) :: time_dt_atmos_phy_bl_unit = ""
202  real(dp) :: time_dt_atmos_phy_ch = undef8
203  character(len=H_SHORT) :: time_dt_atmos_phy_ch_unit = ""
204  real(dp) :: time_dt_atmos_phy_ae = undef8
205  character(len=H_SHORT) :: time_dt_atmos_phy_ae_unit = ""
206  real(dp) :: time_dt_atmos_phy_lt = undef8
207  character(len=H_SHORT) :: time_dt_atmos_phy_lt_unit = ""
208  real(dp) :: time_dt_atmos_restart = undef8
209  character(len=H_SHORT) :: time_dt_atmos_restart_unit = ""
210 
211  real(dp) :: time_dt_ocean = undef8
212  character(len=H_SHORT) :: time_dt_ocean_unit = ""
213  real(dp) :: time_dt_ocean_restart = undef8
214  character(len=H_SHORT) :: time_dt_ocean_restart_unit = ""
215 
216  real(dp) :: time_dt_land = undef8
217  character(len=H_SHORT) :: time_dt_land_unit = ""
218  real(dp) :: time_dt_land_restart = undef8
219  character(len=H_SHORT) :: time_dt_land_restart_unit = ""
220 
221  real(dp) :: time_dt_urban = undef8
222  character(len=H_SHORT) :: time_dt_urban_unit = ""
223  real(dp) :: time_dt_urban_restart = undef8
224  character(len=H_SHORT) :: time_dt_urban_restart_unit = ""
225 
226  real(dp) :: time_dt_resume = undef8
227  character(len=H_SHORT) :: time_dt_resume_unit = ""
228 
229  real(dp) :: time_dt_wallclock_check = undef8
230  character(len=H_SHORT) :: time_dt_wallclock_check_unit = ""
231 
232  namelist / param_time / &
233  time_startdate, &
234  time_startms, &
235  time_duration, &
236  time_duration_unit, &
237  time_dt, &
238  time_dt_unit, &
239  time_dt_atmos_dyn, &
240  time_dt_atmos_dyn_unit, &
242  time_dt_atmos_phy_cp, &
243  time_dt_atmos_phy_cp_unit, &
244  time_dt_atmos_phy_mp, &
245  time_dt_atmos_phy_mp_unit, &
246  time_dt_atmos_phy_rd, &
247  time_dt_atmos_phy_rd_unit, &
248  time_dt_atmos_phy_sf, &
249  time_dt_atmos_phy_sf_unit, &
250  time_dt_atmos_phy_tb, &
251  time_dt_atmos_phy_tb_unit, &
252  time_dt_atmos_phy_bl, &
253  time_dt_atmos_phy_bl_unit, &
254  time_dt_atmos_phy_ch, &
255  time_dt_atmos_phy_ch_unit, &
256  time_dt_atmos_phy_ae, &
257  time_dt_atmos_phy_ae_unit, &
258  time_dt_atmos_phy_lt, &
259  time_dt_atmos_phy_lt_unit, &
260  time_dt_atmos_restart, &
261  time_dt_atmos_restart_unit, &
262  time_dt_ocean, &
263  time_dt_ocean_unit, &
264  time_dt_ocean_restart, &
265  time_dt_ocean_restart_unit, &
266  time_dt_land, &
267  time_dt_land_unit, &
268  time_dt_land_restart, &
269  time_dt_land_restart_unit, &
270  time_dt_urban, &
271  time_dt_urban_unit, &
272  time_dt_urban_restart, &
273  time_dt_urban_restart_unit, &
274  time_dt_wallclock_check, &
275  time_dt_wallclock_check_unit, &
276  time_dt_resume, &
277  time_dt_resume_unit, &
278  time_wallclock_limit, &
279  time_wallclock_safe, &
280  debug
281 
282  integer :: dateday
283  real(dp) :: datesec
284  real(dp) :: cftime(1)
285  character(len=H_MID) :: cfunits
286 
287  real(dp) :: time_durationsec
288  character(len=27) :: startchardate
289  character(len=27) :: endchardate
290 
291  integer :: ierr
292  !---------------------------------------------------------------------------
293 
294  log_newline
295  log_info("ADMIN_TIME_setup",*) 'Setup'
296 
298 
299  !--- read namelist
300  rewind(io_fid_conf)
301  read(io_fid_conf,nml=param_time,iostat=ierr)
302  if( ierr < 0 ) then !--- missing
303  log_info("ADMIN_TIME_setup",*) 'Not found namelist. Default used.'
304  elseif( ierr > 0 ) then !--- fatal error
305  log_error("ADMIN_TIME_setup",*) 'Not appropriate names in namelist PARAM_TIME. Check!'
306  call prc_abort
307  endif
308  log_nml(param_time)
309 
310  ! check time setting
311  if ( setup_timeintegration ) then
312 
313  log_newline
314  log_info("ADMIN_TIME_setup",*) 'Check time interval and unit for each component '
315 
316  if ( time_dt == undef8 ) then
317  log_error("ADMIN_TIME_setup",*) 'Not found TIME_DT. STOP.'
318  call prc_abort
319  endif
320  if ( time_duration == undef8 ) then
321  log_error("ADMIN_TIME_setup",*) 'Not found TIME_DURATION. STOP.'
322  call prc_abort
323  endif
324 
325  ! DYN
326  if ( time_dt_atmos_dyn == undef8 ) then
327  if ( time_nstep_atmos_dyn < 0 ) then
328  log_info_cont(*) 'Not found TIME_DT_ATMOS_DYN. TIME_DT is used.'
329  time_dt_atmos_dyn = time_dt
330  endif
331  endif
332  if ( time_dt_atmos_dyn_unit == '' ) then
333  log_info_cont(*) 'Not found TIME_DT_ATMOS_DYN_UNIT. TIME_DT_UNIT is used.'
334  time_dt_atmos_dyn_unit = time_dt_unit
335  endif
336  ! PHY_CP
337  if ( time_dt_atmos_phy_cp == undef8 ) then
338  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_CP. TIME_DT is used.'
339  time_dt_atmos_phy_cp = time_dt
340  endif
341  if ( time_dt_atmos_phy_cp_unit == '' ) then
342  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_CP_UNIT. TIME_DT_UNIT is used.'
343  time_dt_atmos_phy_cp_unit = time_dt_unit
344  endif
345  ! PHY_MP
346  if ( time_dt_atmos_phy_mp == undef8 ) then
347  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_MP. TIME_DT is used.'
348  time_dt_atmos_phy_mp = time_dt
349  endif
350  if ( time_dt_atmos_phy_mp_unit == '' ) then
351  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_MP_UNIT. TIME_DT_UNIT is used.'
352  time_dt_atmos_phy_mp_unit = time_dt_unit
353  endif
354  ! PHY_RD
355  if ( time_dt_atmos_phy_rd == undef8 ) then
356  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_RD. TIME_DT is used.'
357  time_dt_atmos_phy_rd = time_dt
358  endif
359  if ( time_dt_atmos_phy_rd_unit == '' ) then
360  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_RD_UNIT. TIME_DT_UNIT is used.'
361  time_dt_atmos_phy_rd_unit = time_dt_unit
362  endif
363  ! PHY_SF
364  if ( time_dt_atmos_phy_sf == undef8 ) then
365  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_SF. TIME_DT is used.'
366  time_dt_atmos_phy_sf = time_dt
367  endif
368  if ( time_dt_atmos_phy_sf_unit == '' ) then
369  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_SF_UNIT. TIME_DT_UNIT is used.'
370  time_dt_atmos_phy_sf_unit = time_dt_unit
371  endif
372  ! PHY_TB
373  if ( time_dt_atmos_phy_tb == undef8 ) then
374  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_TB. TIME_DT is used.'
375  time_dt_atmos_phy_tb = time_dt
376  endif
377  if ( time_dt_atmos_phy_tb_unit == '' ) then
378  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_TB_UNIT. TIME_DT_UNIT is used.'
379  time_dt_atmos_phy_tb_unit = time_dt_unit
380  endif
381  ! PHY_BL
382  if ( time_dt_atmos_phy_bl == undef8 ) then
383  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_BL. TIME_DT is used.'
384  time_dt_atmos_phy_bl = time_dt
385  endif
386  if ( time_dt_atmos_phy_bl_unit == '' ) then
387  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_BL_UNIT. TIME_DT_UNIT is used.'
388  time_dt_atmos_phy_bl_unit = time_dt_unit
389  endif
390  ! PHY_CH
391  if ( time_dt_atmos_phy_ch == undef8 ) then
392  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_CH. TIME_DT is used.'
393  time_dt_atmos_phy_ch = time_dt
394  endif
395  if ( time_dt_atmos_phy_ch_unit == '' ) then
396  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_CH_UNIT. TIME_DT_UNIT is used.'
397  time_dt_atmos_phy_ch_unit = time_dt_unit
398  endif
399  ! PHY_AE
400  if ( time_dt_atmos_phy_ae == undef8 ) then
401  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_AE. TIME_DT is used.'
402  time_dt_atmos_phy_ae = time_dt
403  endif
404  if ( time_dt_atmos_phy_ae_unit == '' ) then
405  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_AE_UNIT. TIME_DT_UNIT is used.'
406  time_dt_atmos_phy_ae_unit = time_dt_unit
407  endif
408  ! PHY_LT
409  if ( time_dt_atmos_phy_lt == undef8 ) then
410  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_LT. TIME_DT is used.'
411  time_dt_atmos_phy_lt = time_dt
412  endif
413  if ( time_dt_atmos_phy_lt_unit == '' ) then
414  log_info_cont(*) 'Not found TIME_DT_ATMOS_PHY_LT_UNIT. TIME_DT_UNIT is used.'
415  time_dt_atmos_phy_lt_unit = time_dt_unit
416  endif
417  ! ATMOS RESTART
418  if ( time_dt_atmos_restart == undef8 ) then
419  log_info_cont(*) 'Not found TIME_DT_ATMOS_RESTART. TIME_DURATION is used.'
420  time_dt_atmos_restart = time_duration
421  endif
422  if ( time_dt_atmos_restart_unit == '' ) then
423  log_info_cont(*) 'Not found TIME_DT_ATMOS_RESTART_UNIT. TIME_DURATION_UNIT is used.'
424  time_dt_atmos_restart_unit = time_duration_unit
425  endif
426  ! OCEAN
427  if ( time_dt_ocean == undef8 ) then
428  log_info_cont(*) 'Not found TIME_DT_OCEAN. TIME_DT is used.'
429  time_dt_ocean = time_dt
430  endif
431  if ( time_dt_ocean_unit == '' ) then
432  log_info_cont(*) 'Not found TIME_DT_OCEAN_UNIT. TIME_DT_UNIT is used.'
433  time_dt_ocean_unit = time_dt_unit
434  endif
435  ! OCEAN RESTART
436  if ( time_dt_ocean_restart == undef8 ) then
437  log_info_cont(*) 'Not found TIME_DT_OCEAN_RESTART. TIME_DURATION is used.'
438  time_dt_ocean_restart = time_duration
439  endif
440  if ( time_dt_ocean_restart_unit == '' ) then
441  log_info_cont(*) 'Not found TIME_DT_OCEAN_RESTART_UNIT. TIME_DURATION_UNIT is used.'
442  time_dt_ocean_restart_unit = time_duration_unit
443  endif
444  ! LAND
445  if ( time_dt_land == undef8 ) then
446  log_info_cont(*) 'Not found TIME_DT_LAND. TIME_DT is used.'
447  time_dt_land = time_dt
448  endif
449  if ( time_dt_land_unit == '' ) then
450  log_info_cont(*) 'Not found TIME_DT_LAND_UNIT. TIME_DT_UNIT is used.'
451  time_dt_land_unit = time_dt_unit
452  endif
453  ! LAND RESTART
454  if ( time_dt_land_restart == undef8 ) then
455  log_info_cont(*) 'Not found TIME_DT_LAND_RESTART. TIME_DURATION is used.'
456  time_dt_land_restart = time_duration
457  endif
458  if ( time_dt_land_restart_unit == '' ) then
459  log_info_cont(*) 'Not found TIME_DT_LAND_RESTART_UNIT. TIME_DURATION_UNIT is used.'
460  time_dt_land_restart_unit = time_duration_unit
461  endif
462  ! URBAN
463  if ( time_dt_urban == undef8 ) then
464  log_info_cont(*) 'Not found TIME_DT_URBAN. TIME_DT is used.'
465  time_dt_urban = time_dt
466  endif
467  if ( time_dt_urban_unit == '' ) then
468  log_info_cont(*) 'Not found TIME_DT_URBAN_UNIT. TIME_DT_UNIT is used.'
469  time_dt_urban_unit = time_dt_unit
470  endif
471  ! URBAN RESTART
472  if ( time_dt_urban_restart == undef8 ) then
473  log_info_cont(*) 'Not found TIME_DT_URBAN_RESTART. TIME_DURATION is used.'
474  time_dt_urban_restart = time_duration
475  endif
476  if ( time_dt_urban_restart_unit == '' ) then
477  log_info_cont(*) 'Not found TIME_DT_URBAN_RESTART_UNIT. TIME_DURATION_UNIT is used.'
478  time_dt_urban_restart_unit = time_duration_unit
479  endif
480  ! Resume
481  if ( time_dt_resume == undef8 ) then
482  time_dt_resume = time_duration
483  endif
484  if ( time_dt_resume_unit == '' ) then
485  log_info_cont(*) 'Not found TIME_DT_RESUME_UNIT. TIME_DURATION_UNIT is used.'
486  time_dt_resume_unit = time_duration_unit
487  endif
488  endif
489 
490  !--- calculate time
491  if ( time_startdate(1) == -999 ) then
492  if ( restart_in_basename /= '' ) then ! read start time from the restart data
493  call file_get_attribute( restart_in_basename, & ! [IN]
494  "global", & ! [IN]
495  'time_start', & ! [IN]
496  cftime(:), & ! [OUT]
497  rankid = prc_myrank, & ! [IN]
498  single = .false. ) ! [IN]
499 
500  call file_get_attribute( restart_in_basename, & ! [IN]
501  "global", & ! [IN]
502  'time_units', & ! [IN]
503  cfunits, & ! [OUT]
504  rankid = prc_myrank, & ! [IN]
505  single = .false. ) ! [IN]
506 
507  dateday = 0
508  datesec = calendar_cfunits2sec( cftime(1), cfunits, 0 )
509 
510  call calendar_adjust_daysec( dateday, datesec )
511 
512  call calendar_daysec2date( time_startdate, & ! [OUT]
513  time_startsubsec, & ! [OUT]
514  dateday, & ! [IN]
515  datesec, & ! [IN]
516  0 ) ! [IN]
517  else
518  time_startdate = (/ 0, 1, 1, 0, 0, 0 /)
519  time_startsubsec = 0.0_dp
520  endif
521  else
522  time_startsubsec = time_startms * 1.e-3_dp
523  endif
524 
525  time_offset_year = time_startdate(1)
526 
527  call calendar_date2daysec( time_startday, & ! [OUT]
528  time_startsec, & ! [OUT]
529  time_startdate(:), & ! [IN]
530  time_startsubsec, & ! [IN]
531  time_offset_year ) ! [IN]
532 
533  call calendar_date2char( startchardate, & ! [OUT]
534  time_startdate(:), & ! [IN]
535  time_startsubsec ) ! [IN]
536 
537  time_startdaysec = calendar_combine_daysec( time_startday, time_startsec )
538 
539  time_nowdate(:) = time_startdate(:)
540  time_nowsubsec = time_startsubsec
541  time_nowday = time_startday
542  time_nowsec = time_startsec
544 
545  time_endday = time_startday
546 
547  if ( setup_timeintegration ) then
548  call calendar_unit2sec( time_durationsec, time_duration, time_duration_unit )
549  time_endsec = time_startsec + time_durationsec
550  else
551  time_endsec = time_startsec
552  endif
553 
554  call calendar_adjust_daysec( time_endday, time_endsec ) ! [INOUT]
555 
556  call calendar_daysec2date( time_enddate(:), & ! [OUT]
557  time_endsubsec, & ! [OUT]
558  time_endday, & ! [IN]
559  time_endsec, & ! [IN]
560  time_offset_year ) ! [IN]
561 
562  call calendar_date2char( endchardate, & ! [OUT]
563  time_enddate(:), & ! [IN]
564  time_endsubsec ) ! [IN]
565 
566  log_newline
567  log_info("ADMIN_TIME_setup",*) 'Global date / time setting '
568  log_info_cont('(1x,A,A)') 'START Date : ', startchardate
569  log_info_cont('(1x,A,A)') 'END Date : ', endchardate
570 
571  if ( setup_timeintegration ) then
572 
573  call calendar_unit2sec( time_dtsec, time_dt, time_dt_unit )
574 
575  time_nstep = int( time_durationsec / time_dtsec )
576  time_nowstep = 1
577 
578  log_info_cont('(1x,A,F12.3)') 'delta t (sec.) :', time_dtsec
579  log_info_cont('(1x,A,I12)' ) 'No. of steps :', time_nstep
580 
581  !--- calculate intervals for atmosphere
582  if ( time_dt_atmos_dyn /= undef8 ) then
583  call calendar_unit2sec( time_dtsec_atmos_dyn, time_dt_atmos_dyn, time_dt_atmos_dyn_unit )
584  else
586  endif
587  call calendar_unit2sec( time_dtsec_atmos_phy_cp, time_dt_atmos_phy_cp, time_dt_atmos_phy_cp_unit )
588  call calendar_unit2sec( time_dtsec_atmos_phy_mp, time_dt_atmos_phy_mp, time_dt_atmos_phy_mp_unit )
589  call calendar_unit2sec( time_dtsec_atmos_phy_rd, time_dt_atmos_phy_rd, time_dt_atmos_phy_rd_unit )
590  call calendar_unit2sec( time_dtsec_atmos_phy_sf, time_dt_atmos_phy_sf, time_dt_atmos_phy_sf_unit )
591  call calendar_unit2sec( time_dtsec_atmos_phy_tb, time_dt_atmos_phy_tb, time_dt_atmos_phy_tb_unit )
592  call calendar_unit2sec( time_dtsec_atmos_phy_bl, time_dt_atmos_phy_bl, time_dt_atmos_phy_bl_unit )
593  call calendar_unit2sec( time_dtsec_atmos_phy_ch, time_dt_atmos_phy_ch, time_dt_atmos_phy_ch_unit )
594  call calendar_unit2sec( time_dtsec_atmos_phy_ae, time_dt_atmos_phy_ae, time_dt_atmos_phy_ae_unit )
595  call calendar_unit2sec( time_dtsec_atmos_phy_lt, time_dt_atmos_phy_lt, time_dt_atmos_phy_lt_unit )
596  call calendar_unit2sec( time_dtsec_atmos_restart, time_dt_atmos_restart, time_dt_atmos_restart_unit )
597  call calendar_unit2sec( time_dtsec_ocean, time_dt_ocean, time_dt_ocean_unit )
598  call calendar_unit2sec( time_dtsec_ocean_restart, time_dt_ocean_restart, time_dt_ocean_restart_unit )
599  call calendar_unit2sec( time_dtsec_land, time_dt_land, time_dt_land_unit )
600  call calendar_unit2sec( time_dtsec_land_restart, time_dt_land_restart, time_dt_land_restart_unit )
601  call calendar_unit2sec( time_dtsec_urban, time_dt_urban, time_dt_urban_unit )
602  call calendar_unit2sec( time_dtsec_urban_restart, time_dt_urban_restart, time_dt_urban_restart_unit )
603  call calendar_unit2sec( time_dtsec_resume, time_dt_resume, time_dt_resume_unit )
604 
606  nstep_dyn = time_nstep_atmos_dyn
607 
626 
645 
646  time_res_resume = time_dstep_resume - 1
647 
648  if ( abs( real(time_nstep_atmos_dyn,kind=dp)*time_dtsec_atmos_dyn &
649  - real(time_dstep_atmos_dyn,kind=dp)*time_dtsec ) > eps ) then
650  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_DYN) must be a multiple of delta t ', &
652  call prc_abort
653  endif
654  if ( abs(time_dtsec_atmos_phy_cp-real(time_dstep_atmos_phy_cp,kind=dp)*time_dtsec) > eps ) then
655  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_CP) must be a multiple of delta t ', &
657  call prc_abort
658  endif
659  if ( abs(time_dtsec_atmos_phy_mp-real(time_dstep_atmos_phy_mp,kind=dp)*time_dtsec) > eps ) then
660  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_MP) must be a multiple of delta t ', &
662  call prc_abort
663  endif
664  if ( abs(time_dtsec_atmos_phy_rd-real(time_dstep_atmos_phy_rd,kind=dp)*time_dtsec) > eps ) then
665  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_RD) must be a multiple of delta t ', &
667  call prc_abort
668  endif
669  if ( abs(time_dtsec_atmos_phy_sf-real(time_dstep_atmos_phy_sf,kind=dp)*time_dtsec) > eps ) then
670  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_SF) must be a multiple of delta t ', &
672  call prc_abort
673  endif
674  if ( abs(time_dtsec_atmos_phy_tb-real(time_dstep_atmos_phy_tb,kind=dp)*time_dtsec) > eps ) then
675  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_TB) must be a multiple of delta t ', &
677  call prc_abort
678  endif
679  if ( abs(time_dtsec_atmos_phy_bl-real(time_dstep_atmos_phy_bl,kind=dp)*time_dtsec) > eps ) then
680  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_BL) must be a multiple of delta t ', &
682  call prc_abort
683  endif
684  if ( abs(time_dtsec_atmos_phy_ch-real(time_dstep_atmos_phy_ch,kind=dp)*time_dtsec) > eps ) then
685  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_CH) must be a multiple of delta t ', &
687  call prc_abort
688  endif
689  if ( abs(time_dtsec_atmos_phy_ae-real(time_dstep_atmos_phy_ae,kind=dp)*time_dtsec) > eps ) then
690  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_AE) must be a multiple of delta t ', &
692  call prc_abort
693  endif
694  if ( abs(time_dtsec_atmos_phy_lt-real(time_dstep_atmos_phy_lt,kind=dp)*time_dtsec) > eps ) then
695  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_PHY_LT) must be a multiple of delta t ', &
697  call prc_abort
698  endif
699  if ( abs(time_dtsec_ocean-real(time_dstep_ocean,kind=dp)*time_dtsec) > eps ) then
700  log_error("ADMIN_TIME_setup",*) 'delta t(OCEAN) must be a multiple of delta t ', &
702  call prc_abort
703  endif
704  if ( abs(time_dtsec_land-real(time_dstep_land,kind=dp)*time_dtsec) > eps ) then
705  log_error("ADMIN_TIME_setup",*) 'delta t(LAND) must be a multiple of delta t ', &
707  call prc_abort
708  endif
709  if ( abs(time_dtsec_urban-real(time_dstep_urban,kind=dp)*time_dtsec) > eps ) then
710  log_error("ADMIN_TIME_setup",*) 'delta t(URBAN) must be a multiple of delta t ', &
712  call prc_abort
713  endif
714  if ( abs(time_dtsec_atmos_restart-real(time_dstep_atmos_restart,kind=dp)*time_dtsec) > eps ) then
715  log_error("ADMIN_TIME_setup",*) 'delta t(ATMOS_RESTART) must be a multiple of delta t ', &
717  call prc_abort
718  endif
719  if ( abs(time_dtsec_ocean_restart-real(time_dstep_ocean_restart,kind=dp)*time_dtsec) > eps ) then
720  log_error("ADMIN_TIME_setup",*) 'delta t(OCEAN_RESTART) must be a multiple of delta t ', &
722  call prc_abort
723  endif
724  if ( abs(time_dtsec_land_restart-real(time_dstep_land_restart,kind=dp)*time_dtsec) > eps ) then
725  log_error("ADMIN_TIME_setup",*) 'delta t(LAND_RESTART) must be a multiple of delta t ', &
727  call prc_abort
728  endif
729  if ( abs(time_dtsec_urban_restart-real(time_dstep_urban_restart,kind=dp)*time_dtsec) > eps ) then
730  log_error("ADMIN_TIME_setup",*) 'delta t(URBAN_RESTART) must be a multiple of delta t ', &
732  call prc_abort
733  endif
734  if ( abs(time_dtsec_urban_restart-real(time_dstep_urban_restart,kind=dp)*time_dtsec) > eps ) then
735  log_error("ADMIN_TIME_setup",*) 'delta t(URBAN_RESTART) must be a multiple of delta t ', &
737  call prc_abort
738  endif
739  if ( abs(time_dtsec_resume-real(time_dstep_resume,kind=dp)*time_dtsec) > eps ) then
740  log_error("ADMIN_TIME_setup",*) 'delta t(RESUME) must be a multiple of delta t ', &
742  call prc_abort
743  endif
744 
745  log_newline
746  log_info("ADMIN_TIME_setup",*) 'Time interval for each component (sec.)'
747  log_info_cont(*) 'Atmosphere'
748  log_info_cont('(1x,A,F10.3)') 'Dynamics (time) : ', time_dtsec_atmos_dyn
749  log_info_cont('(1x,A,I10,A,I8,A)') '(step) : ', time_nstep_atmos_dyn, &
750  ' (step interval=', time_dstep_atmos_dyn, ')'
751  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Cumulus : ', time_dtsec_atmos_phy_cp, &
752  ' (step interval=', time_dstep_atmos_phy_cp, ')'
753  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Cloud Microphysics : ', time_dtsec_atmos_phy_mp, &
754  ' (step interval=', time_dstep_atmos_phy_mp, ')'
755  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Radiation : ', time_dtsec_atmos_phy_rd, &
756  ' (step interval=', time_dstep_atmos_phy_rd, ')'
757  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Surface Flux : ', time_dtsec_atmos_phy_sf, &
758  ' (step interval=', time_dstep_atmos_phy_sf, ')'
759  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Turbulence : ', time_dtsec_atmos_phy_tb, &
760  ' (step interval=', time_dstep_atmos_phy_tb, ')'
761  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Boundary layer : ', time_dtsec_atmos_phy_bl, &
762  ' (step interval=', time_dstep_atmos_phy_bl, ')'
763  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Chemistry : ', time_dtsec_atmos_phy_ch, &
764  ' (step interval=', time_dstep_atmos_phy_ch, ')'
765  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Aerosol : ', time_dtsec_atmos_phy_ae, &
766  ' (step interval=', time_dstep_atmos_phy_ae, ')'
767  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Physics, Lightning : ', time_dtsec_atmos_phy_lt, &
768  ' (step interval=', time_dstep_atmos_phy_lt, ')'
769  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Ocean : ', time_dtsec_ocean, &
770  ' (step interval=', time_dstep_ocean, ')'
771  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Land : ', time_dtsec_land, &
772  ' (step interval=', time_dstep_land, ')'
773  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Urban : ', time_dtsec_urban, &
774  ' (step interval=', time_dstep_urban, ')'
775  log_newline
776  log_info_cont(*) 'Time interval for restart (sec.)'
777  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Atmospheric Variables : ', time_dtsec_atmos_restart, &
778  ' (step interval=', time_dstep_atmos_restart, ')'
779  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Ocean Variables : ', time_dtsec_ocean_restart, &
780  ' (step interval=', time_dstep_ocean_restart, ')'
781  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Land Variables : ', time_dtsec_land_restart, &
782  ' (step interval=', time_dstep_land_restart, ')'
783  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Urban Variables : ', time_dtsec_urban_restart, &
784  ' (step interval=', time_dstep_urban_restart, ')'
785  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Resume : ', time_dtsec_resume, &
786  ' (step interval=', time_dstep_resume, ')'
787  else
788  time_dtsec = 1.0_rp
789  endif
790 
791  time_wallclock_start = prc_mpitime()
792 
793  ! WALLCLOCK TERMINATOR SETUP
794  if ( time_wallclock_limit > 0.0_dp ) then
795  log_newline
796  log_info("ADMIN_TIME_setup",*) 'Wall clock time limit of execution is specified.'
797 
798  if ( time_dt_wallclock_check == undef8 ) then
799  log_info_cont(*) 'Not found TIME_DT_WALLCLOCK_CHECK. largest time step interval is used.'
811  time_dtsec_land, &
813  else
814  if ( time_dt_wallclock_check_unit == '' ) then
815  log_info_cont(*) 'Not found TIME_DT_WALLCLOCK_CHECK_UNIT. TIME_DURATION_UNIT is used.'
816  time_dt_wallclock_check_unit = time_duration_unit
817  endif
818  call calendar_unit2sec( time_dtsec_wallclock_check, time_dt_wallclock_check, time_dt_wallclock_check_unit )
820  endif
821 
823 
824  time_wallclock_safe = max( min( time_wallclock_safe, 1.0_dp ), 0.0_dp )
825  time_wallclock_safelim = time_wallclock_limit * time_wallclock_safe
826 
827  log_info_cont('(1x,A,F10.1,A)') 'This job stops after ', time_wallclock_safelim, ' seconds.'
828  log_info_cont('(1x,A,F10.3,A,I8,A)') 'Time interval for check : ', time_dtsec_wallclock_check, &
829  ' (step interval=', time_dstep_wallclock_check, ')'
830  endif
831 
832  if ( debug ) then
833  log_info("ADMIN_TIME_setup",*) time_nowday, time_nowsec, time_nowdate(:), time_nowsubsec
834  endif
835 
836  return
837  end subroutine admin_time_setup
838 
839  !-----------------------------------------------------------------------------
841  subroutine admin_time_checkstate
842  use scale_prc, only: &
845  use scale_calendar, only: &
847  use scale_time, only: &
848  time_nowdate, &
849  time_nowsubsec, &
850  time_nowstep, &
851  time_nstep, &
863  time_dstep_land, &
865  implicit none
866 
867  real(dp) :: wallclock_elapse
868  character(len=27) :: nowchardate
869  logical :: to_stdout
870  !---------------------------------------------------------------------------
871 
872  time_doatmos_step = .false.
873  time_doatmos_dyn = .false.
874  time_doatmos_phy_cp = .false.
875  time_doatmos_phy_mp = .false.
876  time_doatmos_phy_rd = .false.
877  time_doatmos_phy_sf = .false.
878  time_doatmos_phy_tb = .false.
879  time_doatmos_phy_bl = .false.
880  time_doatmos_phy_ch = .false.
881  time_doatmos_phy_ae = .false.
882  time_doatmos_phy_lt = .false.
883  time_doocean_step = .false.
884  time_doland_step = .false.
885  time_dourban_step = .false.
886  time_doresume = .false.
887 
888  time_res_atmos_dyn = time_res_atmos_dyn + 1
889  time_res_atmos_phy_cp = time_res_atmos_phy_cp + 1
890  time_res_atmos_phy_mp = time_res_atmos_phy_mp + 1
891  time_res_atmos_phy_rd = time_res_atmos_phy_rd + 1
892  time_res_atmos_phy_sf = time_res_atmos_phy_sf + 1
893  time_res_atmos_phy_tb = time_res_atmos_phy_tb + 1
894  time_res_atmos_phy_bl = time_res_atmos_phy_bl + 1
895  time_res_atmos_phy_ch = time_res_atmos_phy_ch + 1
896  time_res_atmos_phy_ae = time_res_atmos_phy_ae + 1
897  time_res_atmos_phy_lt = time_res_atmos_phy_lt + 1
898  time_res_ocean = time_res_ocean + 1
899  time_res_land = time_res_land + 1
900  time_res_urban = time_res_urban + 1
901  time_res_resume = time_res_resume + 1
902 
903  if ( time_res_atmos_dyn == time_dstep_atmos_dyn ) then
904  time_doatmos_step = .true.
905  time_doatmos_dyn = .true.
906  time_res_atmos_dyn = 0
907  endif
908  if ( time_res_atmos_phy_cp == time_dstep_atmos_phy_cp ) then
909  time_doatmos_step = .true.
910  time_doatmos_phy_cp = .true.
911  time_res_atmos_phy_cp = 0
912  endif
913  if ( time_res_atmos_phy_mp == time_dstep_atmos_phy_mp ) then
914  time_doatmos_step = .true.
915  time_doatmos_phy_mp = .true.
916  time_res_atmos_phy_mp = 0
917  endif
918  if ( time_res_atmos_phy_rd == time_dstep_atmos_phy_rd ) then
919  time_doatmos_step = .true.
920  time_doatmos_phy_rd = .true.
921  time_res_atmos_phy_rd = 0
922  endif
923  if ( time_res_atmos_phy_sf == time_dstep_atmos_phy_sf ) then
924  time_doatmos_step = .true.
925  time_doatmos_phy_sf = .true.
926  time_res_atmos_phy_sf = 0
927  endif
928  if ( time_res_atmos_phy_tb == time_dstep_atmos_phy_tb ) then
929  time_doatmos_step = .true.
930  time_doatmos_phy_tb = .true.
931  time_res_atmos_phy_tb = 0
932  endif
933  if ( time_res_atmos_phy_bl == time_dstep_atmos_phy_bl ) then
934  time_doatmos_step = .true.
935  time_doatmos_phy_bl = .true.
936  time_res_atmos_phy_bl = 0
937  endif
938  if ( time_res_atmos_phy_ch == time_dstep_atmos_phy_ch ) then
939  time_doatmos_step = .true.
940  time_doatmos_phy_ch = .true.
941  time_res_atmos_phy_ch = 0
942  endif
943  if ( time_res_atmos_phy_ae == time_dstep_atmos_phy_ae ) then
944  time_doatmos_step = .true.
945  time_doatmos_phy_ae = .true.
946  time_res_atmos_phy_ae = 0
947  endif
948  if ( time_res_atmos_phy_lt == time_dstep_atmos_phy_lt ) then
949  time_doatmos_step = .true.
950  time_doatmos_phy_lt = .true.
951  time_res_atmos_phy_lt = 0
952  endif
953 
954  if ( time_res_ocean == time_dstep_ocean ) then
955  time_doocean_step = .true.
956  time_res_ocean = 0
957  endif
958  if ( time_res_land == time_dstep_land ) then
959  time_doland_step = .true.
960  time_res_land = 0
961  endif
962  if ( time_res_urban == time_dstep_urban ) then
963  time_dourban_step = .true.
964  time_res_urban = 0
965  endif
966  if ( time_res_resume == time_dstep_resume ) then
967  time_doresume = .true.
968  time_res_resume = 0
969  endif
970 
971  to_stdout = .false.
972  if ( io_step_to_stdout > 0 ) then
973  if( mod(time_nowstep-1,io_step_to_stdout) == 0 ) to_stdout = .true.
974  endif
975 
976  call calendar_date2char( nowchardate, & ! [OUT]
977  time_nowdate(:), & ! [IN]
978  time_nowsubsec ) ! [IN]
979 
980  wallclock_elapse = prc_mpitime() - time_wallclock_start
981 
982  log_newline
983  if ( time_wallclock_limit > 0.0_dp ) then
984  log_progress('(1x,2A,2(A,I7),2(A,F10.1))') 'TIME: ', nowchardate,' STEP:',time_nowstep, '/', time_nstep, &
985  ' WCLOCK:', wallclock_elapse, '/', time_wallclock_safelim
986  if ( prc_universal_ismaster .AND. to_stdout ) then ! universal master node
987  write(*,'(1x,2A,2(A,I7),2(A,F10.1))') 'TIME: ', nowchardate,' STEP:',time_nowstep, '/', time_nstep, &
988  ' WCLOCK:', wallclock_elapse, '/', time_wallclock_safelim
989  endif
990  else
991  log_progress('(1x,2A,2(A,I7),A,F10.1)') 'TIME: ', nowchardate,' STEP:',time_nowstep, '/', time_nstep, &
992  ' WCLOCK:', wallclock_elapse
993  if ( prc_universal_ismaster .AND. to_stdout ) then ! universal master node
994  write(*,'(1x,2A,2(A,I7),A,F10.1)') 'TIME: ', nowchardate,' STEP:',time_nowstep, '/', time_nstep, &
995  ' WCLOCK:', wallclock_elapse
996  endif
997  endif
998 
999  return
1000  end subroutine admin_time_checkstate
1001 
1002  !-----------------------------------------------------------------------------
1004  subroutine admin_time_advance
1005  use scale_prc, only: &
1006  prc_ismaster, &
1007  prc_mpitime
1008  use scale_calendar, only: &
1012  use scale_comm_cartesc, only: &
1013  comm_bcast
1014  use scale_time, only: &
1015  time_dtsec, &
1016  time_nowdate, &
1017  time_nowsubsec, &
1018  time_nowday, &
1019  time_nowsec, &
1020  time_nowdaysec, &
1021  time_nowstep, &
1022  time_nstep, &
1023  time_offset_year, &
1025  implicit none
1026 
1027  real(dp) :: wallclock_elapse
1028  logical :: wallclock_doend
1029  !---------------------------------------------------------------------------
1030 
1031  time_doend = .false.
1032 
1034  time_nowday = time_startday
1035  time_nowsec = time_startsec + real(time_nowstep-1,kind=dp) * time_dtsec
1036 
1037  ! reallocate day & sub-day
1039 
1040  call calendar_daysec2date( time_nowdate(:), & ! [OUT]
1041  time_nowsubsec, & ! [OUT]
1042  time_nowday, & ! [IN]
1043  time_nowsec, & ! [IN]
1044  time_offset_year ) ! [IN]
1045 
1047 
1048  if ( debug ) then
1049  log_info("ADMIN_TIME_advance",*) time_nowday, time_nowsec, time_nowdate(:), time_nowsubsec
1050  endif
1051 
1052  if ( time_nowstep > time_nstep ) then
1053  time_doend = .true.
1054  endif
1055 
1056  if ( time_wallclock_limit > 0.0_dp ) then ! use wallclock limiter
1057  wallclock_doend = .false.
1058 
1059  if ( prc_ismaster & ! master node
1060  .AND. mod(time_nowstep-1,time_dstep_wallclock_check) == 0 ) then ! step to check
1061 
1062  wallclock_elapse = prc_mpitime() - time_wallclock_start
1063 
1064  if( wallclock_elapse > time_wallclock_safelim ) wallclock_doend = .true.
1065 
1066  endif
1067 
1068  call comm_bcast( wallclock_doend ) ! [INOUT]
1069 
1070  if ( wallclock_doend ) then
1071  log_newline
1072  log_info("ADMIN_TIME_advance",*) '**************************************************************'
1073  log_info("ADMIN_TIME_advance",*) 'Elapse time limit is detected. Termination operation starts. '
1074  log_info("ADMIN_TIME_advance",*) '**************************************************************'
1075  log_newline
1076  time_doend = .true.
1077  endif
1078  endif
1079 
1080  time_doatmos_restart = .false.
1081  time_doocean_restart = .false.
1082  time_doland_restart = .false.
1083  time_dourban_restart = .false.
1084 
1085  time_res_atmos_restart = time_res_atmos_restart + 1
1086  time_res_ocean_restart = time_res_ocean_restart + 1
1087  time_res_land_restart = time_res_land_restart + 1
1088  time_res_urban_restart = time_res_urban_restart + 1
1089 
1090  if ( time_res_atmos_restart == time_dstep_atmos_restart ) then
1091  time_doatmos_restart = .true.
1092  time_res_atmos_restart = 0
1093  elseif( time_doend ) then
1094  time_doatmos_restart = .true.
1095  endif
1096 
1097  if ( time_res_ocean_restart == time_dstep_ocean_restart ) then
1098  time_doocean_restart = .true.
1099  time_res_ocean_restart = 0
1100  elseif( time_doend ) then
1101  time_doocean_restart = .true.
1102  endif
1103 
1104  if ( time_res_land_restart == time_dstep_land_restart ) then
1105  time_doland_restart = .true.
1106  time_res_land_restart = 0
1107  elseif( time_doend ) then
1108  time_doland_restart = .true.
1109  endif
1110 
1111  if ( time_res_urban_restart == time_dstep_urban_restart ) then
1112  time_dourban_restart = .true.
1113  time_res_urban_restart = 0
1114  elseif( time_doend ) then
1115  time_dourban_restart = .true.
1116  endif
1117 
1118  return
1119  end subroutine admin_time_advance
1120 
1121 end module mod_admin_time
mod_admin_time::time_doatmos_phy_mp
logical, public time_doatmos_phy_mp
execute physics in this step? (microphysics)
Definition: mod_admin_time.F90:49
scale_prc::prc_universal_ismaster
logical, public prc_universal_ismaster
master process in universal communicator?
Definition: scale_prc.F90:74
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
mod_admin_time::time_dstep_land_restart
integer, public time_dstep_land_restart
interval of land restart [step]
Definition: mod_admin_time.F90:42
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
mod_admin_time::time_dstep_ocean_restart
integer, public time_dstep_ocean_restart
interval of ocean restart [step]
Definition: mod_admin_time.F90:41
mod_admin_time::time_doatmos_phy_ch
logical, public time_doatmos_phy_ch
execute physics in this step? (chemistry )
Definition: mod_admin_time.F90:54
mod_admin_time::time_dstep_resume
integer, public time_dstep_resume
interval for resume [step]
Definition: mod_admin_time.F90:44
scale_calendar::calendar_daysec2date
subroutine, public calendar_daysec2date(ymdhms, subsec, absday, abssec, offset_year)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:191
scale_time::time_dstep_atmos_phy_cp
integer, public time_dstep_atmos_phy_cp
step interval of physics(cumulus )
Definition: scale_time.F90:52
mod_admin_time::time_dourban_restart
logical, public time_dourban_restart
execute urban restart output in this step?
Definition: mod_admin_time.F90:63
scale_calendar::calendar_combine_daysec
real(dp) function, public calendar_combine_daysec(absday, abssec)
Combine day and second.
Definition: scale_calendar.F90:405
scale_const::const_undef8
real(dp), parameter, public const_undef8
undefined value (REAL8)
Definition: scale_const.F90:40
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
mod_admin_time::time_doland_step
logical, public time_doland_step
execute land component in this step?
Definition: mod_admin_time.F90:60
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
mod_admin_time::time_dstep_urban_restart
integer, public time_dstep_urban_restart
interval of urban restart [step]
Definition: mod_admin_time.F90:43
mod_admin_time::time_doatmos_dyn
logical, public time_doatmos_dyn
execute dynamics in this step?
Definition: mod_admin_time.F90:47
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
mod_admin_time::time_doatmos_phy_tb
logical, public time_doatmos_phy_tb
execute physics in this step? (turbulence )
Definition: mod_admin_time.F90:52
scale_prc::prc_myrank
integer, public prc_myrank
process num in local communicator
Definition: scale_prc.F90:90
scale_io::io_step_to_stdout
integer, public io_step_to_stdout
interval for output current step to STDOUT (negative is off)
Definition: scale_io.F90:67
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_calendar
module CALENDAR
Definition: scale_calendar.F90:13
mod_admin_time::admin_time_setup
subroutine, public admin_time_setup(setup_TimeIntegration)
Setup.
Definition: mod_admin_time.F90:120
mod_admin_time::time_doatmos_phy_cp
logical, public time_doatmos_phy_cp
execute physics in this step? (cumulus )
Definition: mod_admin_time.F90:48
mod_admin_time::time_doatmos_phy_ae
logical, public time_doatmos_phy_ae
execute physics in this step? (aerosol )
Definition: mod_admin_time.F90:55
scale_file
module file
Definition: scale_file.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
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
mod_admin_time::time_doatmos_phy_sf
logical, public time_doatmos_phy_sf
execute physics in this step? (surface flux)
Definition: mod_admin_time.F90:51
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_const
module CONSTANT
Definition: scale_const.F90:11
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
mod_admin_time::time_doend
logical, public time_doend
finish program in this step?
Definition: mod_admin_time.F90:65
scale_time::time_dtsec_wallclock_check
real(dp), public time_dtsec_wallclock_check
time interval of wallclock terminator [sec]
Definition: scale_time.F90:49
mod_admin_time::time_doatmos_phy_rd
logical, public time_doatmos_phy_rd
execute physics in this step? (radiation )
Definition: mod_admin_time.F90:50
mod_admin_time::time_doocean_restart
logical, public time_doocean_restart
execute ocean restart output in this step?
Definition: mod_admin_time.F90:59
scale_calendar::calendar_date2daysec
subroutine, public calendar_date2daysec(absday, abssec, ymdhms, subsec, offset_year)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:159
mod_admin_time::time_doatmos_step
logical, public time_doatmos_step
execute atmosphere component in this step?
Definition: mod_admin_time.F90:46
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_calendar::calendar_adjust_daysec
subroutine, public calendar_adjust_daysec(absday, abssec)
Adjust day and second.
Definition: scale_calendar.F90:380
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_calendar::calendar_cfunits2sec
real(dp) function, public calendar_cfunits2sec(cftime, cfunits, offset_year, startdaysec)
Convert time in units of the CF convention to second.
Definition: scale_calendar.F90:488
mod_admin_time::admin_time_advance
subroutine, public admin_time_advance
Advance the time & evaluate restart & stop.
Definition: mod_admin_time.F90:1005
mod_admin_time::time_doresume
logical, public time_doresume
resume in this step?
Definition: mod_admin_time.F90:64
mod_admin_time::time_doatmos_restart
logical, public time_doatmos_restart
execute atmosphere restart output in this step?
Definition: mod_admin_time.F90:57
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
mod_admin_time::admin_time_checkstate
subroutine, public admin_time_checkstate
Evaluate component execution.
Definition: mod_admin_time.F90:842
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
mod_admin_time::time_dtsec_atmos_restart
real(dp), public time_dtsec_atmos_restart
time interval of atmosphere restart [sec]
Definition: mod_admin_time.F90:34
mod_admin_time
module ADMIN TIME
Definition: mod_admin_time.F90:11
mod_admin_time::time_dtsec_resume
real(dp), public time_dtsec_resume
time interval for resume [sec]
Definition: mod_admin_time.F90:38
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_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
scale_time::time_dstep_atmos_dyn
integer, public time_dstep_atmos_dyn
step interval of dynamics
Definition: scale_time.F90:51
mod_atmos_vars
module ATMOSPHERIC Variables
Definition: mod_atmos_vars.F90:12
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
mod_admin_time::time_dtsec_ocean_restart
real(dp), public time_dtsec_ocean_restart
time interval of ocean restart [sec]
Definition: mod_admin_time.F90:35
mod_admin_time::time_dtsec_land_restart
real(dp), public time_dtsec_land_restart
time interval of land restart [sec]
Definition: mod_admin_time.F90:36
mod_admin_time::time_doatmos_phy_bl
logical, public time_doatmos_phy_bl
execute physics in this step? (boudary layer )
Definition: mod_admin_time.F90:53
mod_admin_time::time_doland_restart
logical, public time_doland_restart
execute land restart output in this step?
Definition: mod_admin_time.F90:61
mod_admin_time::time_doatmos_phy_lt
logical, public time_doatmos_phy_lt
execute physics in this step? (lightning )
Definition: mod_admin_time.F90:56
scale_time::time_nstep_atmos_dyn
integer, public time_nstep_atmos_dyn
small step of dynamics
Definition: scale_time.F90:36
mod_admin_time::time_dtsec_urban_restart
real(dp), public time_dtsec_urban_restart
time interval of urban restart [sec]
Definition: mod_admin_time.F90:37
mod_admin_time::time_dourban_step
logical, public time_dourban_step
execute urban component in this step?
Definition: mod_admin_time.F90:62
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_prc::prc_mpitime
real(dp) function, public prc_mpitime()
Get MPI time.
Definition: scale_prc.F90:846
mod_admin_time::time_dstep_atmos_restart
integer, public time_dstep_atmos_restart
interval of atmosphere restart [step]
Definition: mod_admin_time.F90:40
scale_time::time_dstep_atmos_phy_ch
integer, public time_dstep_atmos_phy_ch
step interval of physics(chemistry )
Definition: scale_time.F90:58
mod_admin_time::time_doocean_step
logical, public time_doocean_step
execute ocean component in this step?
Definition: mod_admin_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_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_time::time_startdaysec
real(dp), public time_startdaysec
second of start time [sec]
Definition: scale_time.F90:75
mod_atmos_vars::atmos_restart_in_basename
character(len=h_long), public atmos_restart_in_basename
Basename of the input file.
Definition: mod_atmos_vars.F90:61
scale_time::time_offset_year
integer, public time_offset_year
time offset [year]
Definition: scale_time.F90:74
scale_prc::prc_ismaster
logical, public prc_ismaster
master process in local communicator?
Definition: scale_prc.F90:91
scale_time::time_nowday
integer, public time_nowday
absolute day of current time [day]
Definition: scale_time.F90:67
scale_calendar::calendar_date2char
subroutine, public calendar_date2char(chardate, ymdhms, subsec)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:603
scale_calendar::calendar_unit2sec
subroutine, public calendar_unit2sec(second, value, unit)
Convert several units to second.
Definition: scale_calendar.F90:424
scale_time::time_dstep_urban
integer, public time_dstep_urban
step interval of urban step
Definition: scale_time.F90:63