[3] | 1 | MODULE par_kind |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE par_kind *** |
---|
| 4 | !! Ocean : define the kind of real for the whole model |
---|
| 5 | !!====================================================================== |
---|
[2528] | 6 | !! History : 1.0 ! 2002-06 (G. Madec) Original code |
---|
| 7 | !! 3.3 ! 2010-12 (G. Madec) add a standard length of character strings |
---|
[3] | 8 | !!---------------------------------------------------------------------- |
---|
| 9 | |
---|
| 10 | IMPLICIT NONE |
---|
| 11 | PRIVATE |
---|
| 12 | |
---|
[2528] | 13 | INTEGER, PUBLIC, PARAMETER :: jpbyt = 8 !: real size for mpp communications |
---|
| 14 | INTEGER, PUBLIC, PARAMETER :: jpbytda = 4 !: real size in input data files 4 or 8 |
---|
[3] | 15 | |
---|
| 16 | ! Number model from which the SELECTED_*_KIND are requested: |
---|
| 17 | ! 4 byte REAL 8 byte REAL |
---|
| 18 | ! CRAY: - precision = 13 |
---|
| 19 | ! exponent = 2465 |
---|
| 20 | ! IEEE: precision = 6 precision = 15 |
---|
| 21 | ! exponent = 37 exponent = 307 |
---|
| 22 | |
---|
[2528] | 23 | ! !!** Floating point ** |
---|
| 24 | INTEGER, PUBLIC, PARAMETER :: sp = SELECTED_REAL_KIND( 6, 37) !: single precision (real 4) |
---|
| 25 | INTEGER, PUBLIC, PARAMETER :: dp = SELECTED_REAL_KIND(12,307) !: double precision (real 8) |
---|
[13226] | 26 | # if defined key_single |
---|
| 27 | INTEGER, PUBLIC, PARAMETER :: wp = sp !: working precision |
---|
| 28 | # else |
---|
[2528] | 29 | INTEGER, PUBLIC, PARAMETER :: wp = dp !: working precision |
---|
[13226] | 30 | # endif |
---|
[3] | 31 | |
---|
[2528] | 32 | ! !!** Integer ** |
---|
| 33 | INTEGER, PUBLIC, PARAMETER :: i4 = SELECTED_INT_KIND( 9) !: single precision (integer 4) |
---|
| 34 | INTEGER, PUBLIC, PARAMETER :: i8 = SELECTED_INT_KIND(14) !: double precision (integer 8) |
---|
| 35 | |
---|
| 36 | ! !!** Integer ** |
---|
[13216] | 37 | INTEGER, PUBLIC, PARAMETER :: lc = 256 !: Lenght of Character strings |
---|
| 38 | INTEGER, PUBLIC, PARAMETER :: lca = 400 !: Lenght of Character arrays |
---|
[3] | 39 | |
---|
[2528] | 40 | !!---------------------------------------------------------------------- |
---|
[9598] | 41 | !! NEMO 3.3 , NEMO Consortium (2018) |
---|
[2528] | 42 | !! $Id$ |
---|
[10068] | 43 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[2528] | 44 | !!---------------------------------------------------------------------- |
---|
[3] | 45 | END MODULE par_kind |
---|