1 |
MODULE calendar |
MODULE calendar |
2 |
!$Header: /home/ioipsl/CVSROOT/IOIPSL/src/calendar.f90,v 2.0 2004/04/05 14:47:47 adm Exp $ |
|
3 |
!- |
! From IOIPSL/src/calendar.f90, version 2.0 2004/04/05 14:47:47 |
4 |
!--------------------------------------------------------------------- |
|
5 |
!- This is the calendar which going to be used to do all |
!- This is the calendar used to do all calculations on time. Three |
6 |
!- calculations on time. Three types of calendars are possible : |
!- types of calendars are possible : |
7 |
!- - gregorian : The normal calendar. The time origin for the |
!- - gregorian : The normal calendar. The time origin for the |
8 |
!- julian day in this case is 24 Nov -4713 |
!- julian day in this case is 24 Nov -4713 |
9 |
!- - nolap : A 365 day year without leap years. |
!- - nolap : A 365 day year without leap years. |
21 |
!- |
!- |
22 |
!- un_jour : one day in seconds |
!- un_jour : one day in seconds |
23 |
!- un_an : one year in days |
!- un_an : one year in days |
24 |
!--------------------------------------------------------------------- |
|
25 |
USE strlowercase_m, ONLY : strlowercase |
USE strlowercase_m, ONLY : strlowercase |
26 |
USE errioipsl, ONLY : histerr |
USE errioipsl, ONLY : histerr |
27 |
!- |
!- |
62 |
|
|
63 |
INTEGER,INTENT(IN) :: year,month,day |
INTEGER,INTENT(IN) :: year,month,day |
64 |
REAL,INTENT(IN) :: sec |
REAL,INTENT(IN) :: sec |
|
|
|
65 |
REAL,INTENT(OUT) :: julian |
REAL,INTENT(OUT) :: julian |
66 |
|
|
67 |
INTEGER :: julian_day |
INTEGER :: julian_day |
69 |
!--------------------------------------------------------------------- |
!--------------------------------------------------------------------- |
70 |
CALL ymds2ju_internal (year,month,day,sec,julian_day,julian_sec) |
CALL ymds2ju_internal (year,month,day,sec,julian_day,julian_sec) |
71 |
|
|
72 |
julian = julian_day+julian_sec / un_jour |
julian = julian_day + julian_sec / un_jour |
73 |
!--------------------- |
!--------------------- |
74 |
END SUBROUTINE ymds2ju |
END SUBROUTINE ymds2ju |
75 |
|
|
332 |
date_now = itau2date (itau,date0,dt) |
date_now = itau2date (itau,date0,dt) |
333 |
date_last_act = itau2date (last_action,date0,dt) |
date_last_act = itau2date (last_action,date0,dt) |
334 |
CALL ju2ymds (date_last_act,year,month,day,sec) |
CALL ju2ymds (date_last_act,year,month,day,sec) |
335 |
monthp1 = month-freq |
monthp1 = month - freq |
336 |
yearp = year |
yearp = year |
337 |
|
|
338 |
!---- Here we compute what logically should be the next month |
!---- Here we compute what logically should be the next month |