source: palm/trunk/SOURCE/mod_kinds.f90 @ 4716

Last change on this file since 4716 was 4677, checked in by raasch, 4 years ago

files re-formatted to follow the PALM coding standard

  • Property svn:keywords set to Id
File size: 2.5 KB
RevLine 
[1682]1!> @file mod_kinds.f90
[4677]2!--------------------------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1306]4!
[4677]5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
6! Public License as published by the Free Software Foundation, either version 3 of the License, or
7! (at your option) any later version.
[1306]8!
[4677]9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11! Public License for more details.
[1306]12!
[4677]13! You should have received a copy of the GNU General Public License along with PALM. If not, see
14! <http://www.gnu.org/licenses/>.
[1306]15!
[4360]16! Copyright 1997-2020 Leibniz Universitaet Hannover
[4677]17!--------------------------------------------------------------------------------------------------!
[1306]18!
19! Current revisions:
20! ------------------
[4677]21!
22!
[1306]23! Former revisions:
24! -----------------
25! $Id: mod_kinds.f90 4677 2020-09-14 07:55:28Z pavelkrc $
[4677]26! file re-formatted to follow the PALM coding standard
27!
28! 4360 2020-01-07 11:25:50Z suehring
[4182]29! Corrected "Former revisions" section
[4677]30!
[4182]31! 4000 2019-05-24 07:20:44Z raasch
[4000]32! preprocessor switch added for choosing the real precision
[4677]33!
[4000]34! 3655 2019-01-07 16:51:22Z knoop
[2716]35! Corrected "Former revisions" section
[4677]36!
[4182]37! 1306 2014-03-13 14:30:59Z raasch
38! Initial revision
[1306]39!
40! Description:
41! ------------
[1682]42!> Standard kind definitions
[4677]43!> wp (working precision) and iwp (integer working precision) are the kinds used by default in all
44!> variable declarations.
[1682]45!> By default, PALM is using wp = dp (64bit), and iwp = isp (32bit).
[4677]46!> If you like to switch to other precision, then please set wp/iwp appropriately by assigning other
47!> kinds below.
48!--------------------------------------------------------------------------------------------------!
[1682]49 MODULE kinds
[1306]50
[4677]51
[1306]52    IMPLICIT NONE
53
54!
55!-- Floating point kinds
[1682]56    INTEGER, PARAMETER ::  sp = 4           !< single precision (32 bit)
57    INTEGER, PARAMETER ::  dp = 8           !< double precision (64 bit)
[1306]58
59!
60!-- Integer kinds
[1682]61    INTEGER, PARAMETER ::  isp = SELECTED_INT_KIND(  9 )   !< single precision (32 bit)
62    INTEGER, PARAMETER ::  idp = SELECTED_INT_KIND( 14 )   !< double precision (64 bit)
[1306]63
64!
65!-- Set kinds to be used as defaults
[4000]66#if defined( __single_precision )
67    INTEGER, PARAMETER ::   wp =  sp          !< default real kind
68#else
[1682]69    INTEGER, PARAMETER ::   wp =  dp          !< default real kind
[4000]70#endif
[1682]71    INTEGER, PARAMETER ::  iwp = isp          !< default integer kind
[1306]72
73    SAVE
74
75 END MODULE kinds
Note: See TracBrowser for help on using the repository browser.