source: trunk/mesoscale/LMD_MM_MARS/SRC/PREP_MARS/convdate.F90 @ 87

Last change on this file since 87 was 11, checked in by aslmd, 14 years ago

spiga@svn-planeto:ajoute le modele meso-echelle martien

File size: 992 bytes
Line 
1PROGRAM convdate
2
3IMPLICIT NONE
4
5!
6! compile: pgf90 convdate.F90 -o convdate
7! use: echo 352 | convdate
8!
9
10
11INTEGER :: gcm_day
12
13INTEGER :: wrf_month,wrf_day
14
15INTEGER :: init,i
16INTEGER, PARAMETER :: MONTHS_PER_YEAR = 12
17INTEGER, PARAMETER :: mday(MONTHS_PER_YEAR)   &
18           = (/61,66,66,65,60,54,50,46,47,47,51,56/)
19
20print *, 'which day ?'
21read *, gcm_day
22
23PRINT *,'*****************'
24print *, 'GCM sol is ... (starting 0)', gcm_day
25PRINT *,'*****************'
26
27!
28! Find WRF month and day
29!
30
31IF (gcm_day >= 669) THEN    !! gcm_day commence au jour 0
32        PRINT *,'out of bounds ! martian year is 669 sols !'
33        gcm_day=MOD(gcm_day,669)
34        !STOP
35ENDIF
36
37
38init=gcm_day+1    !!+1 sinon on decale tout
39DO i=1,MONTHS_PER_YEAR
40        wrf_month=i
41        init=init-mday(i)
42        IF (init <= 0) EXIT
43END DO
44
45PRINT *,'corresponding WRF month is ',wrf_month
46wrf_day=init+mday(wrf_month)
47PRINT *,'corresponding WRF day is ',wrf_day
48PRINT *,'*****************'
49
50
51END PROGRAM convdate
Note: See TracBrowser for help on using the repository browser.