mirror of https://github.com/ecmwf/eccodes.git
Cleanup and comments
This commit is contained in:
parent
4374387c21
commit
1b5f78f275
|
@ -241,7 +241,7 @@ codes_index* codes_index_read(codes_context* c, const char* filename, int* err);
|
|||
* Get the number of distinct values of the key in argument contained in the index. The key must belong to the index.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key for which the number of values is computed
|
||||
* @param size : number of distinct values of the key in the index
|
||||
* @return 0 if OK, integer value on error
|
||||
|
@ -252,7 +252,7 @@ int codes_index_get_size(const codes_index* index, const char* key, size_t* size
|
|||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key for which the values are returned
|
||||
* @param values : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
|
||||
* @param size : size of the values array
|
||||
|
@ -264,7 +264,7 @@ int codes_index_get_long(const codes_index* index, const char* key, long* values
|
|||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as double or when the native type of the key is double.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key for which the values are returned
|
||||
* @param values : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
|
||||
* @param size : size of the values array
|
||||
|
@ -276,7 +276,7 @@ int codes_index_get_double(const codes_index* index, const char* key, double* va
|
|||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as string or when the native type of the key is string.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key for which the values are returned
|
||||
* @param values : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
|
||||
* @param size : size of the values array
|
||||
|
@ -289,7 +289,7 @@ int codes_index_get_string(const codes_index* index, const char* key, char** val
|
|||
* Select the message subset with key==value. The value is a long. The key must have been created with long type or have long as native type if the type was not explicitly defined in the index creation.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key to be selected
|
||||
* @param value : value of the key to select
|
||||
* @return 0 if OK, integer value on error
|
||||
|
@ -311,7 +311,7 @@ int codes_index_select_double(codes_index* index, const char* key, double value)
|
|||
* Select the message subset with key==value. The value is a string. The key must have been created with string type or have string as native type if the type was not explicitly defined in the index creation.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* The index must have been created with the key in argument.
|
||||
* The index must have been created with the key in argument.
|
||||
* @param key : key to be selected
|
||||
* @param value : value of the key to select
|
||||
* @return 0 if OK, integer value on error
|
||||
|
@ -325,7 +325,7 @@ int codes_index_select_string(codes_index* index, const char* key, const char* v
|
|||
*
|
||||
* @param index : an index created from a file.
|
||||
* @param err : 0 if OK, integer value on error. CODES_END_OF_INDEX when no more handles are contained in the index.
|
||||
* @return GRIB handle.
|
||||
* @return message handle.
|
||||
*/
|
||||
codes_handle* codes_handle_new_from_index(codes_index* index, int* err);
|
||||
|
||||
|
@ -431,7 +431,7 @@ codes_handle* codes_handle_new_from_message(codes_context* c, const void* data,
|
|||
/**
|
||||
* Create a handle from a user message in memory. The message will not be freed at the end.
|
||||
* The message will be copied as soon as a modification is needed.
|
||||
* This function works also with multi-field messages.
|
||||
* This function works also with GRIB multi-field messages.
|
||||
*
|
||||
* @param c : the context from which the handle will be created (NULL for default context)
|
||||
* @param data : the actual message
|
||||
|
@ -505,7 +505,7 @@ int codes_handle_delete(codes_handle* h);
|
|||
/**
|
||||
* Create an empty multi-field GRIB handle.
|
||||
* This is only applicable to GRIB edition 2.
|
||||
* Remember always to delete the multi-handle when it is not needed any more to avoid
|
||||
* Remember always to delete the multi-handle when it is not needed anymore to avoid
|
||||
* memory leaks.
|
||||
*
|
||||
* @param c : the context from which the handle will be created (NULL for default context)
|
||||
|
@ -516,7 +516,7 @@ codes_multi_handle* codes_grib_multi_handle_new(codes_context* c);
|
|||
* Append the sections starting with start_section of the message pointed by h at
|
||||
* the end of the multi-field GRIB handle mh.
|
||||
* This is only applicable to GRIB edition 2.
|
||||
* Remember always to delete the multi-handle when it is not needed any more to avoid
|
||||
* Remember always to delete the multi-handle when it is not needed anymore to avoid
|
||||
* memory leaks.
|
||||
*
|
||||
* @param h : The handle from which the sections are copied.
|
||||
|
@ -538,7 +538,7 @@ int codes_grib_multi_handle_delete(codes_multi_handle* mh);
|
|||
/**
|
||||
* Write a multi-field GRIB handle in a file.
|
||||
* This is only applicable to GRIB edition 2.
|
||||
* Remember always to delete the multi-handle when it is not needed any more to avoid
|
||||
* Remember always to delete the multi-handle when it is not needed anymore to avoid
|
||||
* memory leaks.
|
||||
*
|
||||
* @param mh : The multi-field GRIB handle to be written.
|
||||
|
@ -588,8 +588,8 @@ int codes_get_message_copy(const codes_handle* h, void* message, size_t* message
|
|||
codes_iterator* codes_grib_iterator_new(const codes_handle* h, unsigned long flags, int* error);
|
||||
|
||||
/**
|
||||
* Get latitude/longitude and data values.
|
||||
* The Latitudes, longitudes and values arrays must be properly allocated by the caller.
|
||||
* Get latitude/longitude and data values for a GRIB message.
|
||||
* The latitudes, longitudes and values arrays must be properly allocated by the caller.
|
||||
* Their required dimension can be obtained by getting the value of the integer key "numberOfPoints".
|
||||
*
|
||||
* @param h : handle from which geography and data values are taken
|
||||
|
@ -681,7 +681,7 @@ int codes_grib_nearest_find(codes_nearest* nearest, const codes_handle* h, doubl
|
|||
double* values, double* distances, int* indexes, size_t* len);
|
||||
|
||||
/**
|
||||
* Frees an nearest from memory
|
||||
* Frees a nearest object from memory
|
||||
*
|
||||
* @param nearest : the nearest
|
||||
* @return 0 if OK, integer value on error
|
||||
|
@ -858,7 +858,7 @@ int codes_get_double_array(const codes_handle* h, const char* key, double* vals,
|
|||
int codes_get_long_array(const codes_handle* h, const char* key, long* vals, size_t* length);
|
||||
|
||||
|
||||
/* setting data */
|
||||
/* setting data */
|
||||
/**
|
||||
* Copy the keys belonging to a given namespace from a source handle to a destination handle
|
||||
*
|
||||
|
|
|
@ -91,27 +91,27 @@ Log mode for information for processing information
|
|||
#define GRIB_TYPE_MISSING 7
|
||||
|
||||
/* Missing values */
|
||||
/* #define GRIB_MISSING_LONG 0x80000001*/
|
||||
/* #define GRIB_MISSING_LONG 0x80000001 */
|
||||
/* #define GRIB_MISSING_LONG 0xffffffff */
|
||||
#define GRIB_MISSING_LONG 2147483647
|
||||
#define GRIB_MISSING_DOUBLE -1e+100
|
||||
|
||||
/* Dump option flags*/
|
||||
#define GRIB_DUMP_FLAG_READ_ONLY (1 << 0)
|
||||
#define GRIB_DUMP_FLAG_DUMP_OK (1 << 1)
|
||||
#define GRIB_DUMP_FLAG_VALUES (1 << 2)
|
||||
#define GRIB_DUMP_FLAG_CODED (1 << 3)
|
||||
#define GRIB_DUMP_FLAG_OCTET (1 << 4)
|
||||
#define GRIB_DUMP_FLAG_ALIASES (1 << 5)
|
||||
#define GRIB_DUMP_FLAG_TYPE (1 << 6)
|
||||
#define GRIB_DUMP_FLAG_HEXADECIMAL (1 << 7)
|
||||
#define GRIB_DUMP_FLAG_NO_DATA (1 << 8)
|
||||
#define GRIB_DUMP_FLAG_ALL_DATA (1 << 9)
|
||||
#define GRIB_DUMP_FLAG_READ_ONLY (1 << 0)
|
||||
#define GRIB_DUMP_FLAG_DUMP_OK (1 << 1)
|
||||
#define GRIB_DUMP_FLAG_VALUES (1 << 2)
|
||||
#define GRIB_DUMP_FLAG_CODED (1 << 3)
|
||||
#define GRIB_DUMP_FLAG_OCTET (1 << 4)
|
||||
#define GRIB_DUMP_FLAG_ALIASES (1 << 5)
|
||||
#define GRIB_DUMP_FLAG_TYPE (1 << 6)
|
||||
#define GRIB_DUMP_FLAG_HEXADECIMAL (1 << 7)
|
||||
#define GRIB_DUMP_FLAG_NO_DATA (1 << 8)
|
||||
#define GRIB_DUMP_FLAG_ALL_DATA (1 << 9)
|
||||
#define GRIB_DUMP_FLAG_ALL_ATTRIBUTES (1 << 10)
|
||||
|
||||
/* grib_nearest flags */
|
||||
#define GRIB_NEAREST_SAME_GRID (1 << 0)
|
||||
#define GRIB_NEAREST_SAME_DATA (1 << 1)
|
||||
#define GRIB_NEAREST_SAME_GRID (1 << 0)
|
||||
#define GRIB_NEAREST_SAME_DATA (1 << 1)
|
||||
#define GRIB_NEAREST_SAME_POINT (1 << 2)
|
||||
|
||||
/*! Iteration is carried out on all the keys available in the message
|
||||
|
|
Loading…
Reference in New Issue