Commit 2012f0cc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdi.h: changed >* < to > *< (needed for the fortran interface generator)

parent de7d1906
......@@ -834,6 +834,15 @@ Copy a variable list.
Copy some entries of a variable list.
\section*{\tt \htmlref{vlistCopyVarName}{vlistCopyVarName}}
\begin{verbatim}
char *vlistCopyVarName (int vlistId, int varId);
\end{verbatim}
Safe and convenient version of vlistInqVarName.
\section*{\tt \htmlref{vlistCreate}{vlistCreate}}
\begin{verbatim}
......
......@@ -837,6 +837,15 @@ Copy a variable list.
Copy some entries of a variable list.
\section*{\tt \htmlref{vlistCopyVarName}{vlistCopyVarName}}
\begin{verbatim}
CHARACTER(80) FUNCTION vlistCopyVarName (INTEGER vlistId, INTEGER varId)
\end{verbatim}
Safe and convenient version of vlistInqVarName.
\section*{\tt \htmlref{vlistCreate}{vlistCreate}}
\begin{verbatim}
......
......@@ -349,8 +349,8 @@ int streamInqTimestep(int streamID, int tsID);
/* PIO: query currently set timestep id */
int streamInqCurTimestepID(int streamID);
const char* streamFilename(int streamID);
const char* streamFilesuffix(int filetype);
const char *streamFilename(int streamID);
const char *streamFilesuffix(int filetype);
off_t streamNvals(int streamID);
......@@ -392,56 +392,56 @@ void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignu
/* File driven I/O (may yield better performance than using the streamXXX functions) */
//Creation & Destruction
CdiIterator* cdiIterator_new(const char* path); //Requires a subsequent call to cdiIteratorNextField() to point the iterator at the first field.
CdiIterator* cdiIterator_clone(CdiIterator* me);
char* cdiIterator_serialize(CdiIterator* me); //Returns a malloc'ed string.
CdiIterator* cdiIterator_deserialize(const char* description); //description is a string that was returned by cdiIteratorSerialize(). Returns a copy of the original iterator.
void cdiIterator_print(CdiIterator* me, FILE* stream);
void cdiIterator_delete(CdiIterator* me);
CdiIterator *cdiIterator_new(const char *path); //Requires a subsequent call to cdiIteratorNextField() to point the iterator at the first field.
CdiIterator *cdiIterator_clone(CdiIterator *me);
char *cdiIterator_serialize(CdiIterator *me); //Returns a malloc'ed string.
CdiIterator *cdiIterator_deserialize(const char *description); //description is a string that was returned by cdiIteratorSerialize(). Returns a copy of the original iterator.
void cdiIterator_print(CdiIterator *me, FILE *stream);
void cdiIterator_delete(CdiIterator *me);
//Advancing an iterator
int cdiIterator_nextField(CdiIterator* me); //Points the iterator at the next field, returns CDI_EEOF if there are no more fields in the file.
int cdiIterator_nextField(CdiIterator *me); //Points the iterator at the next field, returns CDI_EEOF if there are no more fields in the file.
//Introspecting metadata
//All outXXX arguments to these functions may be NULL.
char* cdiIterator_inqStartTime(CdiIterator* me); //Returns the (start) time as an ISO-8601 coded string. The caller is responsible to free() the returned string.
char* cdiIterator_inqEndTime(CdiIterator* me); //Returns the end time of an integration period as an ISO-8601 coded string, or NULL if there is no end time. The caller is responsible to free() the returned string.
char* cdiIterator_inqVTime(CdiIterator* me); //Returns the validity date as an ISO-8601 coded string. The caller is responsible to free() the returned string.
int cdiIterator_inqLevelType(CdiIterator* me, int levelSelector, char** outName, char** outLongName, char** outStdName, char** outUnit); //callers are responsible to free() strings that they request
int cdiIterator_inqLevel(CdiIterator* me, int levelSelector, double* outValue1, double* outValue2); //outValue2 is only written to if the level is a hybrid level
int cdiIterator_inqLevelUuid(CdiIterator* me, int* outVgridNumber, int* outLevelCount, unsigned char (*outUuid)[CDI_UUID_SIZE]); //outUuid must point to a buffer of 16 bytes, returns an error code if no generalized zaxis is used.
CdiParam cdiIterator_inqParam(CdiIterator* me);
int cdiIterator_inqDatatype(CdiIterator* me);
int cdiIterator_inqTsteptype(CdiIterator* me);
char* cdiIterator_inqVariableName(CdiIterator* me); //The caller is responsible to free() the returned buffer.
int cdiIterator_inqGridId(CdiIterator* me); //The returned id is only valid until the next call to cdiIteratorNextField().
char *cdiIterator_inqStartTime(CdiIterator *me); //Returns the (start) time as an ISO-8601 coded string. The caller is responsible to free() the returned string.
char *cdiIterator_inqEndTime(CdiIterator *me); //Returns the end time of an integration period as an ISO-8601 coded string, or NULL if there is no end time. The caller is responsible to free() the returned string.
char *cdiIterator_inqVTime(CdiIterator *me); //Returns the validity date as an ISO-8601 coded string. The caller is responsible to free() the returned string.
int cdiIterator_inqLevelType(CdiIterator *me, int levelSelector, char **outName, char **outLongName, char **outStdName, char **outUnit); //callers are responsible to free() strings that they request
int cdiIterator_inqLevel(CdiIterator *me, int levelSelector, double *outValue1, double *outValue2); //outValue2 is only written to if the level is a hybrid level
int cdiIterator_inqLevelUuid(CdiIterator *me, int *outVgridNumber, int *outLevelCount, unsigned char (*outUuid)[CDI_UUID_SIZE]); //outUuid must point to a buffer of 16 bytes, returns an error code if no generalized zaxis is used.
CdiParam cdiIterator_inqParam(CdiIterator *me);
int cdiIterator_inqDatatype(CdiIterator *me);
int cdiIterator_inqTsteptype(CdiIterator *me);
char *cdiIterator_inqVariableName(CdiIterator *me); //The caller is responsible to free() the returned buffer.
int cdiIterator_inqGridId(CdiIterator *me); //The returned id is only valid until the next call to cdiIteratorNextField().
//Reading data
void cdiIterator_readField(CdiIterator* me, double* data_vec, size_t* nmiss);
void cdiIterator_readFieldF(CdiIterator* me, float* data_vec, size_t* nmiss);
void cdiIterator_readField(CdiIterator *me, double *data_vec, size_t *nmiss);
void cdiIterator_readFieldF(CdiIterator *me, float* data_vec, size_t *nmiss);
//TODO[NH]: Add functions to read partial fields.
//Direct access to grib fields
CdiGribIterator* cdiGribIterator_clone(CdiIterator* me); //Returns NULL if the associated file is not a GRIB file.
void cdiGribIterator_delete(CdiGribIterator* me);
CdiGribIterator *cdiGribIterator_clone(CdiIterator *me); //Returns NULL if the associated file is not a GRIB file.
void cdiGribIterator_delete(CdiGribIterator *me);
//Callthroughs to GRIB-API
int cdiGribIterator_getLong(CdiGribIterator* me, const char* key, long* value); //Same semantics as grib_get_long().
int cdiGribIterator_getDouble(CdiGribIterator* me, const char* key, double* value); //Same semantics as grib_get_double().
int cdiGribIterator_getLength(CdiGribIterator* me, const char* key, size_t* value); //Same semantics as grib_get_length().
int cdiGribIterator_getString(CdiGribIterator* me, const char* key, char* value, size_t* length); //Same semantics as grib_get_string().
int cdiGribIterator_getSize(CdiGribIterator* me, const char* key, size_t* value); //Same semantics as grib_get_size().
int cdiGribIterator_getLongArray(CdiGribIterator* me, const char* key, long* value, size_t* array_size); //Same semantics as grib_get_long_array().
int cdiGribIterator_getDoubleArray(CdiGribIterator* me, const char* key, double* value, size_t* array_size); //Same semantics as grib_get_double_array().
int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *value); //Same semantics as grib_get_long().
int cdiGribIterator_getDouble(CdiGribIterator *me, const char *key, double *value); //Same semantics as grib_get_double().
int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *value); //Same semantics as grib_get_length().
int cdiGribIterator_getString(CdiGribIterator *me, const char *key, char *value, size_t *length); //Same semantics as grib_get_string().
int cdiGribIterator_getSize(CdiGribIterator *me, const char *key, size_t *value); //Same semantics as grib_get_size().
int cdiGribIterator_getLongArray(CdiGribIterator *me, const char *key, long* value, size_t *array_size); //Same semantics as grib_get_long_array().
int cdiGribIterator_getDoubleArray(CdiGribIterator *me, const char *key, double *value, size_t *array_size); //Same semantics as grib_get_double_array().
//Convenience functions for accessing GRIB-API keys
int cdiGribIterator_inqEdition(CdiGribIterator* me);
long cdiGribIterator_inqLongValue(CdiGribIterator* me, const char* key); //Aborts on failure to fetch the given key.
long cdiGribIterator_inqLongDefaultValue(CdiGribIterator* me, const char* key, long defaultValue); //Returns the default value if the given key is not present.
double cdiGribIterator_inqDoubleValue(CdiGribIterator* me, const char* key); //Aborts on failure to fetch the given key.
double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator* me, const char* key, double defaultValue); //Returns the default value if the given key is not present.
char* cdiGribIterator_inqStringValue(CdiGribIterator* me, const char* key); //Returns a malloc'ed string.
int cdiGribIterator_inqEdition(CdiGribIterator *me);
long cdiGribIterator_inqLongValue(CdiGribIterator *me, const char *key); //Aborts on failure to fetch the given key.
long cdiGribIterator_inqLongDefaultValue(CdiGribIterator *me, const char *key, long defaultValue); //Returns the default value if the given key is not present.
double cdiGribIterator_inqDoubleValue(CdiGribIterator *me, const char *key); //Aborts on failure to fetch the given key.
double cdiGribIterator_inqDoubleDefaultValue(CdiGribIterator *me, const char *key, double defaultValue); //Returns the default value if the given key is not present.
char *cdiGribIterator_inqStringValue(CdiGribIterator *me, const char *key); //Returns a malloc'ed string.
/* VLIST routines */
......@@ -580,7 +580,7 @@ void vlistDefVarName(int vlistID, int varID, const char *name);
void vlistInqVarName(int vlistID, int varID, char *name);
/* vlistCopyVarName: Safe and convenient version of vlistInqVarName */
char* vlistCopyVarName(int vlistId, int varId);
char *vlistCopyVarName(int vlistId, int varId);
/* vlistDefVarStdname: Define the standard name of a Variable */
void vlistDefVarStdname(int vlistID, int varID, const char *stdname);
......@@ -883,7 +883,7 @@ void gridDefYbounds(int gridID, const double *ybounds_vec);
/* gridInqYbounds: Get the bounds of a Y-axis */
int gridInqYbounds(int gridID, double *ybounds_vec);
void gridDefRowlon(int gridID, int nrowlon, const int* rowlon_vec);
void gridDefRowlon(int gridID, int nrowlon, const int *rowlon_vec);
void gridInqRowlon(int gridID, int *rowlon_vec);
void gridChangeType(int gridID, int gridtype);
......@@ -1071,7 +1071,7 @@ int taxisInqType(int taxisID);
int taxisInqNumavg(int taxisID);
const char* tunitNamePtr(int tunitID);
const char *tunitNamePtr(int tunitID);
/* Institut routines */
......@@ -1082,7 +1082,7 @@ int institutInqNumber(void);
int institutInqCenter(int instID);
int institutInqSubcenter(int instID);
const char *institutInqNamePtr(int instID);
const char* institutInqLongnamePtr(int instID);
const char *institutInqLongnamePtr(int instID);
/* Model routines */
......@@ -1100,7 +1100,7 @@ void tableWrite(const char *filename, int tableID);
int tableRead(const char *tablefile);
int tableDef(int modelID, int tablenum, const char *tablename);
const char* tableInqNamePtr(int tableID);
const char *tableInqNamePtr(int tableID);
void tableDefEntry(int tableID, int code, const char *name, const char *longname, const char *units);
int tableInq(int modelID, int tablenum, const char *tablename);
......@@ -1147,7 +1147,7 @@ int subtypeInqActiveIndex(int subtypeID);
void subtypeDefActiveIndex(int subtypeID, int index);
/* Generate a "query object" out of a key-value pair. */
subtype_query_t keyValuePair(const char* key, int value);
subtype_query_t keyValuePair(const char *key, int value);
/* Generate an AND-combined "query object" out of two previous
query objects. */
......
......@@ -589,6 +589,14 @@
! (INTEGER streamID)
EXTERNAL streamInqCurTimestepID
CHARACTER(80) streamFilename
! (INTEGER streamID)
EXTERNAL streamFilename
CHARACTER(80) streamFilesuffix
! (INTEGER filetype)
EXTERNAL streamFilesuffix
INTEGER streamInqNvars
! (INTEGER streamID)
EXTERNAL streamInqNvars
......@@ -1068,6 +1076,11 @@
! CHARACTER*(*) name)
EXTERNAL vlistInqVarName
CHARACTER(80) vlistCopyVarName
! (INTEGER vlistId,
! INTEGER varId)
EXTERNAL vlistCopyVarName
! vlistDefVarStdname
! (INTEGER vlistID,
! INTEGER varID,
......@@ -1819,6 +1832,12 @@
! DOUBLEPRECISION ybounds_vec)
EXTERNAL gridInqYbounds
! gridDefRowlon
! (INTEGER gridID,
! INTEGER nrowlon,
! INTEGER rowlon_vec)
EXTERNAL gridDefRowlon
! gridInqRowlon
! (INTEGER gridID,
! INTEGER rowlon_vec)
......@@ -2208,6 +2227,10 @@
! (INTEGER taxisID)
EXTERNAL taxisInqNumavg
CHARACTER(80) tunitNamePtr
! (INTEGER tunitID)
EXTERNAL tunitNamePtr
!
! Institut routines
!
......@@ -2240,6 +2263,10 @@
! (INTEGER instID)
EXTERNAL institutInqNamePtr
CHARACTER(80) institutInqLongnamePtr
! (INTEGER instID)
EXTERNAL institutInqLongnamePtr
!
! Model routines
!
......@@ -2290,6 +2317,10 @@
! CHARACTER*(*) tablename)
EXTERNAL tableDef
CHARACTER(80) tableInqNamePtr
! (INTEGER tableID)
EXTERNAL tableInqNamePtr
! tableDefEntry
! (INTEGER tableID,
! INTEGER code,
......
......@@ -133,6 +133,8 @@ FCALLSCFUN1 (INT, streamInqCompLevel, STREAMINQCOMPLEVEL, streaminqcomplevel, IN
FCALLSCFUN2 (INT, streamDefTimestep, STREAMDEFTIMESTEP, streamdeftimestep, INT, INT)
FCALLSCFUN2 (INT, streamInqTimestep, STREAMINQTIMESTEP, streaminqtimestep, INT, INT)
FCALLSCFUN1 (INT, streamInqCurTimestepID, STREAMINQCURTIMESTEPID, streaminqcurtimestepid, INT)
FCALLSCFUN1 (STRING, streamFilename, STREAMFILENAME, streamfilename, INT)
FCALLSCFUN1 (STRING, streamFilesuffix, STREAMFILESUFFIX, streamfilesuffix, INT)
FCALLSCFUN1 (INT, streamInqNvars, STREAMINQNVARS, streaminqnvars, INT)
/* STREAM var I/O routines */
......@@ -236,6 +238,7 @@ FCALLSCSUB3 (vlistDefVarTable, VLISTDEFVARTABLE, vlistdefvartable, INT, INT, INT
FCALLSCFUN2 (INT, vlistInqVarTable, VLISTINQVARTABLE, vlistinqvartable, INT, INT)
FCALLSCSUB3 (vlistDefVarName, VLISTDEFVARNAME, vlistdefvarname, INT, INT, STRING)
FCALLSCSUB3 (vlistInqVarName, VLISTINQVARNAME, vlistinqvarname, INT, INT, PSTRING)
FCALLSCFUN2 (STRING, vlistCopyVarName, VLISTCOPYVARNAME, vlistcopyvarname, INT, INT)
FCALLSCSUB3 (vlistDefVarStdname, VLISTDEFVARSTDNAME, vlistdefvarstdname, INT, INT, STRING)
FCALLSCSUB3 (vlistInqVarStdname, VLISTINQVARSTDNAME, vlistinqvarstdname, INT, INT, PSTRING)
FCALLSCSUB3 (vlistDefVarLongname, VLISTDEFVARLONGNAME, vlistdefvarlongname, INT, INT, STRING)
......@@ -393,6 +396,7 @@ FCALLSCSUB2 (gridDefXbounds, GRIDDEFXBOUNDS, griddefxbounds, INT, PDOUBLE)
FCALLSCFUN2 (INT, gridInqXbounds, GRIDINQXBOUNDS, gridinqxbounds, INT, PDOUBLE)
FCALLSCSUB2 (gridDefYbounds, GRIDDEFYBOUNDS, griddefybounds, INT, PDOUBLE)
FCALLSCFUN2 (INT, gridInqYbounds, GRIDINQYBOUNDS, gridinqybounds, INT, PDOUBLE)
FCALLSCSUB3 (gridDefRowlon, GRIDDEFROWLON, griddefrowlon, INT, INT, PINT)
FCALLSCSUB2 (gridInqRowlon, GRIDINQROWLON, gridinqrowlon, INT, PINT)
FCALLSCSUB2 (gridChangeType, GRIDCHANGETYPE, gridchangetype, INT, INT)
FCALLSCSUB2 (gridDefComplexPacking, GRIDDEFCOMPLEXPACKING, griddefcomplexpacking, INT, INT)
......@@ -480,6 +484,7 @@ FCALLSCFUN1 (DOUBLE, taxisInqForecastPeriod, TAXISINQFORECASTPERIOD, taxisinqfor
FCALLSCSUB2 (taxisDefNumavg, TAXISDEFNUMAVG, taxisdefnumavg, INT, INT)
FCALLSCFUN1 (INT, taxisInqType, TAXISINQTYPE, taxisinqtype, INT)
FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT)
FCALLSCFUN1 (STRING, tunitNamePtr, TUNITNAMEPTR, tunitnameptr, INT)
/* Institut routines */
......@@ -489,6 +494,7 @@ FCALLSCFUN0 (INT, institutInqNumber, INSTITUTINQNUMBER, institutinqnumber)
FCALLSCFUN1 (INT, institutInqCenter, INSTITUTINQCENTER, institutinqcenter, INT)
FCALLSCFUN1 (INT, institutInqSubcenter, INSTITUTINQSUBCENTER, institutinqsubcenter, INT)
FCALLSCFUN1 (STRING, institutInqNamePtr, INSTITUTINQNAMEPTR, institutinqnameptr, INT)
FCALLSCFUN1 (STRING, institutInqLongnamePtr, INSTITUTINQLONGNAMEPTR, institutinqlongnameptr, INT)
/* Model routines */
......@@ -504,6 +510,7 @@ FCALLSCSUB2 (tableWriteC, TABLEWRITEC, tablewritec, STRING, INT)
FCALLSCSUB2 (tableWrite, TABLEWRITE, tablewrite, STRING, INT)
FCALLSCFUN1 (INT, tableRead, TABLEREAD, tableread, STRING)
FCALLSCFUN3 (INT, tableDef, TABLEDEF, tabledef, INT, INT, STRING)
FCALLSCFUN1 (STRING, tableInqNamePtr, TABLEINQNAMEPTR, tableinqnameptr, INT)
FCALLSCSUB5 (tableDefEntry, TABLEDEFENTRY, tabledefentry, INT, INT, STRING, STRING, STRING)
FCALLSCFUN3 (INT, tableInq, TABLEINQ, tableinq, INT, INT, STRING)
FCALLSCFUN0 (INT, tableInqNumber, TABLEINQNUMBER, tableinqnumber)
......
! >>> Warning: This is a generated file. If you modify it, you get what you deserve. <<<
!
! Generated by "interfaces/f2003/bindGen.rb" from input file "src/cdi.h".
! Generated by "../interfaces/f2003/bindGen.rb" from input file "../src/cdi.h".
module mo_cdi
use iso_c_binding
......
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