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

Last change on this file since 5090 was 5090, checked in by abarral, 4 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

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