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 (unless specified explicitely), |
---|
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 ! -> also in lmdz_inca_wrappers.F90 |
---|
10 | ! CPP_StratAer -> CPPKEY_STRATAER |
---|
11 | ! CPP_DUST -> CPPKEY_DUST |
---|
12 | ! CPP_INLANDSIS -> CPPKEY_INLANDSIS |
---|
13 | ! OUTPUT_PHYS_SCM-> CPPKEY_OUTPUTPHYSSCM |
---|
14 | ! CPP_COSP -> CPPKEY_COSP |
---|
15 | ! CPP_COSP2 -> CPPKEY_COSP2 |
---|
16 | ! CPP_COSPV2 -> CPPKEY_COSPV2 |
---|
17 | ! --------------------------------------------- |
---|
18 | |
---|
19 | MODULE lmdz_cppkeys_wrapper |
---|
20 | USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: REAL64, REAL32 |
---|
21 | USE netcdf, ONLY: nf90_float, nf90_double |
---|
22 | IMPLICIT NONE; PRIVATE |
---|
23 | PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, & |
---|
24 | CPPKEY_DEBUGIO, CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM, CPPKEY_COSP, CPPKEY_COSP2, & |
---|
25 | CPPKEY_COSPV2 |
---|
26 | |
---|
27 | #ifdef NC_DOUBLE |
---|
28 | INTEGER, PARAMETER :: nf90_format = nf90_double |
---|
29 | #else |
---|
30 | INTEGER, PARAMETER :: nf90_format = nf90_float |
---|
31 | #endif |
---|
32 | |
---|
33 | #ifdef CPP_PHYS |
---|
34 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE. |
---|
35 | #else |
---|
36 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE. |
---|
37 | #endif |
---|
38 | |
---|
39 | #ifdef INCA |
---|
40 | LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE. |
---|
41 | #else |
---|
42 | LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE. |
---|
43 | #endif |
---|
44 | |
---|
45 | #ifdef CPP_StratAer |
---|
46 | LOGICAL, PARAMETER :: CPPKEY_STRATAER = .TRUE. |
---|
47 | #else |
---|
48 | LOGICAL, PARAMETER :: CPPKEY_STRATAER = .FALSE. |
---|
49 | #endif |
---|
50 | |
---|
51 | #ifdef CPP_DUST |
---|
52 | LOGICAL, PARAMETER :: CPPKEY_DUST = .TRUE. |
---|
53 | #else |
---|
54 | LOGICAL, PARAMETER :: CPPKEY_DUST = .FALSE. |
---|
55 | #endif |
---|
56 | |
---|
57 | #ifdef DEBUG_IO |
---|
58 | LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .TRUE. |
---|
59 | #else |
---|
60 | LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .FALSE. |
---|
61 | #endif |
---|
62 | |
---|
63 | #ifdef CPP_INLANDSIS |
---|
64 | LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .TRUE. |
---|
65 | #else |
---|
66 | LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .FALSE. |
---|
67 | #endif |
---|
68 | |
---|
69 | #ifdef OUTPUT_PHYS_SCM |
---|
70 | LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .TRUE. |
---|
71 | #else |
---|
72 | LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .FALSE. |
---|
73 | #endif |
---|
74 | |
---|
75 | #ifdef CPP_COSP |
---|
76 | LOGICAL, PARAMETER :: CPPKEY_COSP = .TRUE. |
---|
77 | #else |
---|
78 | LOGICAL, PARAMETER :: CPPKEY_COSP = .FALSE. |
---|
79 | #endif |
---|
80 | |
---|
81 | #ifdef CPP_COSP2 |
---|
82 | LOGICAL, PARAMETER :: CPPKEY_COSP2 = .TRUE. |
---|
83 | #else |
---|
84 | LOGICAL, PARAMETER :: CPPKEY_COSP2 = .FALSE. |
---|
85 | #endif |
---|
86 | |
---|
87 | #ifdef CPP_COSPV2 |
---|
88 | LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .TRUE. |
---|
89 | #else |
---|
90 | LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .FALSE. |
---|
91 | #endif |
---|
92 | |
---|
93 | END MODULE lmdz_cppkeys_wrapper |
---|