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

replaced zaxisNamePtr() by zaxisNamePtr()

parent 3780640f
......@@ -528,6 +528,7 @@ src/after_vertint.h -text
src/afterburner.h -text
src/afterburnerlib.c -text
src/calendar.h -text
src/cdi_uuid.h -text
src/cdo.c -text
src/cdo.h -text
src/cdo_getopt.c -text
......
......@@ -50,7 +50,7 @@ void scan_darray(char *namelist, const char *name, double *values, int maxValue
long get_nfft(void);
char *zaxisNamePtr(int leveltype);
char zaxistypename[CDI_MAX_NAME];
char *vlistInqVarNamePtr(int vlistID, int varID);
char *vlistInqVarLongnamePtr(int vlistID, int varID);
char *vlistInqVarUnitsPtr(int vlistID, int varID);
......@@ -954,9 +954,10 @@ void after_defineLevel(struct Control *globs, struct Variable *vars)
}
}
else
Error( "%s level data unsupported for TYPE %d",
zaxisNamePtr(zaxisInqType(iVertID)), globs->Type);
{
zaxisName(zaxisInqType(iVertID), zaxistypename);
Error("%s level data unsupported for TYPE %d", zaxistypename, globs->Type);
}
break;
}
case 30:
......@@ -1652,9 +1653,10 @@ void after_postcntl(struct Control *globs, struct Variable *vars)
{
gridID = vars[code].igridID;
zaxisID = vars[code].izaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr," Detected Code %3d grid %-8s size %5d level %2d %-8s\n",
code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID),
zaxisInqSize(zaxisID), zaxisNamePtr(zaxisInqType(zaxisID)));
zaxisInqSize(zaxisID), zaxistypename);
}
......@@ -1756,9 +1758,10 @@ void after_postcntl(struct Control *globs, struct Variable *vars)
{
gridID = vars[code].ogridID;
zaxisID = vars[code].ozaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr," Selected Code %3d grid %-8s size %5d level %2d %-8s\n",
code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID),
zaxisInqSize(zaxisID), zaxisNamePtr(zaxisInqType(zaxisID)));
zaxisInqSize(zaxisID), zaxistypename);
}
}
......
......@@ -29,6 +29,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
......
......@@ -10,6 +10,7 @@ libcdo_la_SOURCES = \
cdo_task.c \
cdo_task.h \
cdo_history.c \
cdi_uuid.h \
after_sptrans.c \
after_fctrans.c \
after_dvtrans.c \
......
......@@ -561,7 +561,7 @@ top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcdo.la
libcdo_la_SOURCES = cdo_int.h compare.h cdo_pthread.c cdo_vlist.c \
cdo_getopt.c cdo_getopt.h cdo_task.c cdo_task.h cdo_history.c \
after_sptrans.c after_fctrans.c after_dvtrans.c \
cdi_uuid.h after_sptrans.c after_fctrans.c after_dvtrans.c \
after_vertint.c after_vertint.h after_namelist.c \
afterburnerlib.c afterburner.h vct_l191.h calendar.h \
constants.h constants.c color.c color.h commandline.c const.h \
......
......@@ -35,6 +35,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
......
......@@ -27,6 +27,7 @@
#include "pstream.h"
#include "util.h"
#include "cdi_uuid.h"
#include "printinfo.h"
const char *tunit2str(int tunits)
......
......@@ -24,6 +24,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
......
......@@ -24,6 +24,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
#include "percentiles_hist.h"
......
......@@ -32,6 +32,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
......
......@@ -26,6 +26,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "calendar.h"
#include "pstream.h"
......
......@@ -18,7 +18,13 @@
#define HAVE_OPENMP4 1
#endif
#ifdef __cplusplus
extern "C" {
#endif
void gaussaw(double *pa, double *pw, size_t nlat);
#if defined (__cplusplus)
}
#endif
static
void jspleg1(double *pleg, double plat, int ktrunc, double *work)
......
#ifndef CDI_UUID_H
#define CDI_UUID_H
#if defined (HAVE_CONFIG_H)
# include "config.h"
#endif
#include "cdi.h"
#ifdef __cplusplus
extern "C" {
#endif
static inline int cdiUUIDIsNull(const unsigned char uuid[])
{
int isNull = 1;
for (size_t i = 0; i < CDI_UUID_SIZE; ++i)
isNull &= (uuid[i] == 0);
return isNull;
}
void cdiCreateUUID(unsigned char uuid[CDI_UUID_SIZE]);
void cdiUUID2Str(const unsigned char uuid[], char uuidstr[]);
int cdiStr2UUID(const char *uuidstr, unsigned char uuid[]);
#if defined (__cplusplus)
}
#endif
#endif
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
......@@ -21,6 +21,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "cdi_uuid.h"
static char *ghistory = NULL;
static size_t ghistorysize = 0;
......@@ -123,18 +124,14 @@ void cdo_def_creation_date(int vlistID)
}
void create_uuid(unsigned char uuid[CDI_UUID_SIZE]);
void uuid2str(const unsigned char *uuid, char *uuidstr);
#define UUIDSTR_SIZE (CDI_UUID_SIZE*2 + 4)
static
void get_uuid(char uuidstr[UUIDSTR_SIZE])
{
unsigned char uuid[CDI_UUID_SIZE];
create_uuid(uuid);
uuid2str(uuid, uuidstr);
cdiCreateUUID(uuid);
cdiUUID2Str(uuid, uuidstr);
}
......
......@@ -121,10 +121,6 @@ void time2str(int time, char *timestr, int maxlen);
const char * tunit2str(int tunits);
const char * calendar2str(int calendar);
int days_per_month(int calendar, int year, int month);
int days_per_year(int calendar, int year);
int calendar_dpy(int calendar);
void defineGrid(const char *gridarg);
void defineInstitution(const char *instarg);
int defineTable(const char *tablearg);
......@@ -152,4 +148,24 @@ double parameter2double(const char *string);
int parameter2int(const char *string);
int parameter2intlist(const char *string);
int referenceToGrid(int gridID1);
#ifdef __cplusplus
extern "C" {
#endif
void cdiDefTableID(int tableID);
void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *xvals);
void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double yinc, double *yvals);
void gaussaw(double *restrict pa, double *restrict pw, size_t nlat);
int qu2reg3_double(double *pfield, int *kpoint, int klat, int klon,
double msval, int *kret, int omisng, int operio, int oveggy);
#if defined (__cplusplus)
}
#endif
#endif /* _CDO_INT_H */
......@@ -35,8 +35,6 @@
#include "error.h"
#include "grid.h"
int referenceToGrid(int gridID1);
static
void scale_vec(double scalefactor, long nvals, double *restrict values)
......@@ -694,10 +692,6 @@ void grib_get_reduced_row(long pl,double lon_first,double lon_last,long* npoints
return;
}
int qu2reg3_double(double *pfield, int *kpoint, int klat, int klon,
double msval, int *kret, int omisng, int operio, int oveggy);
static
int qu2reg_subarea(int gridsize, int np, double xfirst, double xlast,
double *array, int *rowlon, int ny, double missval, int *iret, int lmiss, int lperio, int lveggy)
......
......@@ -34,12 +34,8 @@ void grid_cell_center_to_bounds_X2D(const char* xunitstr, long xsize, long ysize
void grid_cell_center_to_bounds_Y2D(const char* yunitstr, long xsize, long ysize,
const double* restrict grid_center_lat, double* restrict grid_corner_lat);
void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *xvals);
void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double yinc, double *yvals);
int gridWeights(int gridID, double *weights);
int gridGenArea(int gridID, double *area);
void gaussaw(double pa[], double pw[], size_t nlat);
int referenceToGrid(int gridID);
int gridToZonal(int gridID);
......
......@@ -34,6 +34,7 @@
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
#include "cdi_uuid.h"
#include "grid.h"
#include "griddes.h"
#include "error.h"
......@@ -667,7 +668,6 @@ double readflt(const char *filename, const char *name, const char *pline)
return (val);
}
void str2uuid(const char *uuidstr, unsigned char *uuid);
int gridFromFile(FILE *gfp, const char *dname)
{
......@@ -809,7 +809,7 @@ int gridFromFile(FILE *gfp, const char *dname)
{
char uuidOfHGridStr[256];
strcpy(uuidOfHGridStr, skipSeparator(pline + len));
str2uuid(uuidOfHGridStr, grid.uuid);
cdiStr2UUID(uuidOfHGridStr, grid.uuid);
}
else if ( cmpstrlen(pline, "xsize", len) == 0 )
{
......
#include <cdi.h>
#include "cdo_int.h"
void encode_caldaysec(int calendar, int year, int month, int day, int hour, int minute, int second,
int *julday, int *secofday);
void decode_caldaysec(int calendar, int julday, int secofday,
int *year, int *month, int *day, int *hour, int *minute, int *second);
#include "calendar.h"
juldate_t juldate_encode(int calendar, int date, int time)
......
......@@ -3,18 +3,6 @@
#define DATE_FORMAT "%5.4d-%2.2d-%2.2d"
#define TIME_FORMAT "%2.2d:%2.2d:%2.2d"
void uuid2str(const unsigned char uuid[CDI_UUID_SIZE], char *uuidstr);
static inline
int cdiUUIDIsNull(const unsigned char uuid[CDI_UUID_SIZE])
{
int isNull = 1;
for (size_t i = 0; i < CDI_UUID_SIZE; ++i)
isNull &= (uuid[i] == 0);
return isNull;
}
void datetime2str(int date, int time, char *datetimestr, int maxlen)
{
int year, month, day;
......@@ -385,7 +373,7 @@ void printGridInfo(int vlistID)
if ( !cdiUUIDIsNull(uuidOfHGrid) )
{
char uuidOfHGridStr[37];
uuid2str(uuidOfHGrid, uuidOfHGridStr);
cdiUUID2Str(uuidOfHGrid, uuidOfHGridStr);
if ( uuidOfHGridStr[0] != 0 && strlen(uuidOfHGridStr) == 36 )
{
fprintf(stdout, "%33s : %s\n", "uuid", uuidOfHGridStr);
......@@ -502,7 +490,7 @@ void printZaxisInfo(int vlistID)
if ( !cdiUUIDIsNull(uuidOfVGrid) )
{
char uuidOfVGridStr[37];
uuid2str(uuidOfVGrid, uuidOfVGridStr);
cdiUUID2Str(uuidOfVGrid, uuidOfVGridStr);
if ( uuidOfVGridStr[0] != 0 && strlen(uuidOfVGridStr) == 36 )
{
fprintf(stdout, "%33s : ", "uuid");
......
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