SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
temporal_lts.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 FUNCTION temporal_lts(TPT1, TPT2) RESULT (OLT)
8 !
9 !
10 USE yomhook ,ONLY : lhook, dr_hook
11 USE parkind1 ,ONLY : jprb
12 !
13 IMPLICIT NONE
14 LOGICAL :: olt
15 TYPE(date_time), INTENT(IN) :: tpt1, tpt2
16 REAL(KIND=JPRB) :: zhook_handle
17 !
18 ! TRUE if TPT1 .LT. TPT2
19 !
20 !
21 IF (lhook) CALL dr_hook('TEMPORAL_LTS',0,zhook_handle)
22 IF ( tpt1%TDATE%YEAR .EQ. tpt2%TDATE%YEAR ) THEN
23  IF ( tpt1%TDATE%MONTH .EQ. tpt2%TDATE%MONTH ) THEN
24  IF ( tpt1%TDATE%DAY .EQ. tpt2%TDATE%DAY ) THEN
25  olt = tpt1%TIME .LT. tpt2%TIME
26  ELSE
27  olt = tpt1%TDATE%DAY .LT. tpt2%TDATE%DAY
28  END IF
29  ELSE
30  olt = tpt1%TDATE%MONTH .LT. tpt2%TDATE%MONTH
31  END IF
32 ELSE
33  olt = tpt1%TDATE%YEAR .LT. tpt2%TDATE%YEAR
34 ENDIF
35 IF (lhook) CALL dr_hook('TEMPORAL_LTS',1,zhook_handle)
36 !
37 END FUNCTION temporal_lts
logical function temporal_lts(TPT1, TPT2)
Definition: temporal_lts.F90:6