1 | ! --------------------------------------------- |
---|
2 | ! This file is part of an effort to replace most uses of preprocessor CPP keys by fortran variables, |
---|
3 | ! to improve readability, compilation coverage, and linting. |
---|
4 | ! CPP keys used here should ONLY be used here, |
---|
5 | ! and imported through USE ..., ONLY: ... elsewhere |
---|
6 | ! CPP keys supported (key -> fortran variables associated): |
---|
7 | ! NC_DOUBLE -> nf90_format |
---|
8 | ! CPP_PHYS -> CPPKEY_PHYS |
---|
9 | ! INCA -> CPPKEY_INCA |
---|
10 | ! --------------------------------------------- |
---|
11 | |
---|
12 | MODULE lmdz_cppkeys_wrapper |
---|
13 | USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : REAL64, REAL32 |
---|
14 | USE netcdf, ONLY: nf90_float, nf90_double |
---|
15 | IMPLICIT NONE; PRIVATE |
---|
16 | PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA |
---|
17 | |
---|
18 | #ifdef NC_DOUBLE |
---|
19 | INTEGER, PARAMETER :: nf90_format = nf90_double |
---|
20 | #else |
---|
21 | INTEGER, PARAMETER :: nf90_format = nf90_float |
---|
22 | #endif |
---|
23 | |
---|
24 | #ifdef CPP_PHYS |
---|
25 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE. |
---|
26 | #else |
---|
27 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE. |
---|
28 | #endif |
---|
29 | |
---|
30 | #ifdef INCA |
---|
31 | LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE. |
---|
32 | #else |
---|
33 | LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE. |
---|
34 | #endif |
---|
35 | |
---|
36 | END MODULE lmdz_cppkeys_wrapper |
---|