New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ddatetoymdhms.h90 in NEMO/trunk/src/OCE/OBS – NEMO

source: NEMO/trunk/src/OCE/OBS/ddatetoymdhms.h90 @ 9690

Last change on this file since 9690 was 9690, checked in by nicolasmartin, 6 years ago

Set mime-type for h90 files to have syntax highlighting under Trac browser

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-fortran
File size: 1.4 KB
RevLine 
[2287]1   !!----------------------------------------------------------------------
[9598]2   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
[2287]3   !! $Id$
[9598]4   !! Software governed by the CeCILL licence (./LICENSE)
[2287]5   !!----------------------------------------------------------------------
6
[2128]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
[4990]23      real(wp), INTENT(IN) :: ddate
[2128]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.