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
4037990e
Commit
4037990e
authored
Jul 18, 2008
by
Uwe Schulzweida
Browse files
grbDefGrid: set increment for zonal means
parent
dd859362
Changes
6
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4037990e
...
...
@@ -6,6 +6,7 @@
* streamClose: use taxisDestroy to release memory
* cdfInqContents: skip time variable with type = NC_CHAR
* grbDefGrid: add warning for curvilinear grids
* grbDefGrid: set increment for zonal means [request: Helmut P. Frank]
* ptaxisCopy: don't overwrite item 'self' (bug fix)
* DBL_IS_EQUAL: check NaN with isnan
* Version 1.2.0 released
...
...
app/cdi.c
View file @
4037990e
...
...
@@ -497,10 +497,12 @@ static void printShortinfo(int streamID, int vlistID, int vardis)
else
if
(
prec
>
0
&&
prec
<=
32
)
sprintf
(
pstr
,
"P%d"
,
prec
);
else
if
(
prec
==
DATATYPE_FLT32
)
strcpy
(
pstr
,
"F32"
);
else
if
(
prec
==
DATATYPE_FLT64
)
strcpy
(
pstr
,
"F64"
);
else
if
(
prec
==
DATATYPE_UINT8
)
strcpy
(
pstr
,
"U8"
);
else
if
(
prec
==
DATATYPE_INT8
)
strcpy
(
pstr
,
"I8"
);
else
if
(
prec
==
DATATYPE_INT16
)
strcpy
(
pstr
,
"I16"
);
else
if
(
prec
==
DATATYPE_INT32
)
strcpy
(
pstr
,
"I32"
);
else
if
(
prec
==
DATATYPE_UINT8
)
strcpy
(
pstr
,
"U8"
);
else
if
(
prec
==
DATATYPE_UINT16
)
strcpy
(
pstr
,
"U16"
);
else
if
(
prec
==
DATATYPE_UINT32
)
strcpy
(
pstr
,
"U32"
);
else
strcpy
(
pstr
,
"-1"
);
fprintf
(
stdout
,
" %-3s"
,
pstr
);
...
...
src/cdi.h
View file @
4037990e
...
...
@@ -85,6 +85,8 @@ extern "C" {
#define DATATYPE_INT16 216
#define DATATYPE_INT32 232
#define DATATYPE_UINT8 308
#define DATATYPE_UINT16 316
#define DATATYPE_UINT32 332
/* internal data types */
...
...
@@ -570,7 +572,7 @@ int gridToCurvilinear(int gridID);
/* ZAXIS routines */
void
zaxisName
(
int
zaxistype
,
char
*
grid
name
);
void
zaxisName
(
int
zaxistype
,
char
*
zaxis
name
);
/* zaxisCreate: Create a vertical Z-axis */
int
zaxisCreate
(
int
zaxistype
,
int
size
);
...
...
src/dmemory.c
View file @
4037990e
...
...
@@ -15,7 +15,7 @@
/*
# if defined (__sun) || defined (__i386) || defined (__ia64) || defined (SX)
*/
# if defined
(__i386) || defined
(__ia64) || defined (SX)
# if defined (__ia64) || defined (SX)
# define HAVE_MALLOC_H
# endif
#endif
...
...
src/stream_cdf.c
View file @
4037990e
...
...
@@ -305,9 +305,11 @@ int cdfDefDatatype(int datatype)
int
xtype
;
if
(
datatype
==
DATATYPE_INT8
)
xtype
=
NC_BYTE
;
/*
else if ( datatype == DATATYPE_UINT8 ) xtype = NC_
CHAR; */
else
if
(
datatype
==
DATATYPE_UINT8
)
xtype
=
NC_
SHORT
;
else
if
(
datatype
==
DATATYPE_INT16
)
xtype
=
NC_SHORT
;
else
if
(
datatype
==
DATATYPE_UINT16
)
xtype
=
NC_INT
;
else
if
(
datatype
==
DATATYPE_INT32
)
xtype
=
NC_INT
;
else
if
(
datatype
==
DATATYPE_UINT32
)
xtype
=
NC_INT
;
else
if
(
datatype
==
DATATYPE_FLT64
)
xtype
=
NC_DOUBLE
;
else
xtype
=
NC_FLOAT
;
...
...
src/stream_grb.c
View file @
4037990e
...
...
@@ -1915,6 +1915,12 @@ void grbDefGrid(int *isec1, int *isec2, int gridID)
if
(
ISEC2_LatIncr
<
0
)
ISEC2_LatIncr
=
-
ISEC2_LatIncr
;
}
if
(
ISEC2_NumLon
>
1
&&
ISEC2_NumLat
==
1
)
if
(
ISEC2_LonIncr
!=
0
&&
ISEC2_LatIncr
==
0
)
ISEC2_LatIncr
=
ISEC2_LonIncr
;
if
(
ISEC2_NumLon
==
1
&&
ISEC2_NumLat
>
1
)
if
(
ISEC2_LonIncr
==
0
&&
ISEC2_LatIncr
!=
0
)
ISEC2_LonIncr
=
ISEC2_LatIncr
;
if
(
ISEC2_LatIncr
==
0
||
ISEC2_LonIncr
==
0
)
ISEC2_ResFlag
=
0
;
else
...
...
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