source: LMDZ5/trunk/libf/phylmd/rrtm/fcttim.h @ 3006

Last change on this file since 3006 was 1990, checked in by Laurent Fairhead, 11 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • 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
File size: 1.6 KB
RevLine 
[1989]1!     ------------------------------------------------------------------
2
3! - Time functions
4!   the descriptions are in the annex 1 of the documentation
5
6! TIME
7
8! NDD   : extraxt dd from ccaammdd
9! NMM   : extract mm from ccaammdd
10! NAA   : extract aa from ccaammdd
11! NCCAA : extract ccaa from ccaammdd
12! NAMD  : extract aammdd from ccaammdd
13! NCENT : return centuary of ccaammdd
14! NYEARC: returns year of the centuary from ccaammdd
15! NCONSTRUCT_DATE : returns ccaammdd given centuary,year,month and day
16! NCTH  : turn seconds into hours
17! RTIME : returns the time of the model (in seconds of course!)
18
19INTEGER(KIND=JPIM) :: NDD,NMM,NCCAA,NAA,NAMD,NCTH,NZZAA,NZZMM,NCENT,NYEARC,&
20&NCONSTRUCT_DATE
21REAL(KIND=JPRB) :: RJUDAT,RTIME
22INTEGER(KIND=JPIM) :: KGRDAT,KSEC,KAAAA,KMM,KDD,KSS
23INTEGER(KIND=JPIM) :: KCENT,KYEARC,KMONTH,KDAY
24
25NDD(KGRDAT)  =MOD(KGRDAT,100)
26NMM(KGRDAT)  =MOD((KGRDAT-NDD(KGRDAT))/100,100)
27NCCAA(KGRDAT)=KGRDAT/10000
28NAA(KGRDAT)=MOD(NCCAA(KGRDAT),100)
29NAMD(KGRDAT)=MOD(KGRDAT,1000000)
30NCTH(KSEC)=KSEC/3600
31NCENT(KGRDAT)=NCCAA(KGRDAT)/100+MIN(NAA(KGRDAT),1)
32NYEARC(KGRDAT)=NAA(KGRDAT)+100*(1-MIN(NAA(KGRDAT),1))
33NCONSTRUCT_DATE(KCENT,KYEARC,KMONTH,KDAY)=&
34&(KCENT-1)*10**6+KYEARC*10**4+KMONTH*10**2+KDAY
35
36NZZAA(KAAAA,KMM)=KAAAA-( (1-SIGN(1,KMM-3))/2 )
37NZZMM(KMM)=KMM+6*(1-SIGN(1,KMM-3))
38RJUDAT(KAAAA,KMM,KDD)=1720994.5_JPRB + REAL(&
39  &2-NZZAA(KAAAA,KMM)/100 + (NZZAA(KAAAA,KMM)/100)/4 &
40&+ INT(365.25_JPRB*REAL(NZZAA(KAAAA,KMM),JPRB))&
41&+ INT(30.601_JPRB*REAL(NZZMM(KMM)+1,JPRB))&
42&+ KDD,JPRB)
43RTIME(KAAAA,KMM,KDD,KSS)=(RJUDAT(KAAAA,KMM,KDD)-2451545._JPRB)&
44    &*RDAY+REAL(KSS,JPRB)
45!    -------------------------------------------------------------
46
Note: See TracBrowser for help on using the repository browser.