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

Last change on this file since 5091 was 5091, checked in by abarral, 2 months ago

Move lmdz_netcdf_format.F90 -> lmdz_cppkeys_wrapper.F90 to handle other CPP keys
Replace all (except wrapper) use of CPP_PHYS by fortran logical
Refactor makelmdz_fcm (put blocks into functions, use modern bash)

File size: 1.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,
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
10! ---------------------------------------------
11
12MODULE lmdz_cppkeys_wrapper
13  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : REAL64, REAL32
14  USE netcdf, ONLY: nf90_float, nf90_double
15  IMPLICIT NONE; PRIVATE
16  PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA
17
18#ifdef NC_DOUBLE
19  INTEGER, PARAMETER :: nf90_format = nf90_double
20#else
21  INTEGER, PARAMETER :: nf90_format = nf90_float
22#endif
23
24#ifdef CPP_PHYS
25  LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE.
26#else
27  LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE.
28#endif
29
30#ifdef INCA
31  LOGICAL, PARAMETER :: CPPKEY_INCA = .TRUE.
32#else
33  LOGICAL, PARAMETER :: CPPKEY_INCA = .FALSE.
34#endif
35
36END MODULE lmdz_cppkeys_wrapper
Note: See TracBrowser for help on using the repository browser.