1 | PROGRAM convdate |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | ! |
---|
6 | ! pgf90 time.F makecal.F90 |
---|
7 | ! |
---|
8 | |
---|
9 | INTEGER :: gcm_day, init_oui |
---|
10 | |
---|
11 | INTEGER :: wrf_month,wrf_day |
---|
12 | |
---|
13 | INTEGER :: init,i |
---|
14 | INTEGER, PARAMETER :: MONTHS_PER_YEAR = 12 |
---|
15 | INTEGER, PARAMETER :: mday(MONTHS_PER_YEAR) & |
---|
16 | = (/61,66,66,65,60,54,50,46,47,47,51,56/) |
---|
17 | REAL :: ls |
---|
18 | |
---|
19 | CHARACTER(2) :: cday,cmonth |
---|
20 | |
---|
21 | !!PRINT *, ' init --',' GCM sol --', ' GCM ls --', ' WRF month --', ' WRF day --' |
---|
22 | !!PRINT *, ' init --',' GCM sol --', ' GCM ls --', ' WRF' |
---|
23 | PRINT *, '-- sol -- ', ' -- ls -- ', ' -- month -- ', ' -- day --' |
---|
24 | |
---|
25 | DO gcm_day=0,668 |
---|
26 | |
---|
27 | init_oui=0 |
---|
28 | |
---|
29 | init=gcm_day+1 !!+1 sinon on decale tout |
---|
30 | DO i=1,MONTHS_PER_YEAR |
---|
31 | wrf_month=i |
---|
32 | init=init-mday(i) |
---|
33 | IF (init <= 0) EXIT |
---|
34 | END DO |
---|
35 | |
---|
36 | wrf_day=init+mday(wrf_month) |
---|
37 | |
---|
38 | IF (MODULO(gcm_day+1,3) == 0) init_oui=99 |
---|
39 | |
---|
40 | CALL sol2ls(real(gcm_day),ls) |
---|
41 | |
---|
42 | Write( cday, '(i0)' ) wrf_day |
---|
43 | Write( cmonth, '(i0)' ) wrf_month |
---|
44 | IF (wrf_day < 10) cday='0'//cday |
---|
45 | IF (wrf_month < 10) cmonth='0'//cmonth |
---|
46 | |
---|
47 | IF (ls < 1e-3) ls=0. |
---|
48 | |
---|
49 | !!PRINT *, init_oui, gcm_day, ls, wrf_day, wrf_month, '2024'//'-'//cmonth//'-'//cday//'_'//'00'//':00:00' |
---|
50 | !!PRINT *, init_oui, gcm_day, ls, '2024'//'-'//cmonth//'-'//cday//'_'//'00'//':00:00' |
---|
51 | PRINT *, gcm_day, ls, cmonth//' '//cday |
---|
52 | |
---|
53 | ENDDO |
---|
54 | |
---|
55 | END PROGRAM convdate |
---|