Changeset 5090 for LMDZ6/branches/Amaury_dev/libf/misc
- Timestamp:
- Jul 20, 2024, 6:08:57 PM (13 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/misc
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90
r5089 r5090 1 1 ! --------------------------------------------- 2 ! This module serves as a wrapper around netcdf. 3 ! It serves two primary functions: 4 ! 1) Turn netcdf into a "real" fortran module, without the INCLUDE call 5 ! 2) Handle the NC_DOUBLE CPP key. This key should ONLY be used here. 6 ! The "real" netcdf module/headers should ONLY be called here. 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 7 9 ! --------------------------------------------- 8 10 9 MODULE lmdz_ netcdf_format11 MODULE lmdz_cppkeys_wrapper 10 12 USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : REAL64, REAL32 11 13 USE netcdf, ONLY: nf90_float, nf90_double 12 14 IMPLICIT NONE; PRIVATE 13 PUBLIC nf90_format 15 PUBLIC nf90_format, CPPKEY_PHYS 14 16 15 17 #ifdef NC_DOUBLE … … 18 20 INTEGER, PARAMETER :: nf90_format = nf90_float 19 21 #endif 20 END MODULE lmdz_netcdf_format 22 23 #ifdef CPP_PHYS 24 LOGICAL, PARAMETER :: CPPKEY_PHYS = .TRUE. 25 #else 26 LOGICAL, PARAMETER :: CPPKEY_PHYS = .FALSE. 27 #endif 28 29 END MODULE lmdz_cppkeys_wrapper -
LMDZ6/branches/Amaury_dev/libf/misc/write_field.F90
r5088 r5090 2 2 USE netcdf, ONLY: nf90_sync, nf90_put_var, nf90_enddef, nf90_def_dim, nf90_unlimited, & 3 3 nf90_clobber, nf90_create, nf90_def_var 4 USE lmdz_ netcdf_format, ONLY: nf90_format4 USE lmdz_cppkeys_wrapper, ONLY: nf90_format 5 5 6 6 implicit none
Note: See TracChangeset
for help on using the changeset viewer.