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
727734ba
Commit
727734ba
authored
Aug 12, 2019
by
Uwe Schulzweida
Browse files
NetCDF4: set chunk size max to 1073741823 (bug fix).
parent
13b1d094
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
727734ba
...
...
@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.4
* Version 1.9.8 released
2019-08-12 Uwe Schulzweida
* NetCDF4: set chunk size max to 1073741823 (bug fix)
2019-08-01 Uwe Schulzweida
* grbGetGridtype: return changed gridID (bug fix) [report: Florian Prill]
...
...
src/cdf_write.c
View file @
727734ba
...
...
@@ -521,10 +521,11 @@ int cdfDefineDimsAndChunks(const stream_t *streamptr, int varID, int xid, int yi
}
int
chunktype
=
vlistInqVarChunkType
(
vlistID
,
varID
);
size_t
chunk_size_max
=
65536
;
if
(
chunktype
!=
CDI_CHUNK_LINES
&&
gridsize
>
INT32_MAX
)
const
size_t
chunk_size_max
=
65536
;
const
size_t
chunk_size_lim
=
1073741823
;
if
(
chunktype
!=
CDI_CHUNK_LINES
&&
gridsize
>
chunk_size_lim
)
{
if
(
CDI_Debug
)
fprintf
(
stderr
,
"gridsize > %
d
, changed chunktype to CDI_CHUNK_LINES!
\n
"
,
INT32_MAX
);
if
(
CDI_Debug
)
fprintf
(
stderr
,
"gridsize > %
zu
, changed chunktype to CDI_CHUNK_LINES!
\n
"
,
chunk_size_lim
);
chunktype
=
CDI_CHUNK_LINES
;
}
...
...
@@ -551,7 +552,7 @@ int cdfDefineDimsAndChunks(const stream_t *streamptr, int varID, int xid, int yi
if
(
chunktype
==
CDI_CHUNK_AUTO
&&
yid
==
CDI_UNDEFID
)
chunks
[
ndims
]
=
(
chunk_size_max
>
xsize
)
?
xsize
:
chunk_size_max
;
else
chunks
[
ndims
]
=
(
xsize
>
INT32_MAX
)
?
INT32_MAX
:
xsize
;
chunks
[
ndims
]
=
(
xsize
>
chunk_size_lim
)
?
chunk_size_lim
:
xsize
;
dims
[
ndims
]
=
xid
;
ndims
++
;
}
...
...
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