m_realkinds.F90 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. ! NASA/GSFC, Data Assimilation Office, Code 910.3, GEOS/DAS !
  3. !-----------------------------------------------------------------------
  4. ! CVS m_realkinds.F90,v 1.6 2004-04-21 22:54:48 jacob Exp
  5. ! CVS MCT_2_8_0
  6. !-----------------------------------------------------------------------
  7. !BOP
  8. !
  9. ! !MODULE: m_realkinds - real KIND definitions
  10. !
  11. ! !DESCRIPTION:
  12. !
  13. ! !INTERFACE:
  14. module m_realkinds
  15. implicit none
  16. private ! except
  17. public :: kind_r4 ! real*4
  18. public :: kind_r8 ! real*8
  19. public :: kind_r ! default real
  20. public :: SP ! default REAL
  21. public :: DP ! default DOUBLE_PRECISION
  22. public :: FP ! general floating point precision
  23. real*4,parameter :: mpeuR4=1.
  24. real*8,parameter :: mpeuR8=1.
  25. real, parameter :: mpeuR =1.
  26. #ifdef SELECTEDREALKIND
  27. integer,parameter :: SP = selected_real_kind( 6) ! 32-bit real, on most platforms
  28. integer,parameter :: DP = selected_real_kind(12) ! 64-bit real, on most platforms
  29. #else
  30. integer,parameter :: SP = kind(1. )
  31. integer,parameter :: DP = kind(1.D0)
  32. #endif
  33. ! Set the current default floating point precision
  34. integer,parameter :: FP = DP
  35. integer,parameter :: kind_r4=kind(mpeuR4)
  36. integer,parameter :: kind_r8=kind(mpeuR8)
  37. integer,parameter :: kind_r =kind(mpeuR )
  38. ! !REVISION HISTORY:
  39. ! 19Feb98 - Jing Guo <guo@thunder> - initial prototype/prolog/code
  40. ! 23Jan03 - R. Jacob <jacob@mcs.anl.gov> - add FP
  41. !EOP
  42. !_______________________________________________________________________
  43. character(len=*),parameter :: myname='MCT(MPEU)::m_realkinds'
  44. end module m_realkinds