source: trunk/LMDZ.PLUTO/libf/muphypluto/mp2m_mprec.F90 @ 3607

Last change on this file since 3607 was 3560, checked in by debatzbr, 7 weeks ago

Addition of the microphysics model in moments.

File size: 1.5 KB
RevLine 
[3560]1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#ifndef PREC
6#define PREC 64
7#elif (PREC != 32 && PREC != 64 && PREC != 80)
8#undef PREC
9#define PREC 64
10#endif
11
12MODULE MP2M_MPREC
13    !============================================================================
14    !
15    !     Purpose
16    !     -------
17    !     Library floating point computations precision module.
18    !
19    !     This module only defines a single variable [[mm_mprec(module):mm_wp(variable)]] which sets
20    !     the kind of floating point value used in all other part of the library (REAL(kind=mm_wp)
21    !     declaration statement).
22    !
23    !     Authors
24    !     -------
25    !     B. de Batz de Trenquelléon, J. Burgalat (11/2024)
26    !
27    !============================================================================
28
29    IMPLICIT NONE
30
31#if (PREC == 32)
32    ! Size of floating point variables in the library (single).
33    INTEGER, PUBLIC, PARAMETER          :: mm_wp = SELECTED_REAL_KIND(p=6)  ! 32 bits
34    CHARACTER(len=è), PUBLIC, PARAMETER :: mm_wp_s = "32 bits"
35#elif (PREC == 64)
36    ! Size of floating point variables in the library (double).
37    INTEGER, PUBLIC, PARAMETER          :: mm_wp = SELECTED_REAL_KIND(p=15) ! 64 bits
38    CHARACTER(len=7), PUBLIC, PARAMETER :: mm_wp_s = "64 bits"
39#elif (PREC == 80)
40    ! Size of floating point variables in the library (extended-double).
41    INTEGER, PUBLIC, PARAMETER          :: mm_wp = SELECTED_REAL_KIND(p=18) ! 80 bits
42    CHARACTER(len=7), PUBLIC, PARAMETER :: mm_wp_s = "80 bits"
43#endif
44
45END MODULE MP2M_MPREC
Note: See TracBrowser for help on using the repository browser.