[3083] | 1 | ! Copyright 2013-2015,2017,2022 Université de Reims Champagne-Ardenne |
---|
[1793] | 2 | ! Contributor: J. Burgalat (GSMA, URCA) |
---|
| 3 | ! email of the author : jeremie.burgalat@univ-reims.fr |
---|
[3083] | 4 | ! |
---|
[1793] | 5 | ! This software is a computer program whose purpose is to compute |
---|
| 6 | ! microphysics processes using a two-moments scheme. |
---|
[3083] | 7 | ! |
---|
[1793] | 8 | ! This library is governed by the CeCILL-B license under French law and |
---|
[3083] | 9 | ! abiding by the rules of distribution of free software. You can use, |
---|
[1793] | 10 | ! modify and/ or redistribute the software under the terms of the CeCILL-B |
---|
| 11 | ! license as circulated by CEA, CNRS and INRIA at the following URL |
---|
[3083] | 12 | ! "http://www.cecill.info". |
---|
| 13 | ! |
---|
[1793] | 14 | ! As a counterpart to the access to the source code and rights to copy, |
---|
| 15 | ! modify and redistribute granted by the license, users are provided only |
---|
| 16 | ! with a limited warranty and the software's author, the holder of the |
---|
| 17 | ! economic rights, and the successive licensors have only limited |
---|
[3083] | 18 | ! liability. |
---|
| 19 | ! |
---|
[1793] | 20 | ! In this respect, the user's attention is drawn to the risks associated |
---|
| 21 | ! with loading, using, modifying and/or developing or reproducing the |
---|
| 22 | ! software by the user in light of its specific status of free software, |
---|
| 23 | ! that may mean that it is complicated to manipulate, and that also |
---|
| 24 | ! therefore means that it is reserved for developers and experienced |
---|
| 25 | ! professionals having in-depth computer knowledge. Users are therefore |
---|
| 26 | ! encouraged to load and test the software's suitability as regards their |
---|
[3083] | 27 | ! requirements in conditions enabling the security of their systems and/or |
---|
| 28 | ! data to be ensured and, more generally, to use and operate it in the |
---|
| 29 | ! same conditions as regards security. |
---|
| 30 | ! |
---|
[1793] | 31 | ! The fact that you are presently reading this means that you have had |
---|
| 32 | ! knowledge of the CeCILL-B license and that you accept its terms. |
---|
| 33 | |
---|
| 34 | !! file: mm_mprec.F90 |
---|
| 35 | !! summary: Library floating point precision module. |
---|
| 36 | !! author: J. Burgalat |
---|
[3083] | 37 | !! date: 2013-2015,2017,2022 |
---|
[1793] | 38 | |
---|
| 39 | #ifdef HAVE_CONFIG_H |
---|
| 40 | #include "config.h" |
---|
| 41 | #endif |
---|
| 42 | |
---|
| 43 | #ifndef PREC |
---|
[3083] | 44 | #define PREC 64 |
---|
[1793] | 45 | #elif (PREC != 32 && PREC != 64 && PREC != 80) |
---|
| 46 | #undef PREC |
---|
| 47 | #define PREC 64 |
---|
| 48 | #endif |
---|
| 49 | |
---|
| 50 | MODULE MM_MPREC |
---|
| 51 | !! Library floating point computations precision module. |
---|
| 52 | !! |
---|
| 53 | !! This module only defines a single variable [[mm_mprec(module):mm_wp(variable)]] which sets |
---|
[3083] | 54 | !! the kind of floating point value used in all other part of the library (REAL(kind=mm_wp) |
---|
[1793] | 55 | !! declaration statement). |
---|
| 56 | IMPLICIT NONE |
---|
| 57 | |
---|
| 58 | #if (PREC == 32) |
---|
| 59 | !> Size of floating point variables in the library (single). |
---|
[3083] | 60 | INTEGER, PUBLIC, PARAMETER :: mm_wp = SELECTED_REAL_KIND(p=6) ! 32 bits |
---|
| 61 | CHARACTER(len=è), PUBLIC, PARAMETER :: mm_wp_s = "32 bits" |
---|
[1793] | 62 | #elif (PREC == 64) |
---|
| 63 | !> Size of floating point variables in the library (double). |
---|
[3083] | 64 | INTEGER, PUBLIC, PARAMETER :: mm_wp = SELECTED_REAL_KIND(p=15) ! 64 bits |
---|
| 65 | CHARACTER(len=7), PUBLIC, PARAMETER :: mm_wp_s = "64 bits" |
---|
[1793] | 66 | #elif (PREC == 80) |
---|
| 67 | !> Size of floating point variables in the library (extended-double). |
---|
[3083] | 68 | INTEGER, PUBLIC, PARAMETER :: mm_wp = SELECTED_REAL_KIND(p=18) ! 80 bits |
---|
| 69 | CHARACTER(len=7), PUBLIC, PARAMETER :: mm_wp_s = "80 bits" |
---|
[1793] | 70 | #endif |
---|
| 71 | END MODULE MM_MPREC |
---|
| 72 | |
---|