[5116] | 1 | ! Amaury (07/2024): utilisé nulle part, code de <2004 |
---|
| 2 | ! Je suggère de bouger dans obsolète |
---|
[5099] | 3 | |
---|
[1403] | 4 | ! $Id: juldate.f90 5116 2024-07-24 12:54:37Z abarral $ |
---|
[5099] | 5 | |
---|
[5105] | 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 |
---|
[524] | 14 | |
---|
[5105] | 15 | REAL :: frac,year,rmon,cf,a,b |
---|
| 16 | INTEGER :: ojou |
---|
[524] | 17 | |
---|
[5105] | 18 | frac=((os/60.+om)/60.+oh)/24. |
---|
| 19 | ojou=dble(ijou)+frac |
---|
| 20 | year=dble(ian) |
---|
| 21 | rmon=dble(imoi) |
---|
[5116] | 22 | if (imoi <= 2) THEN |
---|
[5105] | 23 | year=year-1. |
---|
| 24 | rmon=rmon+12. |
---|
| 25 | endif |
---|
| 26 | cf=year+(rmon/100.)+(ojou/10000.) |
---|
[5116] | 27 | if (cf >= 1582.1015) THEN |
---|
[5105] | 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 | |
---|
[5116] | 39 | END SUBROUTINE juldate |
---|
[5105] | 40 | |
---|
| 41 | |
---|