Commit 9d515404 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix memory layout of grid struct.

parent 5fd9cafa
......@@ -4045,13 +4045,13 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->prec = intBuffer[2];
gridP->lcc_projflag = intBuffer[3];
gridP->lcc_scanflag = intBuffer[4];
gridP->lcc_defined = intBuffer[5];
gridP->lcc2_defined = intBuffer[6];
gridP->lcc_defined = (short)intBuffer[5];
gridP->lcc2_defined = (short)intBuffer[6];
gridP->laea_defined = intBuffer[7];
gridP->isCyclic = intBuffer[8];
gridP->isRotated = intBuffer[9];
gridP->xdef = intBuffer[10];
gridP->ydef = intBuffer[11];
gridP->isCyclic = (short)intBuffer[8];
gridP->isRotated = (short)intBuffer[9];
gridP->xdef = (short)intBuffer[10];
gridP->ydef = (short)intBuffer[11];
gridP->nd = intBuffer[12];
gridP->ni = intBuffer[13];
gridP->ni2 = intBuffer[14];
......
......@@ -29,28 +29,28 @@ typedef struct {
double lcc_yinc;
int lcc_projflag;
int lcc_scanflag;
int lcc_defined;
short lcc_defined;
short lcc2_defined;
int laea_defined;
double lcc2_lon_0; /* Lambert Conformal Conic 2 */
double lcc2_lat_0;
double lcc2_lat_1;
double lcc2_lat_2;
double lcc2_a;
int lcc2_defined;
double laea_lon_0; /* Lambert Azimuthal Equal Area */
double laea_lat_0;
double laea_a;
int laea_defined;
double xpole, ypole, angle; /* rotated north pole */
int isCyclic; /* TRUE for global cyclic grids */
int isRotated; /* TRUE for rotated grids */
int xdef; /* 0: undefined 1:xvals 2:x0+xinc */
int ydef; /* 0: undefined 1:yvals 2:y0+yinc */
short isCyclic; /* TRUE for global cyclic grids */
short isRotated; /* TRUE for rotated grids */
short xdef; /* 0: undefined 1:xvals 2:x0+xinc */
short ydef; /* 0: undefined 1:yvals 2:y0+yinc */
int nd, ni, ni2, ni3; /* parameter for GRID_GME */
int number, position; /* parameter for GRID_REFERENCE */
char *reference;
unsigned char uuid[CDI_UUID_SIZE]; /* uuid for grid reference */
int trunc; /* parameter for GRID_SPECTEAL */
int nvertex;
char *reference;
unsigned char uuid[CDI_UUID_SIZE]; /* uuid for grid reference */
int *rowlon;
int nrowlon;
int size;
......
Supports Markdown
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