Commit 1183ed62 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexlib update

parent 23b15b38
/* Automatically generated by m214003 at 2014-02-26, do not edit */ /* Automatically generated by m214003 at 2014-03-28, do not edit */
/* CGRIBEXLIB_VERSION="1.6.4" */ /* CGRIBEXLIB_VERSION="1.6.4" */
...@@ -3082,7 +3082,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3, ...@@ -3082,7 +3082,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
fsec3dp[1] = fsec3sp[1]; fsec3dp[1] = fsec3sp[1];
inum = isec4[0]; inum = isec4[0];
fsec4dp = malloc(inum*sizeof(double)); fsec4dp = (double*) malloc(inum*sizeof(double));
if ( fsec4dp == NULL ) SysError("No Memory!"); if ( fsec4dp == NULL ) SysError("No Memory!");
for ( j = 0; j < inum; j++ ) fsec4dp[j] = fsec4sp[j]; for ( j = 0; j < inum; j++ ) fsec4dp[j] = fsec4sp[j];
...@@ -3095,7 +3095,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3, ...@@ -3095,7 +3095,7 @@ gribExSP(int *isec0, int *isec1, int *isec2, float *fsec2sp, int *isec3,
} }
else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' ) else if ( yfunc == 'D' || yfunc == 'J' || yfunc == 'R' )
{ {
fsec4dp = malloc(klenp*sizeof(double)); fsec4dp = (double*) malloc(klenp*sizeof(double));
if ( fsec4dp == NULL ) SysError("No Memory!"); if ( fsec4dp == NULL ) SysError("No Memory!");
for ( j = 0; j < 10; j++ ) fsec2dp[j] = 0.0; for ( j = 0; j < 10; j++ ) fsec2dp[j] = 0.0;
...@@ -4413,7 +4413,7 @@ void gribPrintSec2SP(int *isec0, int *isec2, float *fsec2sp) ...@@ -4413,7 +4413,7 @@ void gribPrintSec2SP(int *isec0, int *isec2, float *fsec2sp)
inum = 10 + isec2[11]; inum = 10 + isec2[11];
fsec2 = malloc(inum*sizeof(double)); fsec2 = (double*) malloc(inum*sizeof(double));
if ( fsec2 == NULL ) SysError("No Memory!"); if ( fsec2 == NULL ) SysError("No Memory!");
for ( j = 0; j < inum; j++ ) for ( j = 0; j < inum; j++ )
...@@ -6113,7 +6113,7 @@ int decodeGDS(unsigned char *gds, int *isec0, int *isec2, double *fsec2, int *n ...@@ -6113,7 +6113,7 @@ int decodeGDS(unsigned char *gds, int *isec0, int *isec2, double *fsec2, int *n
} }
#if defined (SX) #if defined (SX)
lGribLen = 4*ISEC2_NumVCP; lGribLen = 4*ISEC2_NumVCP;
lgrib = malloc(lGribLen*sizeof(GRIBPACK)); lgrib = (GRIBPACK*) malloc(lGribLen*sizeof(GRIBPACK));
igrib = &gds[locnv]; igrib = &gds[locnv];
if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L); if ( ISEC2_NumVCP > 0 ) (void) UNPACK_GRIB(igrib, lgrib, lGribLen, -1L);
...@@ -6657,7 +6657,7 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3, ...@@ -6657,7 +6657,7 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
} }
*/ */
imask = malloc(imaskSize*sizeof(GRIBPACK)); imask = (GRIBPACK*) malloc(imaskSize*sizeof(GRIBPACK));
#if defined (VECTORCODE) #if defined (VECTORCODE)
(void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L); (void) UNPACK_GRIB(BMS_Bitmap, imask, imaskSize/8, -1L);
...@@ -7327,14 +7327,14 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long ...@@ -7327,14 +7327,14 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long
range = (double) (ismax - ismin +1); range = (double) (ismax - ismin +1);
weights = malloc((ismax+1)*sizeof(double)); weights = (double*) malloc((ismax+1)*sizeof(double));
for( loop = ismin; loop <= ismax; loop++ ) for( loop = ismin; loop <= ismax; loop++ )
weights[loop] = range / (double) (loop-ismin+1); weights[loop] = range / (double) (loop-ismin+1);
/* /*
// Compute norms // Compute norms
// Handle values 2 at a time (real and imaginary parts). // Handle values 2 at a time (real and imaginary parts).
*/ */
norms = malloc((ismax+1)*sizeof(double)); norms = (double*) malloc((ismax+1)*sizeof(double));
for( loop = 0; loop < ismax+1; loop++ ) norms[loop] = 0.0; for( loop = 0; loop < ismax+1; loop++ ) norms[loop] = 0.0;
/* /*
...@@ -7422,7 +7422,7 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long ...@@ -7422,7 +7422,7 @@ double calculate_pfactor(const double* spectralField, long fieldTruncation, long
void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv) void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
{ {
double power; double power;
double *scale = malloc((trunc+1)*sizeof(double)); double *scale = (double*) malloc((trunc+1)*sizeof(double));
int n, m; int n, m;
int index; int index;
...@@ -7481,7 +7481,7 @@ void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv) ...@@ -7481,7 +7481,7 @@ void scaleComplex(double *fpdata, int pcStart, int pcScale, int trunc, int inv)
void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp) void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
{ {
double *fphelp = malloc(nsp*sizeof(double)); double *fphelp = (double*) malloc(nsp*sizeof(double));
int m, n; int m, n;
int index, inext; int index, inext;
...@@ -7520,7 +7520,7 @@ void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp) ...@@ -7520,7 +7520,7 @@ void scatterComplex(double *fpdata, int pcStart, int trunc, int nsp)
void gatherComplex(double *fpdata, int pcStart, int trunc, int nsp) void gatherComplex(double *fpdata, int pcStart, int trunc, int nsp)
{ {
double *fphelp = malloc(nsp*sizeof(double)); double *fphelp = (double*) malloc(nsp*sizeof(double));
int m, n; int m, n;
int index, inext; int index, inext;
...@@ -8030,10 +8030,10 @@ int qu2reg2(double *pfield, int *kpoint, int klat, int klon, ...@@ -8030,10 +8030,10 @@ int qu2reg2(double *pfield, int *kpoint, int klat, int klon,
int iregno, iquano, j210, j220, j230, j240, j225; int iregno, iquano, j210, j220, j230, j240, j225;
zline = malloc(2*klon*sizeof(double)); zline = (double*) malloc(2*klon*sizeof(double));
if ( zline == NULL ) SysError("No Memory!"); if ( zline == NULL ) SysError("No Memory!");
zwork = malloc(3*(2*klon+3)*sizeof(double)); zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
if ( zwork == NULL ) SysError("No Memory!"); if ( zwork == NULL ) SysError("No Memory!");
/* Parameter adjustments */ /* Parameter adjustments */
...@@ -8287,13 +8287,13 @@ C ...@@ -8287,13 +8287,13 @@ C
double *zwork = NULL; double *zwork = NULL;
int iregno, iquano, j210, j220, j230, j240, j225; int iregno, iquano, j210, j220, j230, j240, j225;
ztemp = malloc(klon*klat*sizeof(double)); ztemp = (double*) malloc(klon*klat*sizeof(double));
if ( ztemp == NULL ) SysError("No Memory!"); if ( ztemp == NULL ) SysError("No Memory!");
zline = malloc(2*klon*sizeof(double)); zline = (double*) malloc(2*klon*sizeof(double));
if ( zline == NULL ) SysError("No Memory!"); if ( zline == NULL ) SysError("No Memory!");
zwork = malloc(3*(2*klon+3)*sizeof(double)); zwork = (double*) malloc(3*(2*klon+3)*sizeof(double));
if ( zwork == NULL ) SysError("No Memory!"); if ( zwork == NULL ) SysError("No Memory!");
/* Parameter adjustments */ /* Parameter adjustments */
...@@ -10155,7 +10155,7 @@ void repair1(unsigned char *gbuf, long gbufsize) ...@@ -10155,7 +10155,7 @@ void repair1(unsigned char *gbuf, long gbufsize)
long nelem; long nelem;
unsigned char *pbuf; unsigned char *pbuf;
nelem = sourceLen/3; nelem = sourceLen/3;
pbuf = malloc(sourceLen); pbuf = (unsigned char*) malloc(sourceLen);
for ( i = 0; i < nelem; i++ ) for ( i = 0; i < nelem; i++ )
{ {
pbuf[3*i ] = source[ i]; pbuf[3*i ] = source[ i];
...@@ -10836,7 +10836,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu ...@@ -10836,7 +10836,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen); return (gribLen);
} }
static const char grb_libvers[] = "1.6.4" " of ""Feb 26 2014"" ""11:29:56"; static const char grb_libvers[] = "1.6.4" " of ""Mar 28 2014"" ""13:24:51";
const char * const char *
cgribexLibraryVersion(void) cgribexLibraryVersion(void)
{ {
......
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