/[lmdze]/trunk/IOIPSL/Calendar/calendar.f
ViewVC logotype

Contents of /trunk/IOIPSL/Calendar/calendar.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92 - (show annotations)
Wed Mar 26 18:16:05 2014 UTC (10 years, 1 month ago) by guez
File size: 1455 byte(s)
Extracted procedures that were in module calendar into separate files.

1 MODULE calendar
2
3 ! From IOIPSL/src/calendar.f90, version 2.0 2004/04/05 14:47:47
4
5 ! This is the calendar used to do all calculations on time. Three
6 ! types of calendars are possible:
7
8 ! - Gregorian:
9 ! The normal calendar. The time origin for the julian day in this
10 ! case is 24 Nov -4713.
11
12 ! - No leap:
13 ! A 365 day year without leap years. The origin for the julian days
14 ! is in this case 1 Jan 0.
15
16 ! - xxxd:
17 ! Year of xxx days with months of equal length. The origin for the
18 ! julian days is then also 1 Jan 0.
19
20 ! As one can see it is difficult to go from one calendar to the
21 ! other. All operations involving julian days will be wrong. This
22 ! calendar will lock as soon as possible the length of the year and
23 ! forbid any further modification.
24
25 ! For the non leap-year calendar the method is still brute force.
26 ! We need to find an integer series which takes care of the length
27 ! of the various month. (Jan)
28
29 IMPLICIT NONE
30
31 REAL, PARAMETER:: un_jour = 86400. ! one day in seconds
32
33 ! Description of calendar
34
35 CHARACTER(LEN=20):: calendar_used = "gregorian"
36 LOGICAL:: lock_unan = .FALSE.
37 REAL:: un_an = 365.2425 ! one year in days
38 INTEGER:: mon_len(12) = (/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/)
39
40 CHARACTER(LEN=3), PARAMETER:: cal(12) = (/'JAN', 'FEB', 'MAR', 'APR', &
41 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'/)
42
43 REAL, SAVE:: start_day, start_sec
44
45 END MODULE calendar

  ViewVC Help
Powered by ViewVC 1.1.21