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 ! only used in PHYS |
---|
13 | ! CPP_INLANDSIS -> CPPKEY_INLANDSIS ! only used in PHYS |
---|
14 | ! OUTPUT_PHYS_SCM-> CPPKEY_OUTPUTPHYSSCM ! only used in DYN1D |
---|
15 | ! CPP_COSP -> CPPKEY_COSP ! only used in PHYS |
---|
16 | ! CPP_COSP2 -> CPPKEY_COSP2 ! only used in PHYS |
---|
17 | ! CPP_COSPV2 -> CPPKEY_COSPV2 ! only used in PHYS |
---|
18 | ! |
---|
19 | ! NB Laurent 09/24: Certaines clés sont utilisées uniquement dans la physique, mais on décide de les laisser dans misc/ pour l'instant. |
---|
20 | ! --------------------------------------------- |
---|
21 | |
---|
22 | MODULE lmdz_cppkeys_wrapper |
---|
23 | USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: REAL64, REAL32 |
---|
24 | USE netcdf, ONLY: nf90_float, nf90_double |
---|
25 | IMPLICIT NONE; PRIVATE |
---|
26 | PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, & |
---|
27 | CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM, CPPKEY_COSP, CPPKEY_COSP2, & |
---|
28 | CPPKEY_COSPV2, CPPKEY_REPROBUS |
---|
29 | |
---|
30 | #ifdef NC_DOUBLE |
---|
31 | INTEGER, PARAMETER :: nf90_format = nf90_double |
---|
32 | #else |
---|
33 | INTEGER, PARAMETER :: nf90_format = nf90_float |
---|
34 | #endif |
---|
35 | |
---|
36 | #ifdef CPP_PHYS |
---|
37 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE. |
---|
38 | #else |
---|
39 | LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE. |
---|
40 | #endif |
---|
41 | |
---|
42 | #ifdef INCA |
---|
43 | LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE. |
---|
44 | #else |
---|
45 | LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE. |
---|
46 | #endif |
---|
47 | |
---|
48 | #ifdef REPROBUS |
---|
49 | LOGICAL, PARAMETER :: CPPKEY_REPROBUS = .TRUE. |
---|
50 | #else |
---|
51 | LOGICAL, PARAMETER :: CPPKEY_REPROBUS = .FALSE. |
---|
52 | #endif |
---|
53 | |
---|
54 | #ifdef CPP_StratAer |
---|
55 | LOGICAL, PARAMETER :: CPPKEY_STRATAER = .TRUE. |
---|
56 | #else |
---|
57 | LOGICAL, PARAMETER :: CPPKEY_STRATAER = .FALSE. |
---|
58 | #endif |
---|
59 | |
---|
60 | #ifdef CPP_DUST |
---|
61 | LOGICAL, PARAMETER :: CPPKEY_DUST = .TRUE. |
---|
62 | #else |
---|
63 | LOGICAL, PARAMETER :: CPPKEY_DUST = .FALSE. |
---|
64 | #endif |
---|
65 | |
---|
66 | #ifdef CPP_INLANDSIS |
---|
67 | LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .TRUE. |
---|
68 | #else |
---|
69 | LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .FALSE. |
---|
70 | #endif |
---|
71 | |
---|
72 | #ifdef OUTPUT_PHYS_SCM |
---|
73 | LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .TRUE. |
---|
74 | #else |
---|
75 | LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .FALSE. |
---|
76 | #endif |
---|
77 | |
---|
78 | #ifdef CPP_COSP |
---|
79 | LOGICAL, PARAMETER :: CPPKEY_COSP = .TRUE. |
---|
80 | #else |
---|
81 | LOGICAL, PARAMETER :: CPPKEY_COSP = .FALSE. |
---|
82 | #endif |
---|
83 | |
---|
84 | #ifdef CPP_COSP2 |
---|
85 | LOGICAL, PARAMETER :: CPPKEY_COSP2 = .TRUE. |
---|
86 | #else |
---|
87 | LOGICAL, PARAMETER :: CPPKEY_COSP2 = .FALSE. |
---|
88 | #endif |
---|
89 | |
---|
90 | #ifdef CPP_COSPV2 |
---|
91 | LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .TRUE. |
---|
92 | #else |
---|
93 | LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .FALSE. |
---|
94 | #endif |
---|
95 | |
---|
96 | END MODULE lmdz_cppkeys_wrapper |
---|