source: trunk/LMDZ.COMMON/libf/dyn3d_common/juldate.F @ 1436

Last change on this file since 1436 was 1391, checked in by emillour, 10 years ago

Common dynamical core:
Updates in the dynamics to keeup up with updates in LMDZ5
(up to LMDZ5 trunk rev 2200):

  • compilation:
  • create_make_gcm : added processing of .f & .f90 files (not just .F and .F90)
  • makelmdz: add "mix" option for -io (ouptut with both IOIPSL and XIOS)
  • makelmdz_fcm: add "mix" option for -io
  • filtrez:
  • acc.F and eigen.F : add "implicit none" and variable declarations
  • bibio:
  • handle_err_m.F90: replace "stop" with call to abort_gcm()
  • i1mach.F, j4save.F: add "implicit none" and variable declarations
  • xercnt.F, xermsg.F, xerprn.F, xersve.F, xgetua.F: add "implicit none" and variable declarations
  • dyn3d_common:
  • disvert.F90 : added comments on meaning of "pa" variable
  • grid_atob.F : better control on level of default ouputs
  • infotrac.F90: update Earth-specific stuff (nqo water tracers)
  • interpre.F: correction on the size of input array w
  • juldate.F, massbar.F, ppm3d.F, ran1.F: add "implicit none" and variable declarations
  • sortvarc.F: code cleanup
  • iniacademic.F90: cleanup and extra sanity check.
  • dyn3d:
  • abort_gcm.F: additions for XIOS
  • conf_gcm.F90: transformed to free form from conf_gcm.F
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guidz_mod.F: update from LMDZ5
  • integrd.F: replace stop with call_abort()
  • dyn3dpar:
  • abort_gcm.F: minor cleanup
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guide_p_mod.F90: update from LMDZ5
  • integrd_p.F: abort with call_abort when there is negative surface pressure
  • leapfrog_p.F: add INCA specific stuff to keep up with current LMDZ5
  • conf_gcm.F90: transformed to free form from conf_gcm.F

EM

File size: 910 bytes
Line 
1!
2! $Id: juldate.F 2197 2015-02-09 07:13:05Z emillour $
3!
4        subroutine juldate(ian,imoi,ijou,oh,om,os,tjd,tjdsec)
5c       Sous-routine de changement de date:
6c       gregorien>>>date julienne
7c       En entree:an,mois,jour,heure,min.,sec.
8c       En sortie:tjd
9        IMPLICIT NONE
10        INTEGER,INTENT(IN) :: ian,imoi,ijou,oh,om,os
11        REAL,INTENT(OUT) :: tjd,tjdsec
12       
13        REAL frac,year,rmon,cf,a,b
14        INTEGER ojou
15       
16        frac=((os/60.+om)/60.+oh)/24.
17        ojou=dble(ijou)+frac
18            year=dble(ian)
19            rmon=dble(imoi)
20        if (imoi .le. 2) then
21            year=year-1.
22            rmon=rmon+12.
23        endif
24        cf=year+(rmon/100.)+(ojou/10000.)
25        if (cf .ge. 1582.1015) then
26            a=int(year/100)
27            b=2-a+int(a/4)
28        else
29            b=0
30        endif
31        tjd=int(365.25*year)+int(30.6001*(rmon+1))+int(ojou)
32     +   +1720994.5+b
33        tjdsec=(ojou-int(ojou))+(tjd-int(tjd))
34        tjd=int(tjd)+int(tjdsec)
35        tjdsec=tjdsec-int(tjdsec)
36        return
37        end
38
39
Note: See TracBrowser for help on using the repository browser.