Commit 4037990e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grbDefGrid: set increment for zonal means

parent dd859362
......@@ -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
......
......@@ -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);
......
......@@ -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 *gridname);
void zaxisName(int zaxistype, char *zaxisname);
/* zaxisCreate: Create a vertical Z-axis */
int zaxisCreate(int zaxistype, int size);
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment