source: LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90 @ 5139

Last change on this file since 5139 was 5104, checked in by abarral, 4 months ago

Replace 1DUTILS.h by module lmdz_1dutils.f90
Replace 1DConv.h by module lmdz_old_1dconv.f90 (it's only used by old_* files)
Convert *.F in DUST to *.f90

File size: 2.1 KB
Line 
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! ---------------------------------------------
15
16MODULE lmdz_cppkeys_wrapper
17  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: REAL64, REAL32
18  USE netcdf, ONLY: nf90_float, nf90_double
19  IMPLICIT NONE; PRIVATE
20  PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, &
21      CPPKEY_DEBUGIO, CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM
22
23#ifdef NC_DOUBLE
24  INTEGER, PARAMETER :: nf90_format = nf90_double
25#else
26  INTEGER, PARAMETER :: nf90_format = nf90_float
27#endif
28
29#ifdef CPP_PHYS
30  LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE.
31#else
32  LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE.
33#endif
34
35#ifdef INCA
36  LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE.
37#else
38  LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE.
39#endif
40
41#ifdef CPP_StratAer
42  LOGICAL, PARAMETER :: CPPKEY_STRATAER = .TRUE.
43#else
44  LOGICAL, PARAMETER :: CPPKEY_STRATAER = .FALSE.
45#endif
46
47#ifdef CPP_DUST
48  LOGICAL, PARAMETER :: CPPKEY_DUST = .TRUE.
49#else
50  LOGICAL, PARAMETER :: CPPKEY_DUST = .FALSE.
51#endif
52
53#ifdef DEBUG_IO
54  LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .TRUE.
55#else
56  LOGICAL, PARAMETER :: CPPKEY_DEBUGIO = .FALSE.
57#endif
58
59#ifdef CPP_INLANDSIS
60  LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .TRUE.
61#else
62  LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .FALSE.
63#endif
64
65#ifdef OUTPUT_PHYS_SCM
66  LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .TRUE.
67#else
68  LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .FALSE.
69#endif
70
71END MODULE lmdz_cppkeys_wrapper
Note: See TracBrowser for help on using the repository browser.