MODULE Numeric_Kinds_Module !USE Numbers_Module !========================================================================================= ! This module defines types and constants to be used throughout other codes. Here is ! defined the real type wp_kind (working precision) that defines the real type of all ! declared real variables. ! ! D. A. Brue !========================================================================================= IMPLICIT NONE ! Define compiler-dependent type constants as parameters INTEGER, PARAMETER :: i1_kind = SELECTED_INT_KIND(2) ! -128, 127 INTEGER, PARAMETER :: i2_kind = SELECTED_INT_KIND(4) ! INTEGER, PARAMETER :: i4_kind = SELECTED_INT_KIND(9) INTEGER, PARAMETER :: i8_kind = SELECTED_INT_KIND(12) INTEGER, PARAMETER :: sp_kind = SELECTED_REAL_KIND(p=6,r=30) ! single precision INTEGER, PARAMETER :: dp_kind = SELECTED_REAL_KIND(p=14,r=300) ! double precision INTEGER, PARAMETER :: qp_kind = SELECTED_REAL_KIND(p=30,r=4000) ! quadruple precision ! note above real kind types also work for complex declarations ! Select real kind to be used throughout the rest of code INTEGER, PARAMETER :: WP_Kind = dp_kind INTEGER, PARAMETER :: IW_Kind = i4_kind END MODULE Numeric_Kinds_Module