source: branches/UKMO/r6232_tracer_advection/NEMOGCM/NEMO/OPA_SRC/OBS/ddatetoymdhms.h90 @ 9295

Last change on this file since 9295 was 9295, checked in by jcastill, 3 years ago

Remove svn keywords

File size: 1.4 KB
Line 
1   !!----------------------------------------------------------------------
2   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
3   !! $Id$
4   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
5   !!----------------------------------------------------------------------
6
7   SUBROUTINE ddatetoymdhms( ddate, kyea, kmon, kday, khou, kmin, ksec )
8      !!----------------------------------------------------------------------
9      !!
10      !!                    *** ROUTINE ddatetoymdhms ***
11      !!
12      !! ** Purpose : Convert YYYYMMDD.hhmmss to components
13      !!
14      !! ** Method  :
15      !!
16      !! ** Action  :
17      !!
18      !! History
19      !!----------------------------------------------------------------------
20      !! * Modules used
21
22      !! * Arguments
23      real(wp), INTENT(IN) :: ddate
24      INTEGER, INTENT(OUT) :: kyea
25      INTEGER, INTENT(OUT) :: kmon
26      INTEGER, INTENT(OUT) :: kday
27      INTEGER, INTENT(OUT) :: khou
28      INTEGER, INTENT(OUT) :: kmin
29      INTEGER, INTENT(OUT) :: ksec
30      !! * Local declarations
31      INTEGER :: iyymmdd
32      INTEGER :: ihhmmss
33     
34      iyymmdd = INT( ddate )
35      ihhmmss = INT( ( ddate - iyymmdd ) * 1000000 )
36      kyea = iyymmdd/10000
37      kmon = iyymmdd / 100 - 100 * kyea
38      kday = MOD( iyymmdd, 100 )
39      khou = ihhmmss/10000
40      kmin = ihhmmss / 100 - 100 * khou
41      ksec = MOD( ihhmmss, 100 )
42     
43   END SUBROUTINE ddatetoymdhms
Note: See TracBrowser for help on using the repository browser.