next up previous contents
Next: About this document ... Up: 2 Modules used in Previous: 23 Restart Writing   Contents

Subsections

24 Date Logging

24.1 Module tStamp_mod - log model date and wall clock time. (Source File: tStamp_mod.F90)

Routines for logging model date, wall clock time, integration time.


REVISION HISTORY:

       2003-Aug-28 - B. Kauffman, 1st version.
INTERFACE:
 
 module tStamp_mod
USES:
 
    use shr_sys_mod         ! share system routines
    use cpl_kind_mod        ! kinds
 
    implicit none
 
    private ! except
PUBLIC TYPES:
 
   public :: tStamp_tic
 
   type tStamp_tic
      integer(IN) :: count ! value of hardware tic counter
      integer(IN) :: accum ! tic counts accumulated since initialization
      integer(IN) :: n     ! number of samples in accumulated count
   end type tStamp_tic
PUBLIC MEMBER FUNCTIONS:
 
    public :: tStamp_write  ! write the time stamp
PUBLIC DATA MEMBERS:
 
   ! no public data

24.1.1 tStamp_write - logs model date and wall clock time to stdout.

Logs model date and wall clock time to stdout using input argument year, month, day and sec and also output the average and instantaneous time difference between calls to this routine. Include str in output.

Generally it is expected that this routine is called periodically, eg. once per day, in which the average and instantaneous time difference info becomes quite useful.

If optional argument tic_ext is present, use it to determine when last call was made. If using tic_ext, an initial count value of less than zero implies this is the first call, thus accum and n are set zero.


REVISION HISTORY:

       2002-aug-21 - B. Kauffman, 1st version.
INTERFACE:
 
 subroutine tStamp_write(str,year,month,day,sec,tic_ext)
USES:
 
    implicit none
INPUT/OUTPUT PARAMETERS:
 
    character(*)    ,intent(in)             :: str     ! info text string
    integer(IN)     ,intent(in)             :: year    ! model year  (4-digits)
    integer(IN)     ,intent(in)             :: month   ! model month (2-digits)
    integer(IN)     ,intent(in)             :: day     ! model day   (2-digits)
    integer(IN)     ,intent(in)             :: sec     ! model secs  (5-digits)
    type(tStamp_tic),intent(inout),optional :: tic_ext ! external tic count data



next up previous contents
Next: About this document ... Up: 2 Modules used in Previous: 23 Restart Writing   Contents
cesm.ucar.edu