Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
4064a2f8
Commit
4064a2f8
authored
Apr 18, 2008
by
Uwe Schulzweida
Browse files
No commit message
No commit message
parent
636dd33c
Changes
15
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4064a2f8
2008-08-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* add support for netCDF4 classic with deflate
* Version 1.
1.2
released
* add support for netCDF4 classic with deflate
option
* Version 1.
2.0
released
2008-04-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
configure
View file @
4064a2f8
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for cdi 1.
1.2
.
# Generated by GNU Autoconf 2.61 for cdi 1.
2.0
.
#
# Report bugs to <Uwe.Schulzweida@zmaw.de>.
#
...
...
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME
=
'cdi'
PACKAGE_TARNAME
=
'cdi'
PACKAGE_VERSION
=
'1.
1.2
'
PACKAGE_STRING
=
'cdi 1.
1.2
'
PACKAGE_VERSION
=
'1.
2.0
'
PACKAGE_STRING
=
'cdi 1.
2.0
'
PACKAGE_BUGREPORT
=
'Uwe.Schulzweida@zmaw.de'
# Factoring default headers for most tests.
...
...
@@ -1230,7 +1230,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat
<<
_ACEOF
\`
configure' configures cdi 1.
1.2
to adapt to many kinds of systems.
\`
configure' configures cdi 1.
2.0
to adapt to many kinds of systems.
Usage:
$0
[OPTION]... [VAR=VALUE]...
...
...
@@ -1301,7 +1301,7 @@ fi
if
test
-n
"
$ac_init_help
"
;
then
case
$ac_init_help
in
short
|
recursive
)
echo
"Configuration of cdi 1.
1.2
:"
;;
short
|
recursive
)
echo
"Configuration of cdi 1.
2.0
:"
;;
esac
cat
<<
\
_ACEOF
...
...
@@ -1406,7 +1406,7 @@ fi
test
-n
"
$ac_init_help
"
&&
exit
$ac_status
if
$ac_init_version
;
then
cat
<<
\
_ACEOF
cdi configure 1.
1.2
cdi configure 1.
2.0
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
...
...
@@ -1420,7 +1420,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cdi
$as_me
1.
1.2
, which was
It was created by cdi
$as_me
1.
2.0
, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0
$@
...
...
@@ -2245,7 +2245,7 @@ fi
# Define the identity of the package.
PACKAGE
=
'cdi'
VERSION
=
'1.
1.2
'
VERSION
=
'1.
2.0
'
cat
>>
confdefs.h
<<
_ACEOF
...
...
@@ -6820,7 +6820,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by cdi
$as_me
1.
1.2
, which was
This file was extended by cdi
$as_me
1.
2.0
, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES =
$CONFIG_FILES
...
...
@@ -6873,7 +6873,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat
>>
$CONFIG_STATUS
<<
_ACEOF
ac_cs_version="
\\
cdi config.status 1.
1.2
cdi config.status 1.
2.0
configured by
$0
, generated by GNU Autoconf 2.61,
with options
\\
"`echo "
$ac_configure_args
" | sed 's/^ //; s/[
\\
""
\`\$
]/
\\\\
&/g'`
\\
"
...
...
configure.ac
View file @
4064a2f8
# Process this file with autoconf to produce a configure script.
AC_INIT(cdi, 1.
1.2
, Uwe.Schulzweida@zmaw.de)
AC_INIT(cdi, 1.
2.0
, Uwe.Schulzweida@zmaw.de)
CONFIG_ABORT=yes
...
...
doc/tex/c_stream.tex
View file @
4064a2f8
...
...
@@ -18,7 +18,8 @@ The name of the new dataset
\item
[{\tt filetype}]
The type of the file format, one of the set of predefined
{
\CDI
}
file format types.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
NC4
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
\end{deflist}
\end{minipage}
...
...
@@ -168,8 +169,8 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}
{
\tt
streamInqFiletype
}
returns the type of the file format,
one of the set of predefined
{
\CDI
}
file format types.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC
2
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
NC
4
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
...
...
doc/tex/cdi_cman.tex
View file @
4064a2f8
...
...
@@ -124,7 +124,7 @@
\end{picture}
\begin{flushright}
\large\bf
{
Climate Data Interface
\\
Version 1.
1.1
\\
A
pril
2008
}
\large\bf
{
Climate Data Interface
\\
Version 1.
2.0
\\
A
ugust
2008
}
\end{flushright}
\vfill
...
...
doc/tex/cdi_fman.tex
View file @
4064a2f8
...
...
@@ -123,7 +123,7 @@
\end{picture}
\begin{flushright}
\large\bf
{
Climate Data Interface
\\
Version 1.
1.1
\\
A
pril
2008
}
\large\bf
{
Climate Data Interface
\\
Version 1.
2.0
\\
A
ugust
2008
}
\end{flushright}
\vfill
...
...
doc/tex/dataset.tex
View file @
4064a2f8
...
...
@@ -7,7 +7,8 @@ with one of the following predefined file format types:
\begin{deflist}
{{
\large\tt
FILETYPE
\_
GRB
\ \
}}
\item
[{\large\tt FILETYPE\_GRB}]
File type GRIB version 1
\item
[{\large\tt FILETYPE\_NC }]
File type netCDF
\item
[{\large\tt FILETYPE\_NC2}]
File type netCDF version 2
\item
[{\large\tt FILETYPE\_NC2}]
File type netCDF version 2 (64-bit)
\item
[{\large\tt FILETYPE\_NC4}]
File type netCDF-4 classic (HDF5)
\item
[{\large\tt FILETYPE\_SRV}]
File type SERVICE
\item
[{\large\tt FILETYPE\_EXT}]
File type EXTRA
\item
[{\large\tt FILETYPE\_IEG}]
File type IEG
...
...
doc/tex/f_stream.tex
View file @
4064a2f8
...
...
@@ -18,7 +18,8 @@ The name of the new dataset
\item
[{\tt filetype}]
The type of the file format, one of the set of predefined
{
\CDI
}
file format types.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
NC4
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
\end{deflist}
\end{minipage}
...
...
@@ -168,8 +169,8 @@ Stream ID, from a previous call to {\htmlref{\tt streamOpenRead}{streamOpenRead}
{
\tt
streamInqFiletype
}
returns the type of the file format,
one of the set of predefined
{
\CDI
}
file format types.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC
2
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
The valid
{
\CDI
}
file format types are
{
\tt
FILETYPE
\_
GRB
}
,
{
\tt
FILETYPE
\_
NC
}
,
{
\tt
FILETYPE
\_
NC2
}
,
{
\tt
FILETYPE
\_
NC
4
}
,
{
\tt
FILETYPE
\_
SRV
}
,
{
\tt
FILETYPE
\_
EXT
}
and
{
\tt
FILETYPE
\_
IEG
}
.
...
...
src/cdf.c
View file @
4064a2f8
...
...
@@ -23,6 +23,24 @@ const char *cdfLibraryVersion(void)
#endif
}
int
H5get_libversion
(
unsigned
*
majnum
,
unsigned
*
minnum
,
unsigned
*
relnum
);
const
char
*
hdfLibraryVersion
(
void
)
{
#if defined (HAVE_LIBNETCDF) && defined(NC_NETCDF4)
static
char
hdf_libvers
[
256
];
unsigned
majnum
,
minnum
,
relnum
;
(
void
)
H5get_libversion
(
&
majnum
,
&
minnum
,
&
relnum
);
sprintf
(
hdf_libvers
,
"%u.%u.%u"
,
majnum
,
minnum
,
relnum
);
return
(
hdf_libvers
);
#else
return
(
NULL
);
#endif
}
int
CDF_Debug
=
0
;
/* If set to 1, debugging */
...
...
@@ -71,6 +89,7 @@ int cdfOpenFile(const char *filename, const char *mode, int version)
#if defined (HAVE_LIBNETCDF)
int
fmode
;
int
writemode
=
NC_CLOBBER
;
int
status
;
if
(
filename
==
NULL
)
ncid
=
CDI_EINVAL
;
...
...
@@ -81,7 +100,8 @@ int cdfOpenFile(const char *filename, const char *mode, int version)
case
'r'
:
case
'R'
:
fmode
=
'r'
;
cdf_open
(
filename
,
NC_NOWRITE
,
&
ncid
);
status
=
cdf_open
(
filename
,
NC_NOWRITE
,
&
ncid
);
if
(
status
>
0
&&
ncid
<
0
)
ncid
=
CDI_ESYSTEM
;
break
;
case
'w'
:
case
'W'
:
...
...
src/cdf.h
View file @
4064a2f8
...
...
@@ -4,6 +4,7 @@
void
cdfDebug
(
int
debug
);
const
char
*
cdfLibraryVersion
(
void
);
const
char
*
hdfLibraryVersion
(
void
);
int
cdfOpen
(
const
char
*
filename
,
const
char
*
mode
);
int
cdfOpen64
(
const
char
*
filename
,
const
char
*
mode
);
...
...
src/cdf_int.c
View file @
4064a2f8
...
...
@@ -72,10 +72,10 @@ void cdf_create(const char *path, int cmode, int *ncidp)
}
void
cdf_open
(
const
char
*
path
,
int
omode
,
int
*
ncidp
)
int
cdf_open
(
const
char
*
path
,
int
omode
,
int
*
ncidp
)
{
static
char
func
[]
=
"cdf_open"
;
int
status
;
int
status
=
0
;
int
dapfile
=
FALSE
;
struct
stat
filestat
;
size_t
chunksizehint
;
...
...
@@ -90,8 +90,7 @@ void cdf_open(const char *path, int omode, int *ncidp)
}
else
{
if
(
stat
(
path
,
&
filestat
)
!=
0
)
SysError
(
func
,
path
);
if
(
stat
(
path
,
&
filestat
)
!=
0
)
SysError
(
func
,
path
);
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
chunksizehint
=
(
size_t
)
filestat
.
st_blksize
*
4
;
...
...
@@ -102,15 +101,17 @@ void cdf_open(const char *path, int omode, int *ncidp)
status
=
nc__open
(
path
,
omode
,
&
chunksizehint
,
ncidp
);
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
if
(
CDF_Debug
/*
|| status != NC_NOERR
*/
)
Message
(
func
,
"chunksizehint %d"
,
chunksizehint
);
}
if
(
CDF_Debug
||
status
!=
NC_NOERR
)
if
(
CDF_Debug
/*
|| status != NC_NOERR
*/
)
Message
(
func
,
"ncid = %d mode = %d file = %s"
,
*
ncidp
,
omode
,
path
);
if
(
CDF_Debug
&&
status
!=
NC_NOERR
)
Message
(
func
,
"%s"
,
nc_strerror
(
status
));
return
(
status
);
}
...
...
src/cdf_int.h
View file @
4064a2f8
...
...
@@ -6,7 +6,7 @@
#include
"netcdf.h"
void
cdf_create
(
const
char
*
path
,
int
cmode
,
int
*
idp
);
void
cdf_open
(
const
char
*
path
,
int
omode
,
int
*
idp
);
int
cdf_open
(
const
char
*
path
,
int
omode
,
int
*
idp
);
void
cdf_close
(
int
ncid
);
void
cdf_redef
(
int
ncid
);
...
...
src/cdi.h
View file @
4064a2f8
...
...
@@ -29,7 +29,7 @@ extern "C" {
#define FILETYPE_GRB 1
/* File type GRIB */
#define FILETYPE_GB2 2
/* File type GRIB version 2 */
#define FILETYPE_NC 3
/* File type netCDF */
#define FILETYPE_NC2 4
/* File type netCDF version 2
*/
#define FILETYPE_NC2 4
/* File type netCDF version 2
(64-bit)
*/
#define FILETYPE_NC4 5
/* File type netCDF version 4 (classic) */
#define FILETYPE_SRV 6
/* File type SERVICE */
#define FILETYPE_EXT 7
/* File type EXTRA */
...
...
src/stream.c
View file @
4064a2f8
...
...
@@ -333,8 +333,8 @@ The function @func{streamInqFiletype} returns the filetype of a stream.
@Result
@func{streamInqFiletype} returns the type of the file format,
one of the set of predefined CDI file format types.
The valid CDI file format types are @func{FILETYPE_GRB}, @func{FILETYPE_NC},
@func{FILETYPE_NC
2
}, @func{FILETYPE_SRV}, @func{FILETYPE_EXT} and @func{FILETYPE_IEG}.
The valid CDI file format types are @func{FILETYPE_GRB}, @func{FILETYPE_NC},
@func{FILETYPE_NC2},
@func{FILETYPE_NC
4
}, @func{FILETYPE_SRV}, @func{FILETYPE_EXT} and @func{FILETYPE_IEG}.
@EndFunction
*/
...
...
@@ -1021,7 +1021,8 @@ int streamOpenAppend(const char *filename)
@Item path The name of the new dataset
@Item filetype The type of the file format, one of the set of predefined CDI file format types.
The valid CDI file format types are @func{FILETYPE_GRB}, @func{FILETYPE_NC},
@func{FILETYPE_NC2}, @func{FILETYPE_SRV}, @func{FILETYPE_EXT} and @func{FILETYPE_IEG}.
@func{FILETYPE_NC2}, @func{FILETYPE_NC4}, @func{FILETYPE_SRV},
@func{FILETYPE_EXT} and @func{FILETYPE_IEG}.
@Description
The function @func{streamOpenWrite} creates a new datset.
...
...
@@ -1818,6 +1819,8 @@ void cdiDefTableID(int tableID)
void
cdiPrintVersion
(
void
)
{
const
char
*
hdf_version
;
fprintf
(
stderr
,
" CDI library version : %s
\n
"
,
cdiLibraryVersion
());
#if defined (HAVE_LIBGRIB)
fprintf
(
stderr
,
" GRIB library version : %s
\n
"
,
gribLibraryVersion
());
...
...
@@ -1827,6 +1830,9 @@ void cdiPrintVersion(void)
fprintf
(
stderr
,
" nc_dap library version : %s
\n
"
,
cdfLibraryVersion
());
# else
fprintf
(
stderr
,
" netCDF library version : %s
\n
"
,
cdfLibraryVersion
());
hdf_version
=
hdfLibraryVersion
();
if
(
hdf_version
)
fprintf
(
stderr
,
" HDF5 library version : %s
\n
"
,
hdf_version
);
# endif
#endif
#if defined (HAVE_LIBSERVICE)
...
...
src/stream_cdf.c
View file @
4064a2f8
...
...
@@ -2257,10 +2257,11 @@ int cdfDefVar(int streamID, int varID)
cdf_def_var
(
fileID
,
name
,
(
nc_type
)
xtype
,
ndims
,
dims
,
&
ncvarid
);
#if defined (NC_NETCDF4)
if
((
retval
=
nc_def_var_chunking
(
fileID
,
ncvarid
,
0
,
chunks
)))
{
Error
(
func
,
"nc_def_var_chunking failed, status = %d"
,
retval
);
}
if
(
streamptr
->
filetype
==
FILETYPE_NC4
)
if
((
retval
=
nc_def_var_chunking
(
fileID
,
ncvarid
,
0
,
chunks
)))
{
Error
(
func
,
"nc_def_var_chunking failed, status = %d"
,
retval
);
}
#endif
if
(
streamptr
->
ztype
==
COMPRESS_ZIP
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment