source: LMDZ6/branches/Ocean_skin/libf/phylmd/rrtm/user_clock.F90 @ 3627

Last change on this file since 3627 was 1990, checked in by Laurent Fairhead, 10 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 2.1 KB
Line 
1SUBROUTINE USER_CLOCK(PELAPSED_TIME,PELAPSED_TIME_SINCE,PVECTOR_CP,PTOTAL_CP)
2
3!**** *USER_CLOCK* - interface to system dependent timer routines
4
5!     Purpose.
6!     --------
7!        Returns elapsed and CP from the start of execution.
8!        Elapsed time is made relative to the first call to USER_CLOCK.
9
10!**   Interface.
11!     ----------
12!        ZTIME=USER_CLOCK(PELAPSED_TIME,PELAPSED_TIME_SINCE,
13!                         PVECTOR_CP,PTOTAL_CP)
14
15!        Explicit arguments: (All are optional arguments)
16!                           PELAPSED_TIME=wall clock time (seconds)
17!                           PELAPSED_TIME_SINCE=wall clock time (seconds)
18!                             change from input value of this parameter
19!                           PVECTOR_CP=CP vector time  (seconds)
20!                           PTOTAL_CP=total CP time   (seconds)
21
22!     Author.
23!     -------
24!        D.Dent      *ECMWF*
25
26!     External References:
27!     -------------------
28
29!        TIMEF,CPTIME
30
31!     Modifications.
32!     --------------
33!        Original  : 97-09-25
34!     ----------------------------------------------------------
35
36
37USE PARKIND1  ,ONLY : JPIM     ,JPRB
38
39IMPLICIT NONE
40
41REAL(KIND=JPRB),INTENT(OUT) :: PELAPSED_TIME,PVECTOR_CP,PTOTAL_CP
42REAL(KIND=JPRB),INTENT(INOUT) :: PELAPSED_TIME_SINCE
43OPTIONAL            PELAPSED_TIME,PELAPSED_TIME_SINCE
44OPTIONAL            PVECTOR_CP,PTOTAL_CP
45REAL(KIND=JPRB)      :: ZVECTOR_CP,ZTOTAL_CP,ZWALL
46REAL(KIND=JPRB),EXTERNAL :: TIMEF
47
48
49! === END OF INTERFACE BLOCK ===
50IF(PRESENT(PELAPSED_TIME).OR. PRESENT(PELAPSED_TIME_SINCE)) THEN
51
52  ZWALL=TIMEF()
53!             TIMEF returns milliseconds since first call to TIMEF
54  IF(PRESENT(PELAPSED_TIME)) THEN
55    PELAPSED_TIME=ZWALL*1.0E-3_JPRB
56  ENDIF
57  IF(PRESENT(PELAPSED_TIME_SINCE)) THEN
58    PELAPSED_TIME_SINCE=ZWALL*1.0E-3_JPRB - PELAPSED_TIME_SINCE
59  ENDIF
60ENDIF
61
62IF( PRESENT(PVECTOR_CP) .OR. PRESENT(PTOTAL_CP) ) THEN
63  CALL CPTIME(ZVECTOR_CP,ZTOTAL_CP)
64ENDIF
65IF( PRESENT(PVECTOR_CP) ) THEN
66  PVECTOR_CP=ZVECTOR_CP
67ENDIF
68IF( PRESENT(PTOTAL_CP) ) THEN
69  PTOTAL_CP=ZTOTAL_CP
70ENDIF
71
72RETURN
73END SUBROUTINE USER_CLOCK
74
75
76
Note: See TracBrowser for help on using the repository browser.