source: LMDZ5/branches/IPSLCM6.0.12/libf/misc/nrtype.F90

Last change on this file was 2228, checked in by lguez, 10 years ago

Correcting a problem from revision 2218. The type double precision
with option "-fdefault-real-8" of gfortran is promoted to 16-byte
precision and there is no specific procedure in arth with this
precision. Could not add a specific procedure in arth with double
precision because, with ifort, the option "-real-size 64" does not
promote the double precision, so that would make two identical
specific procedures in arth.

In module nrtype, replaced double precision by a parameterized real
kind so that the effective precision does not depend on a compiler
option.

In coefpoly, fxhyp, fyhyp and invert_zoom_x, use the parameterized
real kind defined in nrtype, instead of double precision.

Also, in module nrtype, removed unused derived types sprs2_sp and
sprs2_dp.

File size: 779 bytes
Line 
1MODULE nrtype
2
3  implicit none
4
5  integer, parameter:: k8 = selected_real_kind(13)
6
7  ! Frequently used mathematical constants (with precision to spare):
8
9  REAL, PARAMETER :: PI=3.141592653589793238462643383279502884197
10  REAL, PARAMETER :: PIO2=1.57079632679489661923132169163975144209858
11  REAL, PARAMETER :: TWOPI=6.283185307179586476925286766559005768394
12  REAL, PARAMETER :: SQRT2=1.41421356237309504880168872420969807856967
13  REAL, PARAMETER :: EULER=0.5772156649015328606065120900824024310422
14
15  REAL(K8), PARAMETER:: &
16       PI_D = 3.141592653589793238462643383279502884197_k8
17  REAL(K8), PARAMETER:: &
18       PIO2_D=1.57079632679489661923132169163975144209858_k8
19  REAL(K8), PARAMETER:: &
20       TWOPI_D=6.283185307179586476925286766559005768394_k8
21
22END MODULE nrtype
Note: See TracBrowser for help on using the repository browser.