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
d741b7a9
Commit
d741b7a9
authored
Dec 28, 2008
by
Uwe Schulzweida
Browse files
cdf_create: don't set chunksizehint
parent
e45c9153
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d741b7a9
...
...
@@ -3,6 +3,7 @@
* add support for GRID type SINUSOIDAL
* add support for GRID type LAEA
* add support of GRIB level type MEANSEA
* cdf_create: don't set chunksizehint (bug fix) [report: Luis Kornblueh]
* set default missval of INT8/16/32 to SCHAR_MIN/SHRT_MIN/INT_MIN
* move grid_lcc, grid_gme, grid_rot code to CDO
* move gridToCurvilinear and gridToCell code to CDO
...
...
src/cdf_int.c
View file @
d741b7a9
...
...
@@ -17,22 +17,23 @@ extern int CDF_Verbose;
extern
int
CDF_Debug
;
#if defined (HAVE_LIBNETCDF)
/*
#if ! defined (MIN_BUF_SIZE)
# define MIN_BUF_SIZE 131072L
#endif
static size_t ChunkSizeMin = MIN_BUF_SIZE;
*/
void
cdf_create
(
const
char
*
path
,
int
cmode
,
int
*
ncidp
)
{
static
char
func
[]
=
"cdf_create"
;
int
status
;
int
oldfill
;
s
truct
stat
filestat
;
size_t
initialsz
,
chunksizehint
=
0
;
s
ize_t
initialsz
=
0
,
chunksizehint
=
0
;
/*
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
struct stat filestat;
char basename[1024];
char *pend;
...
...
@@ -52,7 +53,10 @@ void cdf_create(const char *path, int cmode, int *ncidp)
#endif
if ( chunksizehint < ChunkSizeMin ) chunksizehint = ChunkSizeMin;
initialsz
=
0
;
*/
#if defined(__SX__) || defined(ES)
chunksizehint
=
16777216
;
/* 16 MB */
#endif
status
=
nc__create
(
path
,
cmode
,
initialsz
,
&
chunksizehint
,
ncidp
);
...
...
@@ -78,7 +82,7 @@ int cdf_open(const char *path, int omode, int *ncidp)
int
status
=
0
;
int
dapfile
=
FALSE
;
struct
stat
filestat
;
size_t
chunksizehint
;
size_t
chunksizehint
=
0
;
#if defined (HAVE_LIBNC_DAP)
if
(
strncmp
(
path
,
"http:"
,
5
)
==
0
)
dapfile
=
TRUE
;
...
...
@@ -94,18 +98,17 @@ int cdf_open(const char *path, int omode, int *ncidp)
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
chunksizehint
=
(
size_t
)
filestat
.
st_blksize
*
4
;
#else
chunksizehint
=
(
size_t
)
4096
*
4
;
#endif
/*
if ( chunksizehint < ChunkSizeMin ) chunksizehint = ChunkSizeMin;
*/
status
=
nc__open
(
path
,
omode
,
&
chunksizehint
,
ncidp
);
if
(
CDF_Debug
/* || status != NC_NOERR */
)
if
(
CDF_Debug
)
Message
(
func
,
"chunksizehint %d"
,
chunksizehint
);
}
if
(
CDF_Debug
/* || status != NC_NOERR */
)
if
(
CDF_Debug
)
Message
(
func
,
"ncid = %d mode = %d file = %s"
,
*
ncidp
,
omode
,
path
);
if
(
CDF_Debug
&&
status
!=
NC_NOERR
)
...
...
src/vlist.c
View file @
d741b7a9
...
...
@@ -653,6 +653,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
for
(
levID
=
0
;
levID
<
nlevs
;
levID
++
)
if
(
vlistptr1
->
vars
[
varID
].
levinfo
[
levID
].
flag
)
{
vlistptr1
->
vars
[
varID
].
levinfo
[
levID
].
mlevelID
=
levID2
;
vlistptr1
->
vars
[
varID
].
levinfo
[
levID
].
flevelID
=
levID2
;
levels
[
levID2
++
]
=
zaxisInqLevel
(
zaxisID
,
levID
);
}
...
...
src/vlist.h
View file @
d741b7a9
...
...
@@ -33,6 +33,7 @@ typedef struct
{
int
flag
;
int
index
;
int
mlevelID
;
int
flevelID
;
}
LEVINFO
;
...
...
@@ -43,6 +44,7 @@ typedef struct
int
flag
;
int
nlevs
;
int
isUsed
;
int
mvarID
;
int
fvarID
;
int
code
;
int
gridID
;
...
...
src/vlist_var.c
View file @
d741b7a9
...
...
@@ -16,6 +16,7 @@ static void vlistvarInitEntry(int vlistID, int varID)
vlistptr
=
vlist_to_pointer
(
vlistID
);
vlistptr
->
vars
[
varID
].
mvarID
=
varID
;
vlistptr
->
vars
[
varID
].
fvarID
=
varID
;
vlistptr
->
vars
[
varID
].
flag
=
0
;
vlistptr
->
vars
[
varID
].
code
=
0
;
...
...
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