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