Skip to content
Snippets Groups Projects
Commit 10fcb65e authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 08/10/2024: mode_datetime: add elemental or impure elemental attributes

parent d26c938e
No related branches found
No related tags found
No related merge requests found
!MNH_LIC Copyright 2018-2023 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC Copyright 2018-2024 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1. !MNH_LIC for details. version 1.
...@@ -59,7 +59,7 @@ END INTERFACE ...@@ -59,7 +59,7 @@ END INTERFACE
! !
CONTAINS CONTAINS
! !
SUBROUTINE DATETIME_TIME2REFERENCE( TPDATE, KDAYS, PSEC ) IMPURE ELEMENTAL SUBROUTINE DATETIME_TIME2REFERENCE( TPDATE, KDAYS, PSEC )
! !
!Compute number of days and seconds since reference date (and time) !Compute number of days and seconds since reference date (and time)
!Days and seconds are separated to allow correct computation of differences even !Days and seconds are separated to allow correct computation of differences even
...@@ -138,7 +138,7 @@ PSEC = ZSEC ...@@ -138,7 +138,7 @@ PSEC = ZSEC
END SUBROUTINE DATETIME_TIME2REFERENCE END SUBROUTINE DATETIME_TIME2REFERENCE
! !
! !
SUBROUTINE DATETIME_DISTANCE(TPDATEBEG,TPDATEEND,PDIST) IMPURE ELEMENTAL SUBROUTINE DATETIME_DISTANCE(TPDATEBEG,TPDATEEND,PDIST)
! !
!Compute distance (in seconds) between 2 dates !Compute distance (in seconds) between 2 dates
! !
...@@ -281,7 +281,7 @@ END SELECT ...@@ -281,7 +281,7 @@ END SELECT
END SUBROUTINE DATETIME_GETMONTHLGT END SUBROUTINE DATETIME_GETMONTHLGT
FUNCTION DATETIME_LT(TPT1, TPT2) RESULT (OLT) IMPURE ELEMENTAL FUNCTION DATETIME_LT(TPT1, TPT2) RESULT (OLT)
! !
! TRUE if TPT1 .LT. TPT2 ! TRUE if TPT1 .LT. TPT2
! !
...@@ -325,7 +325,7 @@ END IF ...@@ -325,7 +325,7 @@ END IF
END FUNCTION DATETIME_LT END FUNCTION DATETIME_LT
FUNCTION DATETIME_LE(TPT1, TPT2) RESULT (OLE) IMPURE ELEMENTAL FUNCTION DATETIME_LE(TPT1, TPT2) RESULT (OLE)
! !
! TRUE if TPT1 <= TPT2 ! TRUE if TPT1 <= TPT2
! !
...@@ -369,7 +369,7 @@ END IF ...@@ -369,7 +369,7 @@ END IF
END FUNCTION DATETIME_LE END FUNCTION DATETIME_LE
FUNCTION DATETIME_GE(TPT1, TPT2) RESULT (OGE) IMPURE ELEMENTAL FUNCTION DATETIME_GE(TPT1, TPT2) RESULT (OGE)
! !
! TRUE if TPT1 >=. TPT2 ! TRUE if TPT1 >=. TPT2
! !
...@@ -384,7 +384,7 @@ OGE = .NOT. DATETIME_LT( TPT1, TPT2 ) ...@@ -384,7 +384,7 @@ OGE = .NOT. DATETIME_LT( TPT1, TPT2 )
END FUNCTION DATETIME_GE END FUNCTION DATETIME_GE
FUNCTION DATETIME_GT(TPT1, TPT2) RESULT (OGT) IMPURE ELEMENTAL FUNCTION DATETIME_GT(TPT1, TPT2) RESULT (OGT)
! !
! TRUE if TPT1 > TPT2 ! TRUE if TPT1 > TPT2
! !
...@@ -399,7 +399,7 @@ OGT = .NOT. DATETIME_LE( TPT1, TPT2 ) ...@@ -399,7 +399,7 @@ OGT = .NOT. DATETIME_LE( TPT1, TPT2 )
END FUNCTION DATETIME_GT END FUNCTION DATETIME_GT
FUNCTION DATETIME_TIME_ADD( TPIN, PTIME ) RESULT ( TPOUT ) ELEMENTAL FUNCTION DATETIME_TIME_ADD( TPIN, PTIME ) RESULT ( TPOUT )
IMPLICIT NONE IMPLICIT NONE
...@@ -415,7 +415,7 @@ CALL DATETIME_CORRECTDATE( TPOUT ) ...@@ -415,7 +415,7 @@ CALL DATETIME_CORRECTDATE( TPOUT )
END FUNCTION DATETIME_TIME_ADD END FUNCTION DATETIME_TIME_ADD
FUNCTION DATETIME_TIME_SUBSTRACT( TPT1, TPT2 ) RESULT( PDIST ) IMPURE ELEMENTAL FUNCTION DATETIME_TIME_SUBSTRACT( TPT1, TPT2 ) RESULT( PDIST )
! !
!Compute distance (in seconds) between 2 dates !Compute distance (in seconds) between 2 dates
! !
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment