Skip to content

Commit 91ac516

Browse files
committed
correct error messages, quiet pkg-config
1 parent c56030b commit 91ac516

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
build/
1+
build*/
22

33
# Prerequisites
44
*.d

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if(NOT CMAKE_BUILD_TYPE)
44
endif()
55
project(nc4fortran
66
LANGUAGES Fortran
7-
VERSION 0.4.1
7+
VERSION 0.4.2
88
DESCRIPTION "thin, light, easy NetCDF4 Fortran interface"
99
HOMEPAGE_URL https://github.com/scivision/nc4fortran)
1010
enable_testing()

cmake/Modules/FindNetCDF.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
function(netcdf_c)
55

6-
pkg_check_modules(NC netcdf) # C / CXX
6+
pkg_check_modules(NC netcdf QUIET) # C / CXX
77

88
find_path(NetCDF_INCLUDE_DIR
99
NAMES netcdf.h
@@ -36,9 +36,9 @@ if(NOT CMAKE_Fortran_COMPILER)
3636
return()
3737
endif()
3838

39-
pkg_check_modules(NC netcdf-fortran)
39+
pkg_check_modules(NC netcdf-fortran QUIET)
4040
if(NOT NC_FOUND) # homebrew
41-
pkg_check_modules(NC netcdf)
41+
pkg_check_modules(NC netcdf QUIET)
4242
endif()
4343

4444
find_path(NetCDF_Fortran_INCLUDE_DIR

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('nc4fortran', 'fortran',
22
meson_version : '>=0.52.0',
3-
version: '0.4.1',
3+
version: '0.4.2',
44
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])
55

66
subdir('meson')

src/interface.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,22 +278,24 @@ logical function check_error(code, dname)
278278
select case (code)
279279
case (NF90_NOERR)
280280
check_error = .false.
281+
case (NF90_EHDFERR)
282+
m = 'ERROR: ' // dname // ' an error was reported by the HDF5 layer.'
281283
case (NF90_EBADNAME)
282-
m = 'ERROR: ' // dname // ' is the name of another existing variable'
284+
m = 'ERROR: ' // dname // ' Name contains illegal characters.'
283285
case (NF90_EBADTYPE)
284286
m = 'ERROR: ' // dname // ' specified type is not a valid netCDF type'
285287
case (NF90_EBADDIM)
286288
m = 'ERROR: ' // dname // ' invalid dimension ID or Name'
287289
case (NF90_EBADGRPID)
288290
m = 'ERROR: ' // dname // ' bad group ID in ncid'
289291
case (NF90_EBADID)
290-
m = 'ERROR: ' // dname // ' type ID not found'
292+
m = 'ERROR: ' // dname // ' Bad group id or ncid invalid'
291293
case (NF90_ENOTVAR)
292294
m = 'ERROR: ' // dname // ' variable not found'
293295
case (NF90_ENOTNC)
294296
m = 'ERROR: ' // dname // ' not a NetCDF file'
295297
case (NF90_ENAMEINUSE)
296-
m = 'ERROR: ' // dname // ' string match to name in use'
298+
m = 'ERROR: ' // dname // ' That name is in use. Compound type names must be unique in the data file.'
297299
case (NF90_ECHAR)
298300
m = 'ERROR: ' // dname // ' attempt to convert between text & numbers'
299301
case (NF90_EEDGE)

0 commit comments

Comments
 (0)