source: LMDZ6/branches/Amaury_dev/libf/obsolete/juldate.f90 @ 5209

Last change on this file since 5209 was 5116, checked in by abarral, 4 months ago

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 987 bytes
Line 
1! Amaury (07/2024): utilisé nulle part, code de <2004
2! Je suggère de bouger dans obsolète
3
4! $Id: juldate.f90 5116 2024-07-24 12:54:37Z fairhead $
5
6  SUBROUTINE juldate(ian,imoi,ijou,oh,om,os,tjd,tjdsec)
7  ! Sous-routine de changement de date:
8  ! gregorien>>>date julienne
9  ! En entree:an,mois,jour,heure,min.,sec.
10  ! En sortie:tjd
11    IMPLICIT NONE
12    INTEGER,INTENT(IN) :: ian,imoi,ijou,oh,om,os
13    REAL,INTENT(OUT) :: tjd,tjdsec
14
15    REAL :: frac,year,rmon,cf,a,b
16    INTEGER :: ojou
17
18    frac=((os/60.+om)/60.+oh)/24.
19    ojou=dble(ijou)+frac
20        year=dble(ian)
21        rmon=dble(imoi)
22    if (imoi <= 2) THEN
23        year=year-1.
24        rmon=rmon+12.
25    endif
26    cf=year+(rmon/100.)+(ojou/10000.)
27    if (cf >= 1582.1015) THEN
28        a=int(year/100)
29        b=2-a+int(a/4)
30    else
31        b=0
32    endif
33    tjd=int(365.25*year)+int(30.6001*(rmon+1))+int(ojou) &
34          +1720994.5+b
35    tjdsec=(ojou-int(ojou))+(tjd-int(tjd))
36    tjd=int(tjd)+int(tjdsec)
37    tjdsec=tjdsec-int(tjdsec)
38
39END SUBROUTINE juldate
40
41
Note: See TracBrowser for help on using the repository browser.