LMDZ
fcttim.h
Go to the documentation of this file.
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 
20 &NCONSTRUCT_DATE
21 REAL_B :: RJUDAT,RTIME
22 INTEGER_M :: KGRDAT,KSEC,KAAAA,KMM,KDD,KSS
23 INTEGER_M :: KCENT,KYEARC,KMONTH,KDAY
24 
25 NDD(KGRDAT) =MOD(INT(KGRDAT),100)
26 NMM(KGRDAT) =MOD((KGRDAT-NDD(KGRDAT))/100,100)
27 NCCAA(KGRDAT)=KGRDAT/10000
28 NAA(KGRDAT)=MOD(INT(NCCAA(KGRDAT)),100)
29 NAMD(KGRDAT)=MOD(INT(KGRDAT),1000000)
30 NCTH(KSEC)=KSEC/3600
31 NCENT(KGRDAT)=NCCAA(KGRDAT)/100+MIN(INT(NAA(KGRDAT)),1)
32 NYEARC(KGRDAT)=NAA(KGRDAT)+100*(1-MIN(INT(NAA(KGRDAT)),1))
33 NCONSTRUCT_DATE(KCENT,KYEARC,KMONTH,KDAY)=&
34 &(KCENT-1)*10**6+KYEARC*10**4+KMONTH*10**2+KDAY
35 
36 NZZAA(KAAAA,KMM)=KAAAA-( (1-SIGN(1,KMM-3))/2 )
37 NZZMM(KMM)=KMM+6*(1-SIGN(1,KMM-3))
38 RJUDAT(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)
43 RTIME(KAAAA,KMM,KDD,KSS)=(RJUDAT(KAAAA,KMM,KDD)-2451545._JPRB)&
44  &*RDAY+REAL(KSS,JPRB)
45 ! -------------------------------------------------------------
46 
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KSS KYEARC
Definition: fcttim.h:15
#define REAL_B
Definition: tsmbkind.h:22
!$Id ok_orolf LOGICAL ok_limitvrai LOGICAL ok_all_xml INTEGER iflag_ener_conserv REAL solaire REAL(kind=8) RCO2
#define INTEGER_M
Definition: tsmbkind.h:14
Time functions!the descriptions are in the annex of the documentation!TIME month and day NAA
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NAMD
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NZZAA
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME year
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NMM
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NYEARC
Definition: fcttim.h:15
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm &&& day
Time functions!the descriptions are in the annex of the documentation!TIME month and day NCTH
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KSS KMONTH
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NZZMM
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KDD
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KSEC
Definition: fcttim.h:15
ONLY JPRB
Definition: tsmbkind.h:5
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KAAAA
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NCCAA
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day NCENT
Definition: fcttim.h:15
Time functions!the descriptions are in the annex of the documentation!TIME month and day &&NCONSTRUCT_DATE RTIME KMM
Definition: fcttim.h:15
!$Id RNAVO!A1 Astronomical constants REAL RDAY
Definition: YOMCST.h:11