Commit 265296e1 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridPrint: extented

parent d4c6b097
......@@ -2,6 +2,7 @@
* using GRIB library version 1.0.3
* using EXSE library version 1.0.1
* gridPrint: extented
* Version 1.0.3 released
2006-09-18 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
......@@ -130,7 +130,7 @@ static void printInfo(int gridtype, int date, int time, int code, double level,
arrmax = -1e50;
for ( i = 0; i < datasize; i++ )
{
if ( data[i] != missval )
if ( fabs(data[i]-missval) > 0 )
{
if ( data[i] < arrmin ) arrmin = data[i];
if ( data[i] > arrmax ) arrmax = data[i];
......@@ -818,7 +818,7 @@ int main(int argc, char *argv[])
vlistPrint(vlistID1);
ngrids = vlistNgrids(vlistID1);
nzaxis = vlistNzaxis(vlistID1);
for ( gridID = 0; gridID < ngrids; gridID++ ) gridPrint(gridID);
for ( gridID = 0; gridID < ngrids; gridID++ ) gridPrint(gridID, 1);
for ( zaxisID = 0; zaxisID < nzaxis; zaxisID++ ) zaxisPrint(zaxisID);
}
......
......@@ -365,7 +365,7 @@ void gridCompress(int gridID);
void gridDefMask(int gridID, int *mask);
int gridInqMask(int gridID, int *mask);
void gridPrint(int gridID);
void gridPrint(int gridID, int opt);
int gridSize(void);
/* gridCreate: Create a horizontal Grid */
......
!
! Fortran interface for CDI library version 1.0.1
! Fortran interface for CDI library version 1.0.3
!
INTEGER CDI_UNDEFID
......@@ -50,6 +50,8 @@
PARAMETER (COMPRESS_SZIP = 1)
INTEGER COMPRESS_GZIP
PARAMETER (COMPRESS_GZIP = 2)
INTEGER COMPRESS_BZIP2
PARAMETER (COMPRESS_BZIP2 = 3)
!
! Data types
!
......@@ -818,7 +820,8 @@
EXTERNAL gridInqMask
! gridPrint
! (INTEGER gridID)
! (INTEGER gridID,
! INTEGER opt)
EXTERNAL gridPrint
INTEGER gridSize
......
......@@ -178,7 +178,7 @@ FCALLSCFUN1 (STRING, gridNamePtr, GRIDNAMEPTR, gridnameptr, INT)
FCALLSCSUB1 (gridCompress, GRIDCOMPRESS, gridcompress, INT)
FCALLSCSUB2 (gridDefMask, GRIDDEFMASK, griddefmask, INT, PINT)
FCALLSCFUN2 (INT, gridInqMask, GRIDINQMASK, gridinqmask, INT, PINT)
FCALLSCSUB1 (gridPrint, GRIDPRINT, gridprint, INT)
FCALLSCSUB2 (gridPrint, GRIDPRINT, gridprint, INT, INT)
FCALLSCFUN0 (INT, gridSize, GRIDSIZE, gridsize)
FCALLSCFUN2 (INT, gridCreate, GRIDCREATE, gridcreate, INT, INT)
FCALLSCSUB1 (gridDestroy, GRIDDESTROY, griddestroy, INT)
......
......@@ -2817,7 +2817,7 @@ double *gridInqYboundsPtr(int gridID)
}
void gridPrint(int gridID)
void gridPrint(int gridID, int opt)
{
static char func[] = "gridPrint";
FILE *fp = stdout;
......@@ -2899,7 +2899,7 @@ void gridPrint(int gridID)
xinc = gridInqXinc(gridID);
}
if ( !DBL_IS_EQUAL(xinc, 0) )
if ( !DBL_IS_EQUAL(xinc, 0) && opt )
{
fprintf(fp, "xfirst : %g\n", xfirst);
fprintf(fp, "xinc : %g\n", xinc);
......@@ -2945,7 +2945,7 @@ void gridPrint(int gridID)
yinc = gridInqYinc(gridID);
}
if ( !DBL_IS_EQUAL(yinc, 0) )
if ( !DBL_IS_EQUAL(yinc, 0) && opt )
{
fprintf(fp, "yfirst : %g\n", yfirst);
fprintf(fp, "yinc : %g\n", yinc);
......
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