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 branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/OBS – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/OBS/ddatetoymdhms.h90 @ 2281

Last change on this file since 2281 was 2281, checked in by smasson, 14 years ago

set proper svn properties to all files...

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1   SUBROUTINE ddatetoymdhms( ddate, kyea, kmon, kday, khou, kmin, ksec )
2      !!----------------------------------------------------------------------
3      !!
4      !!                    *** ROUTINE ddatetoymdhms ***
5      !!
6      !! ** Purpose : Convert YYYYMMDD.hhmmss to components
7      !!
8      !! ** Method  :
9      !!
10      !! ** Action  :
11      !!
12      !! History
13      !!----------------------------------------------------------------------
14      !! * Modules used
15
16      !! * Arguments
17      REAL(dp), INTENT(IN) :: ddate
18      INTEGER, INTENT(OUT) :: kyea
19      INTEGER, INTENT(OUT) :: kmon
20      INTEGER, INTENT(OUT) :: kday
21      INTEGER, INTENT(OUT) :: khou
22      INTEGER, INTENT(OUT) :: kmin
23      INTEGER, INTENT(OUT) :: ksec
24      !! * Local declarations
25      INTEGER :: iyymmdd
26      INTEGER :: ihhmmss
27     
28      iyymmdd = INT( ddate )
29      ihhmmss = INT( ( ddate - iyymmdd ) * 1000000 )
30      kyea = iyymmdd/10000
31      kmon = iyymmdd / 100 - 100 * kyea
32      kday = MOD( iyymmdd, 100 )
33      khou = ihhmmss/10000
34      kmin = ihhmmss / 100 - 100 * khou
35      ksec = MOD( ihhmmss, 100 )
36     
37   END SUBROUTINE ddatetoymdhms
Note: See TracBrowser for help on using the repository browser.