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 | ! --------------------------------------------- |
---|
10 | |
---|
11 | MODULE lmdz_cppkeys_wrapper |
---|
12 | USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : REAL64, REAL32 |
---|
13 | USE netcdf, ONLY: nf90_float, nf90_double |
---|
14 | IMPLICIT NONE; PRIVATE |
---|
15 | PUBLIC nf90_format, CPPKEY_PHYS |
---|
16 | |
---|
17 | #ifdef NC_DOUBLE |
---|
18 | INTEGER, PARAMETER :: nf90_format = nf90_double |
---|
19 | #else |
---|
20 | INTEGER, PARAMETER :: nf90_format = nf90_float |
---|
21 | #endif |
---|
22 | |
---|
23 | #ifdef CPP_PHYS |
---|
24 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE. |
---|
25 | #else |
---|
26 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE. |
---|
27 | #endif |
---|
28 | |
---|
29 | END MODULE lmdz_cppkeys_wrapper |
---|