source: branches/ORCHIDEE_EXT/ORCHIDEE_OL/getprec.f90 @ 313

Last change on this file since 313 was 258, checked in by didier.solyga, 13 years ago

Externalized version of ORCHIDEE_OL files merged with the trunk

File size: 1.8 KB
Line 
1!< $HeadURL: http://forge.ipsl.jussieu.fr/orchidee/svn/trunk/ORCHIDEE_OL/getprec.f90 $
2!< $Date: 2010-11-29 12:12:17 +0100 (Mon, 29 Nov 2010) $
3!< $Author: mmaipsl $
4!< $Revision: 18 $
5!-
6PROGRAM getprec
7!---------------------------------------------------------------------
8!- This program verifies that that the number representation
9!- between the different components of the model are compatible
10!---------------------------------------------------------------------
11  USE defprec
12!-
13  IMPLICIT NONE
14!-
15  INTEGER :: i
16  REAL    :: r
17!-
18  INTEGER :: range_int,range_real,precision_real
19!---------------------------------------------------------------------
20  range_int  = RANGE(i)
21  range_real = RANGE(r)
22  precision_real = PRECISION(r)
23!-
24  WRITE(*,*) 'The following ranges and precisions are standard'
25  WRITE(*,*) 'on this computer with your compiler options :'
26  WRITE(*,*) ' INTEGER range     :',range_int
27  WRITE(*,*) ' REAL    range     :',range_real
28  WRITE(*,*) ' REAL    precision :',precision_real
29!-
30  WRITE(*,*) 'The corresponding kinds are :'
31  WRITE(*,*) ' KIND for integer  :', &
32 & SELECTED_INT_KIND(range_int)
33  WRITE(*,*) ' KIND for real     :', &
34 & SELECTED_REAL_KIND(precision_real,range_real)
35!-
36  WRITE(*,*) 'We test if this corresponds to what is used'
37  WRITE(*,*) 'in various parts of the code :'
38!-
39! Real :
40!-
41  IF (SELECTED_REAL_KIND(precision_real,range_real) /= r_std) THEN
42    WRITE(*,*) ' REAL : ERROR, the wrong kind is specified.'
43    WRITE(*,*) ' Use the value above.'
44  ELSE
45    WRITE(*,*) ' REAL    : OK'
46  ENDIF
47!-
48! Integer :
49!-
50  IF (SELECTED_INT_KIND(range_int) /= i_std) THEN
51    WRITE(*,*) ' INTEGER : ERROR, the wrong kind is specified.'
52    WRITE(*,*) ' Use the value above.'
53  ELSE
54    WRITE(*,*) ' INTEGER : OK'
55  ENDIF
56!------------------
57END PROGRAM getprec
Note: See TracBrowser for help on using the repository browser.