source: LMDZ6/trunk/libf/misc/lmdz_cppkeys_wrapper.F90 @ 5422

Last change on this file since 5422 was 5397, checked in by abarral, 2 weeks ago

Fix typo in CPP_Dust
(also minor: properly import _spl modules)

File size: 2.9 KB
RevLine 
[5068]1! ---------------------------------------------
[5090]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.
[5098]4! CPP keys used here should ONLY be used here (unless specified explicitely),
[5090]5! and imported through USE ..., ONLY: ... elsewhere
6! CPP keys supported (key -> fortran variables associated):
[5102]7!      NC_DOUBLE      -> nf90_format
8!      CPP_PHYS       -> CPPKEY_PHYS
[5103]9!      INCA           -> CPPKEY_INCA   ! -> also in lmdz_inca_wrappers.F90
[5249]10!      REPROBUS       -> CPPKEY_REPROBUS  ! -> also in lmdz_reprobus_wrappers.F90
[5102]11!      CPP_StratAer   -> CPPKEY_STRATAER
[5249]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.
[5068]20! ---------------------------------------------
21
[5090]22MODULE lmdz_cppkeys_wrapper
[5101]23  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: REAL64, REAL32
[5088]24  USE netcdf, ONLY: nf90_float, nf90_double
25  IMPLICIT NONE; PRIVATE
[5101]26  PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, &
[5324]27          CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM, CPPKEY_COSP, CPPKEY_COSP2, &
[5182]28          CPPKEY_COSPV2, CPPKEY_REPROBUS
[5068]29
30#ifdef NC_DOUBLE
[5325]31  INTEGER, PARAMETER :: nf90_format = nf90_double
[5068]32#else
[5325]33  INTEGER, PARAMETER :: nf90_format = nf90_float
[5068]34#endif
[5090]35
36#ifdef CPP_PHYS
[5325]37  LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE.
[5090]38#else
[5325]39  LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE.
[5090]40#endif
41
[5091]42#ifdef INCA
[5325]43  LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE.
[5091]44#else
[5325]45  LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE.
[5091]46#endif
47
[5182]48#ifdef REPROBUS
[5325]49  LOGICAL, PARAMETER :: CPPKEY_REPROBUS = .TRUE.
[5182]50#else
[5325]51  LOGICAL, PARAMETER :: CPPKEY_REPROBUS = .FALSE.
[5182]52#endif
53
[5098]54#ifdef CPP_StratAer
[5325]55  LOGICAL, PARAMETER :: CPPKEY_STRATAER = .TRUE.
[5098]56#else
[5325]57  LOGICAL, PARAMETER :: CPPKEY_STRATAER = .FALSE.
[5098]58#endif
59
[5397]60#ifdef CPP_Dust
[5325]61  LOGICAL, PARAMETER :: CPPKEY_DUST = .TRUE.
[5099]62#else
[5325]63  LOGICAL, PARAMETER :: CPPKEY_DUST = .FALSE.
[5099]64#endif
65
[5102]66#ifdef CPP_INLANDSIS
[5325]67  LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .TRUE.
[5102]68#else
[5325]69  LOGICAL, PARAMETER :: CPPKEY_INLANDSIS = .FALSE.
[5102]70#endif
71
[5103]72#ifdef OUTPUT_PHYS_SCM
[5325]73  LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .TRUE.
[5103]74#else
[5325]75  LOGICAL, PARAMETER :: CPPKEY_OUTPUTPHYSSCM = .FALSE.
[5103]76#endif
77
[5151]78#ifdef CPP_COSP
[5325]79  LOGICAL, PARAMETER :: CPPKEY_COSP = .TRUE.
[5151]80#else
[5325]81  LOGICAL, PARAMETER :: CPPKEY_COSP = .FALSE.
[5151]82#endif
83
84#ifdef CPP_COSP2
[5325]85  LOGICAL, PARAMETER :: CPPKEY_COSP2 = .TRUE.
[5151]86#else
[5325]87  LOGICAL, PARAMETER :: CPPKEY_COSP2 = .FALSE.
[5151]88#endif
89
90#ifdef CPP_COSPV2
[5325]91  LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .TRUE.
[5151]92#else
[5325]93  LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .FALSE.
[5151]94#endif
95
[5090]96END MODULE lmdz_cppkeys_wrapper
Note: See TracBrowser for help on using the repository browser.