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
57d0e96b
Commit
57d0e96b
authored
Aug 01, 2016
by
Uwe Schulzweida
Browse files
Renamed CHUNK_XXX to CDI_CHUNK_XXX.
parent
ea0d9f63
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cdf_write.c
View file @
57d0e96b
...
...
@@ -411,7 +411,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
}
else
if
(
dimorder
[
id
]
==
2
&&
yid
!=
UNDEFID
)
{
if
(
chunktype
==
CHUNK_LINES
)
if
(
chunktype
==
CDI_
CHUNK_LINES
)
chunks
[
ndims
]
=
1
;
else
chunks
[
ndims
]
=
ysize
;
...
...
@@ -517,7 +517,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
#if defined (HAVE_NETCDF4)
if
(
lchunk
&&
(
streamptr
->
filetype
==
FILETYPE_NC4
||
streamptr
->
filetype
==
FILETYPE_NC4C
)
)
{
if
(
chunktype
==
CHUNK_AUTO
)
if
(
chunktype
==
CDI_
CHUNK_AUTO
)
retval
=
nc_def_var_chunking
(
fileID
,
ncvarid
,
NC_CHUNKED
,
NULL
);
else
retval
=
nc_def_var_chunking
(
fileID
,
ncvarid
,
NC_CHUNKED
,
chunks
);
...
...
src/cdi.h
View file @
57d0e96b
...
...
@@ -120,9 +120,9 @@ extern "C" {
/* Chunks */
#define CHUNK_AUTO
1
/* use default chunk size */
#define CHUNK_GRID
2
#define CHUNK_LINES
3
#define
CDI_
CHUNK_AUTO 1
/* use default chunk size */
#define
CDI_
CHUNK_GRID 2
#define
CDI_
CHUNK_LINES 3
/* GRID types */
...
...
src/cdi_int.c
View file @
57d0e96b
...
...
@@ -28,7 +28,7 @@ int cdiDefaultModelID = CDI_UNDEFID;
int
cdiDefaultTableID
=
CDI_UNDEFID
;
//int cdiNcMissingValue = CDI_UNDEFID;
int
cdiNcChunksizehint
=
CDI_UNDEFID
;
int
cdiChunkType
=
CHUNK_GRID
;
int
cdiChunkType
=
CDI_
CHUNK_GRID
;
int
cdiSplitLtype105
=
CDI_UNDEFID
;
int
cdiIgnoreAttCoordinates
=
FALSE
;
...
...
@@ -237,9 +237,9 @@ void cdiSetChunk(const char *chunkAlgo)
//size_t len = strlen(chunkAlgo);
int
algo
=
-
1
;
if
(
strcmp
(
"auto"
,
chunkAlgo
)
==
0
)
algo
=
CHUNK_AUTO
;
else
if
(
strcmp
(
"grid"
,
chunkAlgo
)
==
0
)
algo
=
CHUNK_GRID
;
else
if
(
strcmp
(
"lines"
,
chunkAlgo
)
==
0
)
algo
=
CHUNK_LINES
;
if
(
strcmp
(
"auto"
,
chunkAlgo
)
==
0
)
algo
=
CDI_
CHUNK_AUTO
;
else
if
(
strcmp
(
"grid"
,
chunkAlgo
)
==
0
)
algo
=
CDI_
CHUNK_GRID
;
else
if
(
strcmp
(
"lines"
,
chunkAlgo
)
==
0
)
algo
=
CDI_
CHUNK_LINES
;
/*
else if ( (pch = strstr(chunkAlgo,"x")) != 0 )
{
...
...
src/stream_cdf_i.c
View file @
57d0e96b
...
...
@@ -1909,20 +1909,20 @@ void grid_set_chunktype(grid_t *grid, ncvar_t *ncvar)
if
(
grid
->
type
==
GRID_UNSTRUCTURED
)
{
if
(
ncvar
->
chunks
[
ndims
-
1
]
==
grid
->
size
)
ncvar
->
chunktype
=
CHUNK_GRID
;
ncvar
->
chunktype
=
CDI_
CHUNK_GRID
;
else
ncvar
->
chunktype
=
CHUNK_AUTO
;
ncvar
->
chunktype
=
CDI_
CHUNK_AUTO
;
}
else
{
if
(
grid
->
x
.
size
>
1
&&
grid
->
y
.
size
>
1
&&
ndims
>
1
&&
grid
->
x
.
size
==
ncvar
->
chunks
[
ndims
-
1
]
&&
grid
->
y
.
size
==
ncvar
->
chunks
[
ndims
-
2
]
)
ncvar
->
chunktype
=
CHUNK_GRID
;
ncvar
->
chunktype
=
CDI_
CHUNK_GRID
;
else
if
(
grid
->
x
.
size
>
1
&&
grid
->
x
.
size
==
ncvar
->
chunks
[
ndims
-
1
]
)
ncvar
->
chunktype
=
CHUNK_LINES
;
ncvar
->
chunktype
=
CDI_
CHUNK_LINES
;
else
ncvar
->
chunktype
=
CHUNK_AUTO
;
ncvar
->
chunktype
=
CDI_
CHUNK_AUTO
;
}
}
}
...
...
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