par_kind.F90 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. MODULE par_kind
  2. !!======================================================================
  3. !! *** MODULE par_kind ***
  4. !! Ocean : define the kind of real for the whole model
  5. !!======================================================================
  6. !! History : 1.0 ! 2002-06 (G. Madec) Original code
  7. !! 3.3 ! 2010-12 (G. Madec) add a standard length of character strings
  8. !!----------------------------------------------------------------------
  9. IMPLICIT NONE
  10. PRIVATE
  11. INTEGER, PUBLIC, PARAMETER :: jpbyt = 8 !: real size for mpp communications
  12. INTEGER, PUBLIC, PARAMETER :: jpbytda = 4 !: real size in input data files 4 or 8
  13. ! Number model from which the SELECTED_*_KIND are requested:
  14. ! 4 byte REAL 8 byte REAL
  15. ! CRAY: - precision = 13
  16. ! exponent = 2465
  17. ! IEEE: precision = 6 precision = 15
  18. ! exponent = 37 exponent = 307
  19. ! !!** Floating point **
  20. INTEGER, PUBLIC, PARAMETER :: sp = SELECTED_REAL_KIND( 6, 37) !: single precision (real 4)
  21. INTEGER, PUBLIC, PARAMETER :: dp = SELECTED_REAL_KIND(12,307) !: double precision (real 8)
  22. INTEGER, PUBLIC, PARAMETER :: wp = dp !: working precision
  23. ! !!** Integer **
  24. INTEGER, PUBLIC, PARAMETER :: i4 = SELECTED_INT_KIND( 9) !: single precision (integer 4)
  25. INTEGER, PUBLIC, PARAMETER :: i8 = SELECTED_INT_KIND(14) !: double precision (integer 8)
  26. ! !!** Integer **
  27. INTEGER, PUBLIC, PARAMETER :: lc = 256 !: Lenght of Character strings
  28. !!----------------------------------------------------------------------
  29. !! NEMO 3.3 , NEMO Consortium (2010)
  30. !! $Id: par_kind.F90 2528 2010-12-27 17:33:53Z rblod $
  31. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  32. !!----------------------------------------------------------------------
  33. END MODULE par_kind