Commit eb7ed465 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

zaxisPrint: added argument index to print the index of a zaxis

parent 6fd51f57
...@@ -845,7 +845,7 @@ int main(int argc, char *argv[]) ...@@ -845,7 +845,7 @@ int main(int argc, char *argv[])
ngrids = vlistNgrids(vlistID1); ngrids = vlistNgrids(vlistID1);
nzaxis = vlistNzaxis(vlistID1); nzaxis = vlistNzaxis(vlistID1);
for ( gridID = 0; gridID < ngrids; gridID++ ) gridPrint(gridID, gridID, 1); for ( gridID = 0; gridID < ngrids; gridID++ ) gridPrint(gridID, gridID, 1);
for ( zaxisID = 0; zaxisID < nzaxis; zaxisID++ ) zaxisPrint(zaxisID); for ( zaxisID = 0; zaxisID < nzaxis; zaxisID++ ) zaxisPrint(zaxisID, zaxisID);
} }
nvars = vlistNvars(vlistID1); nvars = vlistNvars(vlistID1);
......
...@@ -815,7 +815,7 @@ int zaxisDuplicate(int zaxisID); ...@@ -815,7 +815,7 @@ int zaxisDuplicate(int zaxisID);
void zaxisResize(int zaxisID, int size); void zaxisResize(int zaxisID, int size);
void zaxisPrint(int zaxisID); void zaxisPrint(int zaxisID, int index);
/* zaxisDefLevels: Define the levels of a Z-axis */ /* zaxisDefLevels: Define the levels of a Z-axis */
void zaxisDefLevels(int zaxisID, const double *levels_vec); void zaxisDefLevels(int zaxisID, const double *levels_vec);
......
...@@ -1843,7 +1843,8 @@ ...@@ -1843,7 +1843,8 @@
EXTERNAL zaxisResize EXTERNAL zaxisResize
! zaxisPrint ! zaxisPrint
! (INTEGER zaxisID) ! (INTEGER zaxisID,
! INTEGER index)
EXTERNAL zaxisPrint EXTERNAL zaxisPrint
! zaxisDefLevels ! zaxisDefLevels
......
...@@ -388,7 +388,7 @@ FCALLSCFUN1 (INT, zaxisInqType, ZAXISINQTYPE, zaxisinqtype, INT) ...@@ -388,7 +388,7 @@ FCALLSCFUN1 (INT, zaxisInqType, ZAXISINQTYPE, zaxisinqtype, INT)
FCALLSCFUN1 (INT, zaxisInqSize, ZAXISINQSIZE, zaxisinqsize, INT) FCALLSCFUN1 (INT, zaxisInqSize, ZAXISINQSIZE, zaxisinqsize, INT)
FCALLSCFUN1 (INT, zaxisDuplicate, ZAXISDUPLICATE, zaxisduplicate, INT) FCALLSCFUN1 (INT, zaxisDuplicate, ZAXISDUPLICATE, zaxisduplicate, INT)
FCALLSCSUB2 (zaxisResize, ZAXISRESIZE, zaxisresize, INT, INT) FCALLSCSUB2 (zaxisResize, ZAXISRESIZE, zaxisresize, INT, INT)
FCALLSCSUB1 (zaxisPrint, ZAXISPRINT, zaxisprint, INT) FCALLSCSUB2 (zaxisPrint, ZAXISPRINT, zaxisprint, INT, INT)
FCALLSCSUB2 (zaxisDefLevels, ZAXISDEFLEVELS, zaxisdeflevels, INT, PDOUBLE) FCALLSCSUB2 (zaxisDefLevels, ZAXISDEFLEVELS, zaxisdeflevels, INT, PDOUBLE)
FCALLSCSUB2 (zaxisInqLevels, ZAXISINQLEVELS, zaxisinqlevels, INT, PDOUBLE) FCALLSCSUB2 (zaxisInqLevels, ZAXISINQLEVELS, zaxisinqlevels, INT, PDOUBLE)
FCALLSCSUB3 (zaxisDefLevel, ZAXISDEFLEVEL, zaxisdeflevel, INT, INT, DOUBLE) FCALLSCSUB3 (zaxisDefLevel, ZAXISDEFLEVEL, zaxisdeflevel, INT, INT, DOUBLE)
......
...@@ -1136,25 +1136,23 @@ int zaxisDuplicate(int zaxisID) ...@@ -1136,25 +1136,23 @@ int zaxisDuplicate(int zaxisID)
} }
void zaxisPrintKernel ( zaxis_t * zaxisptr, FILE * fp ) void zaxisPrintKernel ( zaxis_t * zaxisptr, int index, FILE * fp )
{ {
int zaxisID;
int type;
unsigned char uuid[CDI_UUID_SIZE]; unsigned char uuid[CDI_UUID_SIZE];
int nlevels, levelID; int levelID;
int nbyte0, nbyte; int nbyte;
double level; double level;
xassert ( zaxisptr ); xassert ( zaxisptr );
zaxisID = zaxisptr->self; int zaxisID = zaxisptr->self;
type = zaxisptr->type; int type = zaxisptr->type;
nlevels = zaxisptr->size; int nlevels = zaxisptr->size;
nbyte0 = 0; int nbyte0 = 0;
fprintf(fp, "#\n"); fprintf(fp, "#\n");
fprintf(fp, "# zaxisID %d\n", zaxisID); fprintf(fp, "# zaxisID %d\n", index);
fprintf(fp, "#\n"); fprintf(fp, "#\n");
fprintf(fp, "zaxistype = %s\n", zaxisNamePtr(type)); fprintf(fp, "zaxistype = %s\n", zaxisNamePtr(type));
fprintf(fp, "size = %d\n", nlevels); fprintf(fp, "size = %d\n", nlevels);
...@@ -1249,11 +1247,11 @@ void zaxisPrintKernel ( zaxis_t * zaxisptr, FILE * fp ) ...@@ -1249,11 +1247,11 @@ void zaxisPrintKernel ( zaxis_t * zaxisptr, FILE * fp )
} }
void zaxisPrint ( int zaxisID ) void zaxisPrint ( int zaxisID, int index )
{ {
zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps); zaxis_t *zaxisptr = reshGetVal(zaxisID, &zaxisOps);
zaxisPrintKernel ( zaxisptr, stdout ); zaxisPrintKernel ( zaxisptr, index, stdout );
} }
...@@ -1264,7 +1262,7 @@ void zaxisPrintP ( void * voidptr, FILE * fp ) ...@@ -1264,7 +1262,7 @@ void zaxisPrintP ( void * voidptr, FILE * fp )
xassert ( zaxisptr ); xassert ( zaxisptr );
zaxisPrintKernel(zaxisptr, fp); zaxisPrintKernel(zaxisptr, zaxisptr->self, fp);
} }
......
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