diff --git a/html/annotated.html b/html/annotated.html index e69de29bb..bc69154b8 100644 --- a/html/annotated.html +++ b/html/annotated.html @@ -0,0 +1,124 @@ + + +
+ + + +
+ eccodes
+
+ |
+
ecCodes | This package is the Python interface to ecCodes |
CodesInternalError | Wrap errors coming from the C API in a Python exception object |
codes_context | |
codes_handle | |
codes_index | |
codes_iterator | |
codes_keys_iterator | |
codes_multi_handle | |
codes_nearest | |
eccodes | Module eccodes + This is the Fortran90 interface for ecCodes |
codes_get | Get the value for a key from a grib message |
codes_get_element | Get a value of specified index from an array key |
codes_get_message_size | Get the size of a coded message |
codes_get_size | Get the size of an array key |
codes_grib_find_nearest | Find the nearest point/points of a given latitude/longitude point |
codes_grib_get_data | Get latitude/longitude and data values |
codes_index_get | Get the distinct values of the key in argument contained in the index |
codes_index_get_size | Get the number of distinct values of the key in argument contained in the index |
codes_index_select | Select the message subset with key==value |
codes_new_from_message | Create a new message in memory from an integer or character array containting the coded message |
codes_read_bytes | Reads nbytes bytes into the buffer from a file opened with codes_open_file |
codes_read_from_file | Reads a message in the buffer array from the file opened with codes_open_file |
codes_set | Set the value for a key in a grib message |
codes_write_bytes | Write nbytes bytes from the buffer in a file opened with codes_open_file |
+ eccodes
+
+ |
+
Wrap errors coming from the C API in a Python exception object. + More...
+ +Inherits Exception.
+Wrap errors coming from the C API in a Python exception object.
+
+ eccodes
+
+ |
+
Module eccodes
+ This is the Fortran90 interface for ecCodes.
+ More...
+Data Types | |
interface | codes_get |
Get the value for a key from a grib message. More... | |
interface | codes_get_element |
Get a value of specified index from an array key. More... | |
interface | codes_get_message_size |
Get the size of a coded message. More... | |
interface | codes_get_size |
Get the size of an array key. More... | |
interface | codes_grib_find_nearest |
Find the nearest point/points of a given latitude/longitude point. More... | |
interface | codes_grib_get_data |
Get latitude/longitude and data values. More... | |
interface | codes_index_get |
Get the distinct values of the key in argument contained in the index. More... | |
interface | codes_index_get_size |
Get the number of distinct values of the key in argument contained in the index. More... | |
interface | codes_index_select |
Select the message subset with key==value. More... | |
interface | codes_new_from_message |
Create a new message in memory from an integer or character array containting the coded message. More... | |
interface | codes_read_bytes |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
interface | codes_read_from_file |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
interface | codes_set |
Set the value for a key in a grib message. More... | |
interface | codes_write_bytes |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
+Public Member Functions | |
subroutine | codes_set_missing (id, key, status) |
Wrapper for eccodes. More... | |
subroutine | codes_index_create (indexid, filename, keys, status) |
Create a new index form a file. More... | |
subroutine | codes_index_add_file (indexid, filename, status) |
Add a file to an index. More... | |
subroutine | codes_index_get_size_long (indexid, key, size, status) |
Get the number of distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_size_int (indexid, key, size, status) |
Get the number of distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_int (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_long (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_real8 (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_string (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_select_string (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_int (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_long (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_real8 (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_new_from_index (indexid, msgid, status) |
Create a new handle from an index after having selected the key values. More... | |
subroutine | codes_index_read (indexid, filename, status) |
Load an index file previously created with codes_index_write. More... | |
subroutine | codes_index_write (indexid, filename, status) |
Saves an index to a file for later reuse. More... | |
subroutine | codes_index_release (indexid, status) |
Delete the index. More... | |
subroutine | codes_open_file (ifile, filename, mode, status) |
Open a file according to a mode. More... | |
subroutine | codes_read_bytes_char (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_char_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_int4 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_int4_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real4 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real4_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real8 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real8_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_int4 (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_int4_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_real4 (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_real4_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_real8 (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_real8_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_char (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_char_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_char (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_char_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_int4 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_int4_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real4 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real4_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real8 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real8_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_close_file (ifile, status) |
Close a file. More... | |
subroutine | codes_count_in_file (ifile, n, status) |
Counts the messages in a file. More... | |
subroutine | codes_new_from_file (ifile, msgid, product_kind, status) |
Load in memory a message from a file. More... | |
subroutine | codes_any_new_from_file (ifile, msgid, status) |
Load in memory a message from a file. More... | |
subroutine | codes_grib_new_from_file (ifile, gribid, status) |
Load in memory a GRIB message from a file. More... | |
subroutine | codes_bufr_new_from_file (ifile, bufrid, status) |
Load in memory a BUFR message from a file. More... | |
subroutine | codes_new_from_message_char (msgid, message, status) |
Create a new message in memory from a character array containting the coded message. More... | |
subroutine | codes_new_from_message_int4 (msgid, message, status) |
Create a new message in memory from an integer array containting the coded message. More... | |
subroutine | codes_grib_new_from_samples (gribid, samplename, status) |
Create a new valid gribid from a GRIB sample contained in a samples directory pointed by the environment variable ECCODES_SAMPLES_PATH. More... | |
subroutine | codes_bufr_new_from_samples (bufrid, samplename, status) |
Create a new valid bufrid from a BUFR sample contained in a samples directory pointed by the environment variable ECCODES_SAMPLES_PATH. More... | |
subroutine | codes_release (msgid, status) |
Free the memory for the message referred as msgid. More... | |
subroutine | codes_clone (msgid_src, msgid_dest, status) |
Create a copy of a message. More... | |
subroutine | codes_copy_namespace (gribid_src, namespace, gribid_dest, status) |
Copy the value of all the keys belonging to a namespace from the source message to the destination message. More... | |
subroutine | codes_check (status, caller, string) |
Check the status returned by a subroutine. More... | |
subroutine | codes_grib_get_data_real4 (gribid, lats, lons, values, status) |
Get latitudes/longitudes/data values (real(4)). More... | |
subroutine | codes_grib_get_data_real8 (gribid, lats, lons, values, status) |
Get latitudes/longitudes/data values (real(8)). More... | |
subroutine | codes_keys_iterator_new (msgid, iterid, namespace, status) |
Create a new iterator on the keys. More... | |
subroutine | codes_keys_iterator_next (iterid, status) |
Advance to the next keys iterator value. More... | |
subroutine | codes_keys_iterator_delete (iterid, status) |
Delete a keys iterator and free memory. More... | |
subroutine | codes_keys_iterator_get_name (iterid, name, status) |
Get the name of a key from a keys iterator. More... | |
subroutine | codes_keys_iterator_rewind (iterid, status) |
Rewind a keys iterator. More... | |
subroutine | codes_dump (msgid, status) |
Dump the content of a message. More... | |
subroutine | codes_get_error_string (error, error_message, status) |
Get the error message given an error code. More... | |
subroutine | codes_get_size_int (msgid, key, size, status) |
Get the size of an array key. More... | |
subroutine | codes_get_size_long (msgid, key, size, status) |
Get the size of an array key. More... | |
subroutine | codes_get_int (msgid, key, value, status) |
Get the integer value of a key from a message. More... | |
subroutine | codes_get_long (msgid, key, value, status) |
Get the integer value of a key from a message. More... | |
subroutine | codes_is_missing (msgid, key, is_missing, status) |
Check if the value of a key is MISSING. More... | |
subroutine | codes_is_defined (msgid, key, is_defined, status) |
Check if a key is defined (exists in the message) More... | |
subroutine | codes_get_real4 (msgid, key, value, status) |
Get the real(4) value of a key from a message. More... | |
subroutine | codes_get_real8 (msgid, key, value, status) |
Get the real(8) value of a key from a message. More... | |
subroutine | codes_get_string (msgid, key, value, status) |
Get the character value of a key from a message. More... | |
subroutine | codes_get_string_array (msgid, key, value, status) |
Get the string array of values for a key from a message. More... | |
subroutine | codes_set_string_array (msgid, key, value, status) |
Set the string values for an array key in a message. More... | |
subroutine | codes_get_int_array (msgid, key, value, status) |
Get the integer array of values for a key from a message. More... | |
subroutine | codes_get_long_array (msgid, key, value, status) |
Get the integer array of values for a key from a message. More... | |
subroutine | codes_get_byte_array (msgid, key, value, length, status) |
Get the array of bytes (character) for a key from a message. More... | |
subroutine | codes_get_real4_array (msgid, key, value, status) |
Get the real(4) array of values for a key from a message. More... | |
subroutine | codes_get_real8_array (msgid, key, value, status) |
Get the real(8) array of values for a key from a message. More... | |
subroutine | codes_get_real4_element (msgid, key, index, value, status) |
Get a real(4) value of specified index from an array key. More... | |
subroutine | codes_get_real8_element (msgid, key, index, value, status) |
Get a real(8) value of specified index from an array key. More... | |
subroutine | codes_get_real4_elements (msgid, key, index, value, status) |
Get the real(4) values whose indexes are stored in the array "index" from an array key. More... | |
subroutine | codes_get_real8_elements (msgid, key, index, value, status) |
Get the real(8) values whose indexes are stored in the array "index" from an array key. More... | |
subroutine | codes_set_int (msgid, key, value, status) |
Set the integer value for a key in a message. More... | |
subroutine | codes_set_long (msgid, key, value, status) |
Set the integer value for a key in a message. More... | |
subroutine | codes_set_real4 (msgid, key, value, status) |
Set the real(4) value for a key in a message. More... | |
subroutine | codes_set_real8 (msgid, key, value, status) |
Set the real(8) value for a key in a message. More... | |
subroutine | codes_set_int_array (msgid, key, value, status) |
Set the integers values for an array key in a message. More... | |
subroutine | codes_set_long_array (msgid, key, value, status) |
Set the integers values for an array key in a message. More... | |
subroutine | codes_set_byte_array (msgid, key, value, length, status) |
Set the array of bytes (character) for a key in a message. More... | |
subroutine | codes_set_real4_array (msgid, key, value, status) |
Set the real(4) values for an array key in a message. More... | |
subroutine | codes_set_real8_array (msgid, key, value, status) |
Set the real(8) values for an array key in a message. More... | |
subroutine | codes_set_string (msgid, key, value, status) |
*/ More... | |
subroutine | codes_get_message_size_int (msgid, nbytes, status) |
Get the size of a coded message. More... | |
subroutine | codes_get_message_size_size_t (msgid, nbytes, status) |
Get the size of a coded message. More... | |
subroutine | codes_copy_message (msgid, message, status) |
Copy the coded message into an array. More... | |
subroutine | codes_write (msgid, ifile, status) |
Write the coded message to a file. More... | |
subroutine | codes_grib_multi_write (multigribid, ifile, status) |
Write a multi field message to a file. More... | |
subroutine | codes_grib_multi_append (ingribid, startsection, multigribid, status) |
Append a single field grib message to a multi field grib message. More... | |
subroutine | codes_grib_find_nearest_multiple (gribid, is_lsm, inlats, inlons, outlats, outlons, values, distances, indexes, status) |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. More... | |
subroutine | codes_grib_find_nearest_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status) |
Find the nearest point of a given latitude/longitude point. More... | |
subroutine | codes_grib_find_nearest_four_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status) |
Find the 4 nearest points of a latitude longitude point. More... | |
subroutine | codes_grib_multi_support_on (status) |
Turn on the support for multiple fields in a single message. More... | |
subroutine | codes_grib_multi_support_off (status) |
Turn off the support for multiple fields in a single message. More... | |
subroutine | codes_gribex_mode_on (status) |
Turn on the compatibility mode with gribex. More... | |
subroutine | codes_gribex_mode_off (status) |
Turn off the compatibility mode with GRIBEX. More... | |
subroutine | codes_skip_computed (iterid, status) |
Skip the computed keys in a keys iterator. More... | |
subroutine | codes_skip_coded (iterid, status) |
Skip the coded keys in a keys iterator. More... | |
subroutine | codes_skip_duplicates (iterid, status) |
Skip the duplicated keys in a keys iterator. More... | |
subroutine | codes_skip_read_only (iterid, status) |
Skip the read_only keys in a keys iterator. More... | |
subroutine | codes_set_definitions_path (path, status) |
Set the definition path. More... | |
subroutine | codes_set_samples_path (path, status) |
Set the samples path. More... | |
Module eccodes
+ This is the Fortran90 interface for ecCodes.
subroutine codes_any_new_from_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Load in memory a message from a file.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called.
+
ifile | id of the file opened with codes_open_file |
msgid | id of the message loaded in memory |
status | CODES_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code |
subroutine codes_bufr_new_from_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out) | +bufrid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Load in memory a BUFR message from a file.
+The message can be accessed through its bufrid and it will be available
+ until codes_release is called.
+ Examples: bufr_get_keys.f90
ifile | id of the file opened with codes_open_file |
bufrid | id of the BUFR loaded in memory |
status | CODES_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code |
subroutine codes_bufr_new_from_samples | +( | +integer(kind=kindofint), intent(out) | +bufrid, | +
+ | + | character(len=*), intent(in) | +samplename, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new valid bufrid from a BUFR sample contained in a samples directory pointed by the environment variable ECCODES_SAMPLES_PATH.
+To know where the samples directory is run the codes_info tool.
+ In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
bufrid | id of the BUFR loaded in memory |
samplename | name of the BUFR sample to be used |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_check | +( | +integer(kind=kindofint), intent(in) | +status, | +
+ | + | character(len=*), intent(in) | +caller, | +
+ | + | character(len=*), intent(in) | +string | +
+ | ) | ++ |
Check the status returned by a subroutine.
+In case of error it stops the program, returns the error code to the shell and prints the error message.
+
status | the status to be checked |
caller | name of the caller soubroutine |
string | a string variable from the caller routine (e.g. key,filename) |
subroutine codes_clone | +( | +integer(kind=kindofint), intent(in) | +msgid_src, | +
+ | + | integer(kind=kindofint), intent(out) | +msgid_dest, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a copy of a message.
+Create a copy of a given message (msgid_src) giving a new
+ message in memory (msgid_dest) exactly identical to the original one.
+ In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_clone.f90
+msgid_src | message to be cloned |
msgid_dest | new message returned |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_close_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Close a file.
+If the fileid does not refer to an opened file an error code is returned in status.
+ Examples: grib_get_keys.f90
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | is the id of the file to be closed. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_copy_message | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=1), dimension(:), intent(out) | +message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Copy the coded message into an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
message | array containing the coded message to be copied |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_copy_namespace | +( | +integer(kind=kindofint), intent(in) | +gribid_src, | +
+ | + | character(len=*), intent(in) | +namespace, | +
+ | + | integer(kind=kindofint), intent(in) | +gribid_dest, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Copy the value of all the keys belonging to a namespace from the source message to the destination message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid_src | source message |
gribid_dest | destination message |
namespace | namespace to be copied |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_count_in_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out) | +n, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Counts the messages in a file.
+Examples: count_messages.f90
+ifile | id of the file opened with codes_open_file |
n | number of messages in the file |
status | CODES_SUCCESS if OK or error code |
subroutine codes_dump | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Dump the content of a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_byte_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=1), dimension(:), intent(inout) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +length, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the array of bytes (character) for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | character(len=1) array of byte values |
length | (optional) output: number of values retrieved |
status | (optional) CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_error_string | +( | +integer(kind=kindofint), intent(in) | +error, | +
+ | + | character(len=*), intent(out) | +error_message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the error message given an error code.
+error | error code |
error_message | error message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindofint), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_int_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindoflong), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_long_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_message_size_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of a coded message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
nbytes | size in bytes of the message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_message_size_size_t | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofsize_t), intent(out) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of a coded message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
nbytes | size in bytes of the message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_element | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +index, | +
+ | + | real(kind = kindoffloat), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get a real(4) value of specified index from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) index |
value | real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_elements | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +index, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) values whose indexes are stored in the array "index" from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) array indexes |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_element | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +index, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get a real(8) value of specified index from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) index |
value | real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_elements | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +index, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) values whose indexes are stored in the array "index" from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) array index |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_size_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of an array key.
+To get the size of a key representing an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | name of the key |
size | size of the array key |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_size_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of an array key.
+To get the size of a key representing an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | name of the key |
size | size of the array key |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_string | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the character value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_string_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the string array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | string array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_four_single | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlat, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlon, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +outlat, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +outlon, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +value, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +distance, | +
+ | + | integer(kind = kindofint), dimension(4), intent(out) | +index, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the 4 nearest points of a latitude longitude point.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the GRIB loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlat | latitude of the point |
inlon | longitudes of the point |
outlat | latitude of the nearest point |
outlon | longitude of the nearest point |
distance | distance between the given point and its nearest |
index | zero based index |
value | value of the field in the nearest point |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_multiple | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +inlats, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +inlons, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +outlats, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +outlons, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +values, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +distances, | +
+ | + | integer(kind = kindofint), dimension(:), intent(out) | +indexes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlats | input real(8) array of the latitudes of the points |
inlons | input real(8) array of the longitudes of the points |
outlats | output real(8) array of the latitudes of the nearest points |
outlons | output real(8) array of the longitudes of the nearest points |
distances | output real(8) array of the distances |
indexes | output integer(4) array of the zero based indexes |
values | output real(8) array of the values |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_single | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlat, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlon, | +
+ | + | real(kind = kindofdouble), intent(out) | +outlat, | +
+ | + | real(kind = kindofdouble), intent(out) | +outlon, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | real(kind = kindofdouble), intent(out) | +distance, | +
+ | + | integer(kind = kindofint), intent(out) | +index, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the nearest point of a given latitude/longitude point.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlat | latitude of the point |
inlon | longitudes of the point |
outlat | latitude of the nearest point |
outlon | longitude of the nearest point |
distance | distance between the given point and its nearest |
index | zero based index |
value | value of the field in the nearest point |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_get_data_real4 | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +lats, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +lons, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get latitudes/longitudes/data values (real(4)).
+Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the caller and their required dimension can be obtained with codes_get_size or by getting (with codes_get) the value of the integer key "numberOfPoints".
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
lats | latitudes array with dimension "size" |
lons | longitudes array with dimension "size" |
values | data values array with dimension "size" |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_get_data_real8 | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +lats, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +lons, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get latitudes/longitudes/data values (real(8)).
+Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the calling program/function. Their required dimension can be obtained by getting (with codes_get) the value of the integer key "numberOfPoints". In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
lats | latitudes array |
lons | longitudes array |
values | data values array |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_multi_append | +( | +integer(kind=kindofint), intent(in) | +ingribid, | +
+ | + | integer(kind=kindofint), intent(in) | +startsection, | +
+ | + | integer(kind=kindofint), intent(out) | +multigribid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Append a single field grib message to a multi field grib message.
+Only the sections with section number greather or equal "startsection" are copied from the input single message to the multi field output grib.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ingribid | id of the input single grib |
startsection | starting from startsection (included) all the sections are copied from the input single grib to the output multi grib |
multigribid | id of the output multi filed grib |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_multi_support_off | +( | +integer(kind=kindofint), intent(out), optional | +status | ) | ++ |
Turn off the support for multiple fields in a single message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_multi_support_on | +( | +integer(kind=kindofint), intent(out), optional | +status | ) | ++ |
Turn on the support for multiple fields in a single message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_multi_write | +( | +integer(kind=kindofint), intent(in) | +multigribid, | +
+ | + | integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write a multi field message to a file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
multigribid | id of the multi field grib loaded in memory |
ifile | file id of a file opened with codes_open_file |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_new_from_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out) | +gribid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Load in memory a GRIB message from a file.
+The message can be accessed through its gribid and it will be available
+ until codes_release is called.
+ Examples: grib_get_keys.f90
ifile | id of the file opened with codes_open_file |
gribid | id of the GRIB loaded in memory |
status | CODES_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code |
subroutine codes_grib_new_from_samples | +( | +integer(kind=kindofint), intent(out) | +gribid, | +
+ | + | character(len=*), intent(in) | +samplename, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new valid gribid from a GRIB sample contained in a samples directory pointed by the environment variable ECCODES_SAMPLES_PATH.
+To know where the samples directory is run the codes_info tool.
+ In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_samples.f90
+gribid | id of the grib loaded in memory |
samplename | name of the sample to be used |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_gribex_mode_off | +( | +integer(kind=kindofint), intent(out), optional | +status | ) | ++ |
Turn off the compatibility mode with GRIBEX.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_gribex_mode_on | +( | +integer(kind=kindofint), intent(out), optional | +status | ) | ++ |
Turn on the compatibility mode with gribex.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_add_file | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +filename, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Add a file to an index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of the index I want to add a file to |
filename | name of the file I want to add to the index |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_create | +( | +integer(kind=kindofint), intent(inout) | +indexid, | +
+ | + | character(len=*), intent(in) | +filename, | +
+ | + | character(len=*), intent(in) | +keys, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new index form a file.
+The file is indexed with the keys in argument.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of the newly created index |
filename | name of the file of messages to be indexed |
keys | comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long (or alternatively :i), :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_real8 | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind=kindofdouble), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_size_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for which the number of values is computed |
size | number of distinct values of the key in the index |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_size_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for which the number of values is computed |
size | number of distinct values of the key in the index |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_string | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_read | +( | +integer(kind=kindofint), intent(inout) | +indexid, | +
+ | + | character(len=*), intent(in) | +filename, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Load an index file previously created with codes_index_write.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of loaded index |
filename | name of the index file to load |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_release | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Delete the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
indexid | id of an index created from a file. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_real8 | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind=kindofdouble), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a real. The key must have been created with real type or have real as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_string | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. 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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_write | +( | +integer(kind=kindofint), intent(inout) | +indexid, | +
+ | + | character(len=*), intent(in) | +filename, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Saves an index to a file for later reuse.
+Index files can be read with codes_index_read.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of the index to save to file |
filename | name of file to save the index to |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_is_defined | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindofint), intent(out) | +is_defined, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Check if a key is defined (exists in the message)
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
is_defined | 0->not defined, 1->defined |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_is_missing | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindofint), intent(out) | +is_missing, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Check if the value of a key is MISSING.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
is_missing | 0->not missing, 1->missing |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_keys_iterator_delete | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Delete a keys iterator and free memory.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
iterid | keys iterator id created with codes_keys_iterator_new |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_keys_iterator_get_name | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | character(len=*), intent(out) | +name, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the name of a key from a keys iterator.
+If the status parameter (optional) is not given the program will exit with an error message
+ otherwise the error message can be gathered with codes_get_error_string.
+
iterid | keys iterator id created with codes_keys_iterator_new |
name | key name to be retrieved |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_keys_iterator_new | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(inout) | +iterid, | +
+ | + | character(len=*), intent(in) | +namespace, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new iterator on the keys.
+The keys iterator can be navigated to give all the key names which can then be used to get or set the key values with codes_get or codes_set. The set of keys returned can be controlled with the input variable namespace or using the functions codes_skip_read_only, codes_skip_duplicates, codes_skip_coded,codes_skip_computed. If namespace is a non-empty string only the keys belonging to that namespace are returned. Example namespaces are "ls" (to get the same default keys as the grib_ls) and "mars" to get the keys used by mars.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
iterid | keys iterator id to be used in the keys iterator functions |
namespace | the namespace of the keys to search for (all the keys if empty) |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_keys_iterator_next | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Advance to the next keys iterator value.
+iterid | keys iterator id created with codes_keys_iterator_new |
status | CODES_SUCCESS if next iterator exists, integer value if no more elements to iterate on |
subroutine codes_keys_iterator_rewind | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Rewind a keys iterator.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
iterid | keys iterator id created with codes_keys_iterator_new |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_new_from_file | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | integer(kind=kindofint), intent(in) | +product_kind, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Load in memory a message from a file.
+The message can be accessed through its message ID and it will be available
+ until codes_release is called.
+ Examples: grib_get_keys.f90
ifile | id of the file opened with codes_open_file |
msgid | id of the message loaded in memory |
product_kind | One of CODES_PRODUCT_GRIB, CODES_PRODUCT_BUFR or CODES_PRODUCT_ANY |
status | CODES_SUCCESS if OK, CODES_END_OF_FILE at the end of file, or error code |
subroutine codes_new_from_index | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new handle from an index after having selected the key values.
+All the keys belonging to the index must be selected before calling this function. Successive calls to this function will return all the handles compatible with the constraints defined selecting the values of the index keys. When no more handles are available from the index a NULL pointer is returned and the err variable is set to CODES_END_OF_INDEX.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called.
+ Examples: grib_index.f90
indexid | id of an index created from a file. |
msgid | id of the message loaded in memory |
status | CODES_SUCCESS if OK, CODES_END_OF_FILE at the end of file, or error code |
subroutine codes_new_from_message_char | +( | +integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | character(len=1), dimension(:), intent(in) | +message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new message in memory from a character array containting the coded message.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called. A reference to the original coded
+ message is kept in the new message structure.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_copy_message.f90
+msgid | id of the message loaded in memory |
message | character array containing the coded message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_new_from_message_int4 | +( | +integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new message in memory from an integer array containting the coded message.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called. A reference to the original coded
+ message is kept in the new message structure.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_copy_message.f90
+msgid | id of the message loaded in memory |
message | integer array containing the coded message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_open_file | +( | +integer(kind=kindofint), intent(out) | +ifile, | +
+ | + | character(len=*), intent(in) | +filename, | +
+ | + | character(len=*), intent(in) | +mode, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Open a file according to a mode.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_get_keys.f90
+ifile | id of the opened file to be used in all the file functions. |
filename | name of the file to be open |
mode | open mode can be 'r' (read only) or 'w' (write only) |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real8 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real8_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_real4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_real4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_real8 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_real8_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_release | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Free the memory for the message referred as msgid.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_get_keys.f90
+msgid | id of the message loaded in memory |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_byte_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=1), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +length, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the array of bytes (character) for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | character(len=1) array of byte values |
length | (optional) output: number of values written |
status | (optional) CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_definitions_path | +( | +character(len=*), intent(in) | +path, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the definition path.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
path | definitions path |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integer value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_int_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integers values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integer value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_long_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integers values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_missing | +( | +integer(kind=kindofint), intent(in) | +id, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Wrapper for eccodes.
+Set as missing the value for a key in a message.
+It can be used to set a missing value in the header but not in
+ the data values. To set missing data values see the bitmap examples.
+ In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_set_missing.f90
+id | ID of the message loaded in memory |
key | key name |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real4 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(4) value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real4_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(4) values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real8 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(8) value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real8_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(8) values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_samples_path | +( | +character(len=*), intent(in) | +path, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the samples path.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
path | samples path |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_string | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
*/
+Set the character value for a string key in a grib message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
value | character value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_string_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), dimension(:), intent(in), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the string values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | string array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_skip_coded | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Skip the coded keys in a keys iterator.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
The coded keys are actually coded in the message.
+ +iterid | keys iterator id |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_skip_computed | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Skip the computed keys in a keys iterator.
+The computed keys are not coded in the message they are computed from other keys.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
iterid | keys iterator id |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_skip_duplicates | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Skip the duplicated keys in a keys iterator.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
iterid | keys iterator id |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_skip_read_only | +( | +integer(kind=kindofint), intent(in) | +iterid, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Skip the read_only keys in a keys iterator.
+Read only keys cannot be set.
+ +iterid | keys iterator id |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write the coded message to a file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
ifile | file id of a file opened with codes_open_file |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real8 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real8_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+Files | |
file | bufr_attributes.py |
file | bufr_clone.py |
file | bufr_encode_flight.py |
file | bufr_expanded.py |
file | bufr_get_keys.py |
file | bufr_keys_iterator.py |
file | bufr_read_header.py |
file | bufr_read_scatterometer.py |
file | bufr_read_synop.py |
file | bufr_read_temp.py |
file | bufr_read_tropical_cyclone.py |
file | bufr_set_keys.py |
file | bufr_subset.py |
file | get_product_kind.py |
file | grib_ccsds.py |
file | grib_clone.py |
file | grib_get_keys.py |
file | grib_index.py |
file | python/grib_iterator.c |
file | grib_iterator.py |
file | grib_iterator_bitmap.py |
file | python/grib_keys_iterator.c |
file | grib_keys_iterator.py |
file | grib_multi_write.py |
file | grib_nearest.py |
file | python/grib_print_data.c |
file | grib_print_data.py |
file | grib_samples.py |
file | grib_set_bitmap.py |
file | grib_set_keys.py |
file | grib_set_missing.py |
file | grib_set_pv.py |
file | gts_get_keys.py |
file | keys_iterator_bufr.py |
file | keys_iterator_gts.py |
file | metar_get_keys.py |
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+Files | |
file | box.c |
file | bufr_attributes.c |
file | bufr_clone.c |
file | bufr_expanded.c |
file | bufr_get_keys.c |
file | bufr_keys_iterator.c |
file | bufr_missing.c |
file | bufr_read_header.c |
file | bufr_read_scatterometer.c |
file | bufr_read_synop.c |
file | bufr_read_temp.c |
file | bufr_set_keys.c |
file | bufr_subset.c |
file | fieldset.c |
file | get_product_kind.c |
file | grib_clone.c |
file | grib_ensemble_index.c |
file | grib_get_data.c |
file | grib_get_keys.c |
file | grib_index.c |
file | C/grib_iterator.c |
file | grib_iterator_bitmap.c |
file | C/grib_keys_iterator.c |
file | grib_list.c |
file | grib_multi.c |
file | grib_multi_write.c |
file | grib_nearest.c |
file | grib_precipitation.c |
file | grib_precision.c |
file | C/grib_print_data.c |
file | grib_pthreads.c |
file | grib_set_bitmap.c |
file | grib_set_data.c |
file | grib_set_keys.c |
file | grib_set_pv.c |
file | large_grib1.c |
file | mars_param.c |
file | multi2.c |
file | nc.c |
file | new_sample.c |
file | points.c |
file | sections_copy.c |
file | set_missing.c |
file | values_check.c |
+ eccodes
+
+ |
+
The ecCodes C header file. +More...
++Macros | |
#define | CODES_KEYS_ITERATOR_ALL_KEYS 0 |
#define | CODES_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0) |
#define | CODES_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1) |
#define | CODES_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2) |
#define | CODES_KEYS_ITERATOR_SKIP_CODED (1<<3) |
#define | CODES_KEYS_ITERATOR_SKIP_COMPUTED (1<<4) |
#define | CODES_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5) |
#define | CODES_KEYS_ITERATOR_SKIP_FUNCTION (1<<6) |
#define | CODES_SUCCESS 0 |
No error. More... | |
#define | CODES_END_OF_FILE -1 |
End of resource reached. More... | |
#define | CODES_INTERNAL_ERROR -2 |
Internal error. More... | |
#define | CODES_BUFFER_TOO_SMALL -3 |
Passed buffer is too small. More... | |
#define | CODES_NOT_IMPLEMENTED -4 |
Function not yet implemented. More... | |
#define | CODES_7777_NOT_FOUND -5 |
Missing 7777 at end of message. More... | |
#define | CODES_ARRAY_TOO_SMALL -6 |
Passed array is too small. More... | |
#define | CODES_FILE_NOT_FOUND -7 |
File not found. More... | |
#define | CODES_CODE_NOT_FOUND_IN_TABLE -8 |
Code not found in code table. More... | |
#define | CODES_WRONG_ARRAY_SIZE -9 |
Array size mismatch. More... | |
#define | CODES_NOT_FOUND -10 |
Key/value not found. More... | |
#define | CODES_IO_PROBLEM -11 |
Input output problem. More... | |
#define | CODES_INVALID_MESSAGE -12 |
Message invalid. More... | |
#define | CODES_DECODING_ERROR -13 |
Decoding invalid. More... | |
#define | CODES_ENCODING_ERROR -14 |
Encoding invalid. More... | |
#define | CODES_NO_MORE_IN_SET -15 |
Code cannot unpack because of string too small. More... | |
#define | CODES_GEOCALCULUS_PROBLEM -16 |
Problem with calculation of geographic attributes. More... | |
#define | CODES_OUT_OF_MEMORY -17 |
Out of memory. More... | |
#define | CODES_READ_ONLY -18 |
Value is read only. More... | |
#define | CODES_INVALID_ARGUMENT -19 |
Invalid argument. More... | |
#define | CODES_NULL_HANDLE -20 |
Null handle. More... | |
#define | CODES_INVALID_SECTION_NUMBER -21 |
Invalid section number. More... | |
#define | CODES_VALUE_CANNOT_BE_MISSING -22 |
Value cannot be missing. More... | |
#define | CODES_WRONG_LENGTH -23 |
Wrong message length. More... | |
#define | CODES_INVALID_TYPE -24 |
Invalid key type. More... | |
#define | CODES_WRONG_STEP -25 |
Unable to set step. More... | |
#define | CODES_WRONG_STEP_UNIT -26 |
Wrong units for step (step must be integer) More... | |
#define | CODES_INVALID_FILE -27 |
Invalid file id. More... | |
#define | CODES_INVALID_GRIB -28 |
Invalid grib id. More... | |
#define | CODES_INVALID_INDEX -29 |
Invalid index id. More... | |
#define | CODES_INVALID_ITERATOR -30 |
Invalid iterator id. More... | |
#define | CODES_INVALID_KEYS_ITERATOR -31 |
Invalid keys iterator id. More... | |
#define | CODES_INVALID_NEAREST -32 |
Invalid nearest id. More... | |
#define | CODES_INVALID_ORDERBY -33 |
Invalid order by. More... | |
#define | CODES_MISSING_KEY -34 |
Missing a key from the fieldset. More... | |
#define | CODES_OUT_OF_AREA -35 |
The point is out of the grid area. More... | |
#define | CODES_CONCEPT_NO_MATCH -36 |
Concept no match. More... | |
#define | CODES_HASH_ARRAY_NO_MATCH -37 |
Hash array no match. More... | |
#define | CODES_NO_DEFINITIONS -38 |
Definitions files not found. More... | |
#define | CODES_WRONG_TYPE -39 |
Wrong type while packing. More... | |
#define | CODES_END -40 |
End of resource. More... | |
#define | CODES_NO_VALUES -41 |
Unable to code a field without values. More... | |
#define | CODES_WRONG_GRID -42 |
Grid description is wrong or inconsistent. More... | |
#define | CODES_END_OF_INDEX -43 |
End of index reached. More... | |
#define | CODES_NULL_INDEX -44 |
Null index. More... | |
#define | CODES_PREMATURE_END_OF_FILE -45 |
End of resource reached when reading message. More... | |
#define | CODES_INTERNAL_ARRAY_TOO_SMALL -46 |
An internal array is too small. More... | |
#define | CODES_MESSAGE_TOO_LARGE -47 |
Message is too large for the current architecture. More... | |
#define | CODES_CONSTANT_FIELD -48 |
Constant field. More... | |
#define | CODES_SWITCH_NO_MATCH -49 |
Switch unable to find a matching case. More... | |
#define | CODES_UNDERFLOW -50 |
Underflow. More... | |
#define | CODES_MESSAGE_MALFORMED -51 |
Message malformed. More... | |
#define | CODES_CORRUPTED_INDEX -52 |
Index is corrupted. More... | |
#define | CODES_INVALID_BPV -53 |
Invalid number of bits per value. More... | |
#define | CODES_DIFFERENT_EDITION -54 |
Edition of two messages is different. More... | |
#define | CODES_VALUE_DIFFERENT -55 |
Value is different. More... | |
#define | CODES_INVALID_KEY_VALUE -56 |
Invalid key value. More... | |
#define | CODES_STRING_TOO_SMALL -57 |
String is smaller than requested. More... | |
#define | CODES_WRONG_CONVERSION -58 |
Wrong type conversion. More... | |
#define | CODES_MISSING_BUFR_ENTRY -59 |
Missing BUFR table entry for descriptor. More... | |
#define | CODES_NULL_POINTER -60 |
Null pointer. More... | |
#define | CODES_ATTRIBUTE_CLASH -61 |
Attribute is already present, cannot add. More... | |
#define | CODES_TOO_MANY_ATTRIBUTES -62 |
Too many attributes. More... | |
#define | CODES_ATTRIBUTE_NOT_FOUND -63 |
Attribute not found. More... | |
#define | CODES_UNSUPPORTED_EDITION -64 |
Edition not supported. More... | |
#define | CODES_OUT_OF_RANGE -65 |
Value out of coding range. More... | |
#define | CODES_WRONG_BITMAP_SIZE -66 |
Size of bitmap is incorrect. More... | |
+Functions | |
codes_index * | codes_index_new_from_file (codes_context *c, char *filename, const char *keys, int *err) |
Create a new index form a file. More... | |
codes_index * | codes_index_new (codes_context *c, const char *keys, int *err) |
Create a new index based on a set of keys. More... | |
int | codes_index_add_file (grib_index *index, const char *filename) |
Indexes the file given in argument in the index given in argument. More... | |
int | codes_index_get_size (codes_index *index, const char *key, size_t *size) |
Get the number of distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_long (codes_index *index, const char *key, long *values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_double (codes_index *index, const char *key, double *values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_string (codes_index *index, const char *key, char **values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_select_long (codes_index *index, const char *key, long value) |
Select the message subset with key==value. More... | |
int | codes_index_select_double (codes_index *index, const char *key, double value) |
Select the message subset with key==value. More... | |
int | codes_index_select_string (codes_index *index, const char *key, char *value) |
Select the message subset with key==value. More... | |
codes_handle * | codes_handle_new_from_index (codes_index *index, int *err) |
Create a new handle from an index after having selected the key values. More... | |
void | codes_index_delete (codes_index *index) |
Delete the index. More... | |
int | codes_count_in_file (codes_context *c, FILE *f, int *n) |
Counts the messages contained in a file resource. More... | |
grib_handle * | codes_handle_new_from_file (grib_context *c, FILE *f, ProductKind product, int *error) |
Create a handle from a file resource. More... | |
grib_handle * | codes_grib_handle_new_from_file (grib_context *c, FILE *f, int *error) |
Create a GRIB handle from a file resource. More... | |
grib_handle * | codes_bufr_handle_new_from_file (grib_context *c, FILE *f, int *error) |
Create a BUFR handle from a file resource. More... | |
int | codes_write_message (codes_handle *h, const char *file, const char *mode) |
Write a coded message to a file. More... | |
codes_handle * | codes_handle_new_from_message (codes_context *c, void *data, size_t data_len) |
Create a handle from a user message in memory. More... | |
codes_handle * | codes_grib_handle_new_from_multi_message (codes_context *c, void **data, size_t *data_len, int *error) |
Create a handle from a user message in memory. More... | |
codes_handle * | codes_handle_new_from_message_copy (codes_context *c, const void *data, size_t data_len) |
Create a handle from a user message. More... | |
codes_handle * | codes_grib_handle_new_from_samples (codes_context *c, const char *res_name) |
Create a handle from a GRIB message contained in a samples directory. More... | |
codes_handle * | codes_bufr_handle_new_from_samples (codes_context *c, const char *res_name) |
Create a handle from a BUFR message contained in a samples directory. More... | |
codes_handle * | codes_handle_clone (codes_handle *h) |
Clone an existing handle using the context of the original handle, The message is copied and reparsed. More... | |
int | codes_handle_delete (codes_handle *h) |
Frees a handle, also frees the message if it is not a user message. More... | |
codes_multi_handle * | codes_grib_multi_handle_new (codes_context *c) |
Create an empty multi-field GRIB handle. More... | |
int | codes_grib_multi_handle_append (codes_handle *h, int start_section, codes_multi_handle *mh) |
Append the sections starting with start_section of the message pointed by h at the end of the multi-field GRIB handle mh. More... | |
int | codes_grib_multi_handle_delete (codes_multi_handle *mh) |
Delete multi-field GRIB handle. More... | |
int | codes_grib_multi_handle_write (codes_multi_handle *mh, FILE *f) |
Write a multi-field GRIB handle in a file. More... | |
int | codes_get_message (codes_handle *h, const void **message, size_t *message_length) |
getting the message attached to a handle More... | |
int | codes_get_message_copy (codes_handle *h, void *message, size_t *message_length) |
getting a copy of the message attached to a handle More... | |
codes_iterator * | codes_grib_iterator_new (codes_handle *h, unsigned long flags, int *error) |
Create a new iterator from a GRIB handle, using current geometry and values. More... | |
int | codes_grib_get_data (codes_handle *h, double *lats, double *lons, double *values) |
Get latitude/longitude and data values. More... | |
int | codes_grib_iterator_next (codes_iterator *i, double *lat, double *lon, double *value) |
Get the next value from an iterator. More... | |
int | codes_grib_iterator_previous (codes_iterator *i, double *lat, double *lon, double *value) |
Get the previous value from an iterator. More... | |
int | codes_grib_iterator_has_next (codes_iterator *i) |
Test procedure for values in an iterator. More... | |
int | codes_grib_iterator_reset (codes_iterator *i) |
Test procedure for values in an iterator. More... | |
int | codes_grib_iterator_delete (codes_iterator *i) |
Frees an iterator from memory. More... | |
codes_nearest * | codes_grib_nearest_new (codes_handle *h, int *error) |
Create a new nearest from a handle, using current geometry . More... | |
int | codes_grib_nearest_find (codes_nearest *nearest, codes_handle *h, double inlat, double inlon, unsigned long flags, double *outlats, double *outlons, double *values, double *distances, int *indexes, size_t *len) |
Find the 4 nearest points of a latitude longitude point. More... | |
int | codes_grib_nearest_delete (codes_nearest *nearest) |
Frees an nearest from memory. More... | |
int | codes_grib_nearest_find_multiple (codes_handle *h, int is_lsm, double *inlats, double *inlons, long npoints, double *outlats, double *outlons, double *values, double *distances, int *indexes) |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. More... | |
int | codes_get_offset (codes_handle *h, const char *key, size_t *offset) |
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. More... | |
int | codes_get_size (codes_handle *h, const char *key, size_t *size) |
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. More... | |
int | codes_get_length (codes_handle *h, const char *key, size_t *length) |
Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned. More... | |
int | codes_get_long (codes_handle *h, const char *key, long *value) |
Get a long value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_double (codes_handle *h, const char *key, double *value) |
Get a double value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_double_element (codes_handle *h, const char *key, int i, double *value) |
Get as double the i-th element of the "key" array. More... | |
int | codes_get_double_elements (codes_handle *h, const char *key, int *i, long size, double *value) |
Get as double array the elements of the "key" array whose indexes are listed in the input array i. More... | |
int | codes_get_string (codes_handle *h, const char *key, char *mesg, size_t *length) |
Get a string value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_bytes (codes_handle *h, const char *key, unsigned char *bytes, size_t *length) |
Get raw bytes values from a key. More... | |
int | codes_get_double_array (codes_handle *h, const char *key, double *vals, size_t *length) |
Get double array values from a key. More... | |
int | codes_get_long_array (codes_handle *h, const char *key, long *vals, size_t *length) |
Get long array values from a key. More... | |
int | codes_copy_namespace (codes_handle *dest, const char *name, codes_handle *src) |
Copy the keys belonging to a given namespace from a source handle to a destination handle. More... | |
int | codes_set_long (codes_handle *h, const char *key, long val) |
Set a long value from a key. More... | |
int | codes_set_double (codes_handle *h, const char *key, double val) |
Set a double value from a key. More... | |
int | codes_set_string (codes_handle *h, const char *key, const char *mesg, size_t *length) |
Set a string value from a key. More... | |
int | codes_set_bytes (codes_handle *h, const char *key, const unsigned char *bytes, size_t *length) |
Set a bytes array from a key. More... | |
int | codes_set_double_array (codes_handle *h, const char *key, const double *vals, size_t length) |
Set a double array from a key. More... | |
int | codes_set_force_double_array (codes_handle *h, const char *key, const double *vals, size_t length) |
Same as codes_set_double_array but allows setting of READ-ONLY keys like codedValues. More... | |
int | codes_set_long_array (codes_handle *h, const char *key, const long *vals, size_t length) |
Set a long array from a key. More... | |
void | codes_dump_content (codes_handle *h, FILE *out, const char *mode, unsigned long option_flags, void *arg) |
Print all keys, with the context print procedure and dump mode to a resource. More... | |
void | codes_dump_action_tree (codes_context *c, FILE *f) |
Print all keys from the parsed definition files available in a context. More... | |
codes_context * | codes_context_get_default (void) |
Get the static default context. More... | |
void | codes_context_delete (codes_context *c) |
Frees the cached definition files of the context. More... | |
void | codes_gts_header_on (codes_context *c) |
Set the GTS header mode on. More... | |
void | codes_gts_header_off (codes_context *c) |
Set the GTS header mode off. More... | |
void | codes_gribex_mode_on (codes_context *c) |
Set the GRIBEX mode on. More... | |
int | codes_get_gribex_mode (codes_context *c) |
Get the GRIBEX mode. More... | |
void | codes_gribex_mode_off (codes_context *c) |
Set the GRIBEX mode off. More... | |
void | codes_context_set_definitions_path (grib_context *c, const char *path) |
Sets the search path for definition files. More... | |
void | codes_context_set_samples_path (grib_context *c, const char *path) |
Sets the search path for sample files. More... | |
void | codes_grib_multi_support_on (codes_context *c) |
Turn on support for multiple fields in single GRIB messages. More... | |
void | codes_grib_multi_support_off (codes_context *c) |
Turn off support for multiple fields in single GRIB messages. More... | |
void | codes_grib_multi_support_reset_file (codes_context *c, FILE *f) |
Reset file handle in multiple GRIB field support mode. More... | |
long | codes_get_api_version (void) |
Get the API version. More... | |
const char * | codes_get_git_sha1 (void) |
Get the Git version control SHA1 identifier. More... | |
void | codes_print_api_version (FILE *out) |
Prints the API version. More... | |
codes_keys_iterator * | codes_keys_iterator_new (codes_handle *h, unsigned long filter_flags, const char *name_space) |
int | codes_keys_iterator_next (codes_keys_iterator *kiter) |
const char * | codes_keys_iterator_get_name (codes_keys_iterator *kiter) |
int | codes_keys_iterator_delete (codes_keys_iterator *kiter) |
int | codes_keys_iterator_rewind (codes_keys_iterator *kiter) |
const char * | codes_get_error_message (int code) |
Convert an error code into a string. More... | |
The ecCodes C header file.
+This is the only file that must be included to use the ecCodes library from C.
+void codes_dump_action_tree | +( | +codes_context * | +c, | +
+ | + | FILE * | +f | +
+ | ) | ++ |
Print all keys from the parsed definition files available in a context.
+f | : the File used to print the keys on |
c | : the context that contains the cached definition files to be printed |
void codes_dump_content | +( | +codes_handle * | +h, | +
+ | + | FILE * | +out, | +
+ | + | const char * | +mode, | +
+ | + | unsigned long | +option_flags, | +
+ | + | void * | +arg | +
+ | ) | ++ |
Print all keys, with the context print procedure and dump mode to a resource.
+h | : the handle to be printed |
out | : output file handle |
mode | : available dump modes are: debug wmo c_code |
option_flags | : all the CODES_DUMP_FLAG_x flags can be used |
arg | : used to provide a format to output data (experimental) |
long codes_get_api_version | +( | +void | +) | ++ |
Get the API version.
+Get the API version.
+Returns the version of the api as a string in the format "major.minor.revision".
+ +Referenced by ecCodes::codes_index_get(), and ecCodes::codes_index_select().
+ +const char* codes_get_error_message | +( | +int | +code | ) | ++ |
Convert an error code into a string.
+code | : the error code |
const char* codes_get_git_sha1 | +( | +void | +) | ++ |
Get the Git version control SHA1 identifier.
+void codes_print_api_version | +( | +FILE * | +out | ) | ++ |
Prints the API version.
+ +grib_api.h | Copyright 2005-2016 ECMWF |
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
-Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation: -
-
+ eccodes
+
+ |
+
- -
-
+ eccodes
+
+ |
+
- -
-
+ eccodes
+
+ |
+
+Data Structures | |
struct | codes_handle |
struct | codes_multi_handle |
+Functions | |
int | codes_count_in_file (codes_context *c, FILE *f, int *n) |
Counts the messages contained in a file resource. More... | |
grib_handle * | codes_handle_new_from_file (grib_context *c, FILE *f, ProductKind product, int *error) |
Create a handle from a file resource. More... | |
grib_handle * | codes_grib_handle_new_from_file (grib_context *c, FILE *f, int *error) |
Create a GRIB handle from a file resource. More... | |
grib_handle * | codes_bufr_handle_new_from_file (grib_context *c, FILE *f, int *error) |
Create a BUFR handle from a file resource. More... | |
int | codes_write_message (codes_handle *h, const char *file, const char *mode) |
Write a coded message to a file. More... | |
codes_handle * | codes_handle_new_from_message (codes_context *c, void *data, size_t data_len) |
Create a handle from a user message in memory. More... | |
codes_handle * | codes_grib_handle_new_from_multi_message (codes_context *c, void **data, size_t *data_len, int *error) |
Create a handle from a user message in memory. More... | |
codes_handle * | codes_handle_new_from_message_copy (codes_context *c, const void *data, size_t data_len) |
Create a handle from a user message. More... | |
codes_handle * | codes_grib_handle_new_from_samples (codes_context *c, const char *res_name) |
Create a handle from a GRIB message contained in a samples directory. More... | |
codes_handle * | codes_bufr_handle_new_from_samples (codes_context *c, const char *res_name) |
Create a handle from a BUFR message contained in a samples directory. More... | |
codes_handle * | codes_handle_clone (codes_handle *h) |
Clone an existing handle using the context of the original handle, The message is copied and reparsed. More... | |
int | codes_handle_delete (codes_handle *h) |
Frees a handle, also frees the message if it is not a user message. More... | |
codes_multi_handle * | codes_grib_multi_handle_new (codes_context *c) |
Create an empty multi-field GRIB handle. More... | |
int | codes_grib_multi_handle_append (codes_handle *h, int start_section, codes_multi_handle *mh) |
Append the sections starting with start_section of the message pointed by h at the end of the multi-field GRIB handle mh. More... | |
int | codes_grib_multi_handle_delete (codes_multi_handle *mh) |
Delete multi-field GRIB handle. More... | |
int | codes_grib_multi_handle_write (codes_multi_handle *mh, FILE *f) |
Write a multi-field GRIB handle in a file. More... | |
The codes_handle is the structure giving access to parsed message values by keys.
+grib_handle* codes_bufr_handle_new_from_file | +( | +grib_context * | +c, | +
+ | + | FILE * | +f, | +
+ | + | int * | +error | +
+ | ) | ++ |
Create a BUFR handle from a file resource.
+The file is read until a BUFR message is found. The message is then copied. Remember always to delete the handle when it is not needed anymore to avoid memory leaks.
+c | : the context from which the handle will be created (NULL for default context) |
f | : the file resource |
error | : error code set if the returned handle is NULL and the end of file is not reached |
codes_handle* codes_bufr_handle_new_from_samples | +( | +codes_context * | +c, | +
+ | + | const char * | +res_name | +
+ | ) | ++ |
Create a handle from a BUFR message contained in a samples directory.
+The message is copied at the creation of the handle
+c | : the context from which the handle will be created (NULL for default context) |
res_name | : the resource name |
int codes_count_in_file | +( | +codes_context * | +c, | +
+ | + | FILE * | +f, | +
+ | + | int * | +n | +
+ | ) | ++ |
Counts the messages contained in a file resource.
+c | : the context from which the handle will be created (NULL for default context) |
f | : the file resource |
n | : the number of messages in the file |
grib_handle* codes_grib_handle_new_from_file | +( | +grib_context * | +c, | +
+ | + | FILE * | +f, | +
+ | + | int * | +error | +
+ | ) | ++ |
Create a GRIB handle from a file resource.
+The file is read until a GRIB message is found. The message is then copied. Remember always to delete the handle when it is not needed anymore to avoid memory leaks.
+c | : the context from which the handle will be created (NULL for default context) |
f | : the file resource |
error | : error code set if the returned handle is NULL and the end of file is not reached |
codes_handle* codes_grib_handle_new_from_multi_message | +( | +codes_context * | +c, | +
+ | + | void ** | +data, | +
+ | + | size_t * | +data_len, | +
+ | + | int * | +error | +
+ | ) | ++ |
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.
+c | : the context from which the handle will be created (NULL for default context) |
data | : the actual message |
data_len | : the length of the message in number of bytes |
error | : error code |
codes_handle* codes_grib_handle_new_from_samples | +( | +codes_context * | +c, | +
+ | + | const char * | +res_name | +
+ | ) | ++ |
Create a handle from a GRIB message contained in a samples directory.
+The message is copied at the creation of the handle
+c | : the context from which the handle will be created (NULL for default context) |
res_name | : the resource name |
int codes_grib_multi_handle_append | +( | +codes_handle * | +h, | +
+ | + | int | +start_section, | +
+ | + | codes_multi_handle * | +mh | +
+ | ) | ++ |
Append the sections starting with start_section of the message pointed by h at the end of the multi-field GRIB handle mh.
+Remember always to delete the multi-handle when it is not needed any more to avoid memory leaks.
+h | : The handle from which the sections are copied. |
start_section | : section number. Starting from this section all the sections to the end of the message will be copied. |
mh | : The multi-field handle on which the sections are appended. |
int codes_grib_multi_handle_delete | +( | +codes_multi_handle * | +mh | ) | ++ |
Delete multi-field GRIB handle.
+mh | : The multi-field handle to be deleted. |
codes_multi_handle* codes_grib_multi_handle_new | +( | +codes_context * | +c | ) | ++ |
Create an empty multi-field GRIB handle.
+Remember always to delete the multi-handle when it is not needed any more to avoid memory leaks.
+c | : the context from which the handle will be created (NULL for default context) |
int codes_grib_multi_handle_write | +( | +codes_multi_handle * | +mh, | +
+ | + | FILE * | +f | +
+ | ) | ++ |
Write a multi-field GRIB handle in a file.
+Remember always to delete the multi-handle when it is not needed any more to avoid memory leaks.
+mh | : The multi-field GRIB handle to be written. |
f | : File on which the file handle is written. |
codes_handle* codes_handle_clone | +( | +codes_handle * | +h | ) | ++ |
Clone an existing handle using the context of the original handle, The message is copied and reparsed.
+h | : The handle to be cloned |
int codes_handle_delete | +( | +codes_handle * | +h | ) | ++ |
Frees a handle, also frees the message if it is not a user message.
+h | : The handle to be deleted |
grib_handle* codes_handle_new_from_file | +( | +grib_context * | +c, | +
+ | + | FILE * | +f, | +
+ | + | ProductKind | +product, | +
+ | + | int * | +error | +
+ | ) | ++ |
Create a handle from a file resource.
+The file is read until a message is found. The message is then copied. Remember always to delete the handle when it is not needed anymore to avoid memory leaks.
+c | : the context from which the handle will be created (NULL for default context) |
f | : the file resource |
product | : the kind of product e.g. PRODUCT_GRIB, PRODUCT_BUFR |
error | : error code set if the returned handle is NULL and the end of file is not reached |
codes_handle* codes_handle_new_from_message | +( | +codes_context * | +c, | +
+ | + | void * | +data, | +
+ | + | size_t | +data_len | +
+ | ) | ++ |
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.
+c | : the context from which the handle will be created (NULL for default context) |
data | : the actual message |
data_len | : the length of the message in number of bytes |
codes_handle* codes_handle_new_from_message_copy | +( | +codes_context * | +c, | +
+ | + | const void * | +data, | +
+ | + | size_t | +data_len | +
+ | ) | ++ |
Create a handle from a user message.
+The message is copied and will be freed with the handle
+c | : the context from which the handle will be created (NULL for default context) |
data | : the actual message |
data_len | : the length of the message in number of bytes |
int codes_write_message | +( | +codes_handle * | +h, | +
+ | + | const char * | +file, | +
+ | + | const char * | +mode | +
+ | ) | ++ |
Write a coded message to a file.
+h | : codes_handle to be written |
file | : name of the output file |
mode | : mode |
+ eccodes
+
+ |
+
+Data Structures | |
struct | codes_index |
+Functions | |
codes_index * | codes_index_new_from_file (codes_context *c, char *filename, const char *keys, int *err) |
Create a new index form a file. More... | |
codes_index * | codes_index_new (codes_context *c, const char *keys, int *err) |
Create a new index based on a set of keys. More... | |
int | codes_index_add_file (grib_index *index, const char *filename) |
Indexes the file given in argument in the index given in argument. More... | |
int | codes_index_get_size (codes_index *index, const char *key, size_t *size) |
Get the number of distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_long (codes_index *index, const char *key, long *values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_double (codes_index *index, const char *key, double *values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_get_string (codes_index *index, const char *key, char **values, size_t *size) |
Get the distinct values of the key in argument contained in the index. More... | |
int | codes_index_select_long (codes_index *index, const char *key, long value) |
Select the message subset with key==value. More... | |
int | codes_index_select_double (codes_index *index, const char *key, double value) |
Select the message subset with key==value. More... | |
int | codes_index_select_string (codes_index *index, const char *key, char *value) |
Select the message subset with key==value. More... | |
codes_handle * | codes_handle_new_from_index (codes_index *index, int *err) |
Create a new handle from an index after having selected the key values. More... | |
void | codes_index_delete (codes_index *index) |
Delete the index. More... | |
The codes_index is the structure giving indexed access to messages in a file.
+codes_handle* codes_handle_new_from_index | +( | +codes_index * | +index, | +
+ | + | int * | +err | +
+ | ) | ++ |
Create a new handle from an index after having selected the key values.
+All the keys belonging to the index must be selected before calling this function. Successive calls to this function will return all the handles compatible with the constraints defined selecting the values of the index keys. When no more handles are available from the index a NULL pointer is returned and the err variable is set to CODES_END_OF_INDEX.
+index | : an index created from a file. |
err | : 0 if OK, integer value on error. CODES_END_OF_INDEX when no more handles are contained in the index. |
int codes_index_add_file | +( | +grib_index * | +index, | +
+ | + | const char * | +filename | +
+ | ) | ++ |
Indexes the file given in argument in the index given in argument.
+index | : index |
filename | : name of the file of messages to be indexed |
void codes_index_delete | +( | +codes_index * | +index | ) | ++ |
Delete the index.
+index | : index to be deleted. |
int codes_index_get_double | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | double * | +values, | +
+ | + | 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 double or when the native type of the key is double.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key for which the values are returned |
values | : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
size | : size of the values array |
int codes_index_get_long | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | long * | +values, | +
+ | + | 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.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key for which the values are returned |
values | : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
size | : size of the values array |
int codes_index_get_size | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | size_t * | +size | +
+ | ) | ++ |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key for which the number of values is computed |
size | : number of distinct values of the key in the index |
int codes_index_get_string | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | char ** | +values, | +
+ | + | 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 string or when the native type of the key is string.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key for which the values are returned |
values | : array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
size | : size of the values array |
codes_index* codes_index_new | +( | +codes_context * | +c, | +
+ | + | const char * | +keys, | +
+ | + | int * | +err | +
+ | ) | ++ |
Create a new index based on a set of keys.
+c | : context (NULL for default context) |
keys | : comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, (or alternatively :i) :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. |
err | : 0 if OK, integer value on error |
codes_index* codes_index_new_from_file | +( | +codes_context * | +c, | +
+ | + | char * | +filename, | +
+ | + | const char * | +keys, | +
+ | + | int * | +err | +
+ | ) | ++ |
Create a new index form a file.
+The file is indexed with the keys in argument.
+c | : context (NULL for default context) |
filename | : name of the file of messages to be indexed |
keys | : comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, (or alternatively :i) :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. |
err | : 0 if OK, integer value on error |
int codes_index_select_double | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | double | +value | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a double. The key must have been created with double type or have double as native type if the type was not explicitly defined in the index creation.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key to be selected |
value | : value of the key to select |
int codes_index_select_long | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | long | +value | +
+ | ) | ++ |
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.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key to be selected |
value | : value of the key to select |
int codes_index_select_string | +( | +codes_index * | +index, | +
+ | + | const char * | +key, | +
+ | + | char * | +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.
+index | : an index created from a file. The index must have been created with the key in argument. |
key | : key to be selected |
value | : value of the key to select |
Typedefs | ||||||||||
typedef void(* | grib_free_proc )(const grib_context *c, void *data) | |||||||||
Grib free procedure, format of a procedure referenced in the context that is used to free memory. | ||||||||||
typedef void *(* | grib_malloc_proc )(const grib_context *c, size_t length) | |||||||||
Grib malloc procedure, format of a procedure referenced in the context that is used to allocate memory. | ||||||||||
typedef void *(* | grib_realloc_proc )(const grib_context *c, void *data, size_t length) | |||||||||
Grib realloc procedure, format of a procedure referenced in the context that is used to reallocate memory. | ||||||||||
typedef void(* | grib_log_proc )(const grib_context *c, int level, const char *mesg) | |||||||||
Grib loc proc, format of a procedure referenced in the context that is used to log internal messages. | ||||||||||
typedef void(* | grib_print_proc )(const grib_context *c, void *descriptor, const char *mesg) | |||||||||
Grib print proc, format of a procedure referenced in the context that is used to print external messages. | ||||||||||
typedef size_t(* | grib_data_read_proc )(const grib_context *c, void *ptr, size_t size, void *stream) | |||||||||
Grib data read proc, format of a procedure referenced in the context that is used to read from a stream in a resource. | ||||||||||
typedef size_t(* | grib_data_write_proc )(const grib_context *c, const void *ptr, size_t size, void *stream) | |||||||||
Grib data read write, format of a procedure referenced in the context that is used to write to a stream from a resource. | ||||||||||
typedef off_t(* | grib_data_tell_proc )(const grib_context *c, void *stream) | |||||||||
Grib data tell, format of a procedure referenced in the context that is used to tell the current position in a stream. | ||||||||||
typedef off_t(* | grib_data_seek_proc )(const grib_context *c, off_t offset, int whence, void *stream) | |||||||||
Grib data seek, format of a procedure referenced in the context that is used to seek the current position in a stream. | ||||||||||
typedef int(* | grib_data_eof_proc )(const grib_context *c, void *stream) | |||||||||
Grib data eof, format of a procedure referenced in the context that is used to test end of file. | ||||||||||
Functions | ||||||||||
grib_context * | grib_get_context (grib_handle *h) | |||||||||
Retreive the context from a handle. | ||||||||||
grib_context * | grib_context_get_default (void) | |||||||||
Get the static default context. | ||||||||||
grib_context * | grib_context_new (grib_context *c) | |||||||||
Create and allocate a new context from a parent context. | ||||||||||
void | grib_context_delete (grib_context *c) | |||||||||
Frees the cached definition files of the context. | ||||||||||
void | grib_gts_header_on (grib_context *c) | |||||||||
Set the gts header mode on. | ||||||||||
void | grib_gts_header_off (grib_context *c) | |||||||||
Set the gts header mode off. | ||||||||||
void | grib_gribex_mode_on (grib_context *c) | |||||||||
Set the gribex mode on. | ||||||||||
void | grib_gribex_mode_off (grib_context *c) | |||||||||
Set the gribex mode off. | ||||||||||
void | grib_context_set_user_data (grib_context *c, void *udata) | |||||||||
Sets user data in a context. | ||||||||||
void * | grib_context_get_user_data (grib_context *c) | |||||||||
get userData from a context | ||||||||||
void | grib_context_set_memory_proc (grib_context *c, grib_malloc_proc griballoc, grib_free_proc gribfree, grib_realloc_proc gribrealloc) | |||||||||
Sets memory procedures of the context. | ||||||||||
void | grib_context_set_persistent_memory_proc (grib_context *c, grib_malloc_proc griballoc, grib_free_proc gribfree) | |||||||||
Sets memory procedures of the context for persistent data. | ||||||||||
void | grib_context_set_buffer_memory_proc (grib_context *c, grib_malloc_proc griballoc, grib_free_proc gribfree, grib_realloc_proc gribrealloc) | |||||||||
Sets memory procedures of the context for large buffers. | ||||||||||
void | grib_context_set_path (grib_context *c, const char *path) | |||||||||
Sets the context search path for definition files. | ||||||||||
void | grib_context_set_dump_mode (grib_context *c, int mode) | |||||||||
Sets context dump mode. | ||||||||||
void | grib_context_set_print_proc (grib_context *c, grib_print_proc printp) | |||||||||
Sets the context printing procedure used for user interaction. | ||||||||||
void | grib_context_set_logging_proc (grib_context *c, grib_log_proc logp) | |||||||||
Sets the context logging procedure used for system (warning, errors, infos . | ||||||||||
void | grib_multi_support_on (grib_context *c) | |||||||||
Turn on support for multiple fields in single grib messages. | ||||||||||
void | grib_multi_support_off (grib_context *c) | |||||||||
Turn off support for multiple fields in single grib messages. |
+Functions | |
codes_context * | codes_context_get_default (void) |
Get the static default context. More... | |
void | codes_context_delete (codes_context *c) |
Frees the cached definition files of the context. More... | |
void | codes_gts_header_on (codes_context *c) |
Set the GTS header mode on. More... | |
void | codes_gts_header_off (codes_context *c) |
Set the GTS header mode off. More... | |
void | codes_gribex_mode_on (codes_context *c) |
Set the GRIBEX mode on. More... | |
int | codes_get_gribex_mode (codes_context *c) |
Get the GRIBEX mode. More... | |
void | codes_gribex_mode_off (codes_context *c) |
Set the GRIBEX mode off. More... | |
void | codes_context_set_definitions_path (grib_context *c, const char *path) |
Sets the search path for definition files. More... | |
void | codes_context_set_samples_path (grib_context *c, const char *path) |
Sets the search path for sample files. More... | |
void | codes_grib_multi_support_on (codes_context *c) |
Turn on support for multiple fields in single GRIB messages. More... | |
void | codes_grib_multi_support_off (codes_context *c) |
Turn off support for multiple fields in single GRIB messages. More... | |
void | codes_grib_multi_support_reset_file (codes_context *c, FILE *f) |
Reset file handle in multiple GRIB field support mode. More... | |
The context is a long life configuration object of eccodes. It is used to define special allocation and free routines or to set special eccodes behaviours and variables.
+typedef int(* grib_data_eof_proc)(const grib_context *c, void *stream) | -
-Grib data eof, format of a procedure referenced in the context that is used to test end of file. -
-
c | : the context where the tell will apply | |
*stream | : the stream |
typedef size_t(* grib_data_read_proc)(const grib_context *c, void *ptr, size_t size, void *stream) | -
-Grib data read proc, format of a procedure referenced in the context that is used to read from a stream in a resource. -
-
c | : the context where the read will apply | |
*ptr | : the resource | |
size | : size to read | |
*stream | : the stream |
typedef off_t(* grib_data_seek_proc)(const grib_context *c, off_t offset, int whence, void *stream) | -
-Grib data seek, format of a procedure referenced in the context that is used to seek the current position in a stream. -
-
c | : the context where the tell will apply | |
offset | : the offset to seek to | |
whence | : If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. | |
*stream | : the stream |
typedef off_t(* grib_data_tell_proc)(const grib_context *c, void *stream) | -
-Grib data tell, format of a procedure referenced in the context that is used to tell the current position in a stream. -
-
c | : the context where the tell will apply | |
*stream | : the stream |
typedef size_t(* grib_data_write_proc)(const grib_context *c, const void *ptr, size_t size, void *stream) | -
-Grib data read write, format of a procedure referenced in the context that is used to write to a stream from a resource. -
-
c | : the context where the write will apply | |
*ptr | : the resource | |
size | : size to read | |
*stream | : the stream |
typedef void(* grib_free_proc)(const grib_context *c, void *data) | -
-Grib free procedure, format of a procedure referenced in the context that is used to free memory. -
-
c | : the context where the memory freeing will apply | |
data | : pointer to the data to be freed must match |
typedef void(* grib_log_proc)(const grib_context *c, int level, const char *mesg) | -
-Grib loc proc, format of a procedure referenced in the context that is used to log internal messages. -
-
c | : the context where the logging will apply | |
level | : the log level, as defined in log modes | |
mesg | : the message to be logged |
typedef void*(* grib_malloc_proc)(const grib_context *c, size_t length) | -
-Grib malloc procedure, format of a procedure referenced in the context that is used to allocate memory. -
-
c | : the context where the memory allocation will apply | |
length | : length to be allocated in number of bytes |
typedef void(* grib_print_proc)(const grib_context *c, void *descriptor, const char *mesg) | -
-Grib print proc, format of a procedure referenced in the context that is used to print external messages. -
-
c | : the context where the logging will apply | |
descriptor | : the structure to be printed on, must match the implementation | |
mesg | : the message to be printed |
typedef void*(* grib_realloc_proc)(const grib_context *c, void *data, size_t length) | -
-Grib realloc procedure, format of a procedure referenced in the context that is used to reallocate memory. -
-
c | : the context where the memory allocation will apply | |
data | : pointer to the data to be reallocated | |
length | : length to be allocated in number of bytes |
-
void grib_context_delete | +void codes_context_delete | ( | -grib_context * | -c | -) | -+ | codes_context * | +c | ) | +
-Frees the cached definition files of the context. -
-
c | : the context to be deleted |
c | : the context to be deleted |
grib_context* grib_context_get_default | +codes_context* codes_context_get_default | ( | -void | -- | ) | -+ | void | +) | +
-Get the static default context. -
-
Get the static default context.
+void* grib_context_get_user_data | +void codes_context_set_definitions_path | ( | -grib_context * | -c | -) | -- |
-get userData from a context -
-
c | : the context from which the user data will be retreived |
grib_context* grib_context_new | -( | -grib_context * | -c | -) | -- |
-Create and allocate a new context from a parent context. -
-
c | : the context to be cloned, NULL for default context |
void grib_context_set_buffer_memory_proc | -( | -grib_context * | -c, | +grib_context * | +c, | |
- | grib_malloc_proc | -griballoc, | -||||
- | - | grib_free_proc | -gribfree, | -|||
- | - | grib_realloc_proc | -gribrealloc | + | const char * | +path |
) | -+ |
-Sets memory procedures of the context for large buffers. -
-
c | : the context to be modified | |||||||||
griballoc | : the memory allocation procedure to be set |
c | : the context to be modified |
path | : the search path for definition files |
gribfree | : the memory freeing procedure to be set |
void grib_context_set_dump_mode | +void codes_context_set_samples_path | ( | -grib_context * | -c, | +grib_context * | +c, |
- | int | -mode | + | const char * | +path | |
) | -+ |
-Sets context dump mode. -
-
c | : the context to be modified | |||||||||
mode | : the log mode to be set |
c | : the context to be modified |
path | : the search path for sample files |
void grib_context_set_logging_proc | +int codes_get_gribex_mode | ( | -grib_context * | -c, | +codes_context * | +c | ) | ++ |
Get the GRIBEX mode.
+c | : the context |
void codes_grib_multi_support_off | +( | +codes_context * | +c | ) | ++ |
Turn off support for multiple fields in single GRIB messages.
+c | : the context to be modified |
void codes_grib_multi_support_on | +( | +codes_context * | +c | ) | ++ |
Turn on support for multiple fields in single GRIB messages.
+c | : the context to be modified |
void codes_grib_multi_support_reset_file | +( | +codes_context * | +c, | |||
- | grib_log_proc | -logp | + | FILE * | +f | |
) | -+ |
-Sets the context logging procedure used for system (warning, errors, infos . -
-..) messages
-
c | : the context to be modified | |||||||||
logp | : the logging procedure to be set |
c | : the context to be modified |
f | : the file pointer |
void grib_context_set_memory_proc | +void codes_gribex_mode_off | ( | -grib_context * | -c, | -||
+ | codes_context * | +c | ) | - | grib_malloc_proc | -griballoc, | -
- | - | grib_free_proc | -gribfree, | -|||
- | - | grib_realloc_proc | -gribrealloc | - | ||
- | ) | -
-Sets memory procedures of the context. -
-
c | : the context to be modified | |||||||||
griballoc | : the memory allocation procedure to be set |
c | : the context |
gribfree | : the memory freeing procedure to be set |
void grib_context_set_path | +void codes_gribex_mode_on | ( | -grib_context * | -c, | -|||
+ | codes_context * | +c | ) | - | const char * | -path |
Set the GRIBEX mode on.
+GRIB files will be compatible with GRIBEX.
+c | : the context |
void codes_gts_header_off | +( | +codes_context * | +c | ) | - | ) | -
-Sets the context search path for definition files. -
-
c | : the context to be modified | |||||||||
path | : the search path to be set |
c | : the context |
void grib_context_set_persistent_memory_proc | +void codes_gts_header_on | ( | -grib_context * | -c, | -||
+ | codes_context * | +c | ) | - | grib_malloc_proc | -griballoc, | -
- | - | grib_free_proc | -gribfree | - | ||
- | ) | -
-Sets memory procedures of the context for persistent data. -
-
c | : the context to be modified | |
griballoc | : the memory allocation procedure to be set |
gribfree | : the memory freeing procedure to be set |
void grib_context_set_print_proc | -( | -grib_context * | -c, | -|
- | - | grib_print_proc | -printp | - |
- | ) | -- |
-Sets the context printing procedure used for user interaction. -
-
c | : the context to be modified | |
printp | : the printing procedure to be set |
void grib_context_set_user_data | -( | -grib_context * | -c, | -|
- | - | void * | -udata | - |
- | ) | -- |
-Sets user data in a context. -
-
c | : the context to be modified | |||||||||
udata | : the user data to set |
c | : the context |
grib_context* grib_get_context | -( | -grib_handle * | -h | -) | -- |
-Retreive the context from a handle. -
-
h | : the handle used to retreive the context from |
void grib_gribex_mode_off | -( | -grib_context * | -c | -) | -- |
-Set the gribex mode off. -
-Grib files won't be always compatible with gribex.
-
c | : the context to be deleted |
void grib_gribex_mode_on | -( | -grib_context * | -c | -) | -- |
-Set the gribex mode on. -
-Grib files will be compatible with gribex.
-
c | : the context to be deleted |
void grib_gts_header_off | -( | -grib_context * | -c | -) | -- |
-Set the gts header mode off. -
-The GTS headers will be deleted.
-
c | : the context to be deleted |
void grib_gts_header_on | -( | -grib_context * | -c | -) | -- |
-Set the gts header mode on. -
-The GTS headers will be preserved.
-
c | : the context to be deleted |
void grib_multi_support_off | -( | -grib_context * | -c | -) | -- |
-Turn off support for multiple fields in single grib messages. -
-
c | : the context to be modified |
void grib_multi_support_on | -( | -grib_context * | -c | -) | -- |
-Turn on support for multiple fields in single grib messages. -
-
c | : the context to be modified |
-
+ eccodes
+
+ |
+
Environment variables applicable to ecCodes:
+ECCODES_DEBUG - If set to 1, it will enable debug level logging messages to be displayed by the library.
+ECCODES_FAIL_IF_LOG_MESSAGE - If set to 1, it will cause the library to exit when an error or warning is encountered.
+ECCODES_IO_BUFFER_SIZE - Defines the size in bytes of the buffer used in the IO calls from Fortran and in the tools.
+ECCODES_NO_ABORT - When set to 1 it causes ecCodes not to abort execution on failing asserts.
+ECCODES_GRIB_WRITE_ON_FAIL - When set to 1 it will write the last processed GRIB message in a file named $PID_$FILEID_error.grib on failure in a fortran function used without the return code argument.
+ECCODES_DEFINITION_PATH - Set to the folder containing the set of definition files you want ecCodes to use instead of the default one.
+ECCODES_GRIBEX_MODE_ON - When set to 1 it will enable the GRIBEX compatibility mode and ecCodes will produce GRIB messages readable by GRIBEX.
+ECCODES_GRIB_IEEE_PACKING - Accepted values 32 or 64 for 32 or 64 bits IEEE floating point respectively. The GRIB message produced will contain data written in IEEE floating point without packing.
+ECCODES_SAMPLES_PATH - Set to the folder containing the set of samples you want ecCodes to use instead of the default one.
+
+ eccodes
+
+ |
+
+Macros | |
#define | CODES_SUCCESS 0 |
No error. More... | |
#define | CODES_END_OF_FILE -1 |
End of resource reached. More... | |
#define | CODES_INTERNAL_ERROR -2 |
Internal error. More... | |
#define | CODES_BUFFER_TOO_SMALL -3 |
Passed buffer is too small. More... | |
#define | CODES_NOT_IMPLEMENTED -4 |
Function not yet implemented. More... | |
#define | CODES_7777_NOT_FOUND -5 |
Missing 7777 at end of message. More... | |
#define | CODES_ARRAY_TOO_SMALL -6 |
Passed array is too small. More... | |
#define | CODES_FILE_NOT_FOUND -7 |
File not found. More... | |
#define | CODES_CODE_NOT_FOUND_IN_TABLE -8 |
Code not found in code table. More... | |
#define | CODES_WRONG_ARRAY_SIZE -9 |
Array size mismatch. More... | |
#define | CODES_NOT_FOUND -10 |
Key/value not found. More... | |
#define | CODES_IO_PROBLEM -11 |
Input output problem. More... | |
#define | CODES_INVALID_MESSAGE -12 |
Message invalid. More... | |
#define | CODES_DECODING_ERROR -13 |
Decoding invalid. More... | |
#define | CODES_ENCODING_ERROR -14 |
Encoding invalid. More... | |
#define | CODES_NO_MORE_IN_SET -15 |
Code cannot unpack because of string too small. More... | |
#define | CODES_GEOCALCULUS_PROBLEM -16 |
Problem with calculation of geographic attributes. More... | |
#define | CODES_OUT_OF_MEMORY -17 |
Out of memory. More... | |
#define | CODES_READ_ONLY -18 |
Value is read only. More... | |
#define | CODES_INVALID_ARGUMENT -19 |
Invalid argument. More... | |
#define | CODES_NULL_HANDLE -20 |
Null handle. More... | |
#define | CODES_INVALID_SECTION_NUMBER -21 |
Invalid section number. More... | |
#define | CODES_VALUE_CANNOT_BE_MISSING -22 |
Value cannot be missing. More... | |
#define | CODES_WRONG_LENGTH -23 |
Wrong message length. More... | |
#define | CODES_INVALID_TYPE -24 |
Invalid key type. More... | |
#define | CODES_WRONG_STEP -25 |
Unable to set step. More... | |
#define | CODES_WRONG_STEP_UNIT -26 |
Wrong units for step (step must be integer) More... | |
#define | CODES_INVALID_FILE -27 |
Invalid file id. More... | |
#define | CODES_INVALID_GRIB -28 |
Invalid grib id. More... | |
#define | CODES_INVALID_INDEX -29 |
Invalid index id. More... | |
#define | CODES_INVALID_ITERATOR -30 |
Invalid iterator id. More... | |
#define | CODES_INVALID_KEYS_ITERATOR -31 |
Invalid keys iterator id. More... | |
#define | CODES_INVALID_NEAREST -32 |
Invalid nearest id. More... | |
#define | CODES_INVALID_ORDERBY -33 |
Invalid order by. More... | |
#define | CODES_MISSING_KEY -34 |
Missing a key from the fieldset. More... | |
#define | CODES_OUT_OF_AREA -35 |
The point is out of the grid area. More... | |
#define | CODES_CONCEPT_NO_MATCH -36 |
Concept no match. More... | |
#define | CODES_HASH_ARRAY_NO_MATCH -37 |
Hash array no match. More... | |
#define | CODES_NO_DEFINITIONS -38 |
Definitions files not found. More... | |
#define | CODES_WRONG_TYPE -39 |
Wrong type while packing. More... | |
#define | CODES_END -40 |
End of resource. More... | |
#define | CODES_NO_VALUES -41 |
Unable to code a field without values. More... | |
#define | CODES_WRONG_GRID -42 |
Grid description is wrong or inconsistent. More... | |
#define | CODES_END_OF_INDEX -43 |
End of index reached. More... | |
#define | CODES_NULL_INDEX -44 |
Null index. More... | |
#define | CODES_PREMATURE_END_OF_FILE -45 |
End of resource reached when reading message. More... | |
#define | CODES_INTERNAL_ARRAY_TOO_SMALL -46 |
An internal array is too small. More... | |
#define | CODES_MESSAGE_TOO_LARGE -47 |
Message is too large for the current architecture. More... | |
#define | CODES_CONSTANT_FIELD -48 |
Constant field. More... | |
#define | CODES_SWITCH_NO_MATCH -49 |
Switch unable to find a matching case. More... | |
#define | CODES_UNDERFLOW -50 |
Underflow. More... | |
#define | CODES_MESSAGE_MALFORMED -51 |
Message malformed. More... | |
#define | CODES_CORRUPTED_INDEX -52 |
Index is corrupted. More... | |
#define | CODES_INVALID_BPV -53 |
Invalid number of bits per value. More... | |
#define | CODES_DIFFERENT_EDITION -54 |
Edition of two messages is different. More... | |
#define | CODES_VALUE_DIFFERENT -55 |
Value is different. More... | |
#define | CODES_INVALID_KEY_VALUE -56 |
Invalid key value. More... | |
#define | CODES_STRING_TOO_SMALL -57 |
String is smaller than requested. More... | |
#define | CODES_WRONG_CONVERSION -58 |
Wrong type conversion. More... | |
#define | CODES_MISSING_BUFR_ENTRY -59 |
Missing BUFR table entry for descriptor. More... | |
#define | CODES_NULL_POINTER -60 |
Null pointer. More... | |
#define | CODES_ATTRIBUTE_CLASH -61 |
Attribute is already present, cannot add. More... | |
#define | CODES_TOO_MANY_ATTRIBUTES -62 |
Too many attributes. More... | |
#define | CODES_ATTRIBUTE_NOT_FOUND -63 |
Attribute not found. More... | |
#define | CODES_UNSUPPORTED_EDITION -64 |
Edition not supported. More... | |
#define | CODES_OUT_OF_RANGE -65 |
Value out of coding range. More... | |
#define | CODES_WRONG_BITMAP_SIZE -66 |
Size of bitmap is incorrect. More... | |
Error codes returned by the eccodes functions.
+#define CODES_7777_NOT_FOUND -5 | +
Missing 7777 at end of message.
+ +#define CODES_ARRAY_TOO_SMALL -6 | +
Passed array is too small.
+ +#define CODES_ATTRIBUTE_CLASH -61 | +
Attribute is already present, cannot add.
+ +#define CODES_ATTRIBUTE_NOT_FOUND -63 | +
Attribute not found.
+ +#define CODES_BUFFER_TOO_SMALL -3 | +
Passed buffer is too small.
+ +#define CODES_CODE_NOT_FOUND_IN_TABLE -8 | +
Code not found in code table.
+ +#define CODES_CONCEPT_NO_MATCH -36 | +
Concept no match.
+ +#define CODES_CONSTANT_FIELD -48 | +
Constant field.
+ +#define CODES_CORRUPTED_INDEX -52 | +
Index is corrupted.
+ +#define CODES_DECODING_ERROR -13 | +
Decoding invalid.
+ +#define CODES_DIFFERENT_EDITION -54 | +
Edition of two messages is different.
+ +#define CODES_ENCODING_ERROR -14 | +
Encoding invalid.
+ +#define CODES_END -40 | +
End of resource.
+ +#define CODES_END_OF_FILE -1 | +
End of resource reached.
+ +#define CODES_END_OF_INDEX -43 | +
End of index reached.
+ +#define CODES_FILE_NOT_FOUND -7 | +
File not found.
+ +#define CODES_GEOCALCULUS_PROBLEM -16 | +
Problem with calculation of geographic attributes.
+ +#define CODES_HASH_ARRAY_NO_MATCH -37 | +
Hash array no match.
+ +#define CODES_INTERNAL_ARRAY_TOO_SMALL -46 | +
An internal array is too small.
+ +#define CODES_INTERNAL_ERROR -2 | +
Internal error.
+ +#define CODES_INVALID_ARGUMENT -19 | +
Invalid argument.
+ +#define CODES_INVALID_BPV -53 | +
Invalid number of bits per value.
+ +#define CODES_INVALID_FILE -27 | +
Invalid file id.
+ +#define CODES_INVALID_GRIB -28 | +
Invalid grib id.
+ +#define CODES_INVALID_INDEX -29 | +
Invalid index id.
+ +#define CODES_INVALID_ITERATOR -30 | +
Invalid iterator id.
+ +#define CODES_INVALID_KEY_VALUE -56 | +
Invalid key value.
+ +#define CODES_INVALID_KEYS_ITERATOR -31 | +
Invalid keys iterator id.
+ +#define CODES_INVALID_MESSAGE -12 | +
Message invalid.
+ +#define CODES_INVALID_NEAREST -32 | +
Invalid nearest id.
+ +#define CODES_INVALID_ORDERBY -33 | +
Invalid order by.
+ +#define CODES_INVALID_SECTION_NUMBER -21 | +
Invalid section number.
+ +#define CODES_INVALID_TYPE -24 | +
Invalid key type.
+ +#define CODES_IO_PROBLEM -11 | +
Input output problem.
+ +#define CODES_MESSAGE_MALFORMED -51 | +
Message malformed.
+ +#define CODES_MESSAGE_TOO_LARGE -47 | +
Message is too large for the current architecture.
+ +#define CODES_MISSING_BUFR_ENTRY -59 | +
Missing BUFR table entry for descriptor.
+ +#define CODES_MISSING_KEY -34 | +
Missing a key from the fieldset.
+ +#define CODES_NO_DEFINITIONS -38 | +
Definitions files not found.
+ +#define CODES_NO_MORE_IN_SET -15 | +
Code cannot unpack because of string too small.
+ +#define CODES_NO_VALUES -41 | +
Unable to code a field without values.
+ +#define CODES_NOT_FOUND -10 | +
Key/value not found.
+ +#define CODES_NOT_IMPLEMENTED -4 | +
Function not yet implemented.
+ +#define CODES_NULL_HANDLE -20 | +
Null handle.
+ +#define CODES_NULL_INDEX -44 | +
Null index.
+ +#define CODES_NULL_POINTER -60 | +
Null pointer.
+ +#define CODES_OUT_OF_AREA -35 | +
The point is out of the grid area.
+ +#define CODES_OUT_OF_MEMORY -17 | +
Out of memory.
+ +#define CODES_OUT_OF_RANGE -65 | +
Value out of coding range.
+ +#define CODES_PREMATURE_END_OF_FILE -45 | +
End of resource reached when reading message.
+ +#define CODES_READ_ONLY -18 | +
Value is read only.
+ +#define CODES_STRING_TOO_SMALL -57 | +
String is smaller than requested.
+ +#define CODES_SUCCESS 0 | +
No error.
+ +#define CODES_SWITCH_NO_MATCH -49 | +
Switch unable to find a matching case.
+ +#define CODES_TOO_MANY_ATTRIBUTES -62 | +
Too many attributes.
+Increase MAX_ACCESSOR_ATTRIBUTES
+ +#define CODES_UNDERFLOW -50 | +
Underflow.
+ +#define CODES_UNSUPPORTED_EDITION -64 | +
Edition not supported.
+ +#define CODES_VALUE_CANNOT_BE_MISSING -22 | +
Value cannot be missing.
+ +#define CODES_VALUE_DIFFERENT -55 | +
Value is different.
+ +#define CODES_WRONG_ARRAY_SIZE -9 | +
Array size mismatch.
+ +#define CODES_WRONG_BITMAP_SIZE -66 | +
Size of bitmap is incorrect.
+ +#define CODES_WRONG_CONVERSION -58 | +
Wrong type conversion.
+ +#define CODES_WRONG_GRID -42 | +
Grid description is wrong or inconsistent.
+ +#define CODES_WRONG_LENGTH -23 | +
Wrong message length.
+ +#define CODES_WRONG_STEP -25 | +
Unable to set step.
+ +#define CODES_WRONG_STEP_UNIT -26 | +
Wrong units for step (step must be integer)
+ +#define CODES_WRONG_TYPE -39 | +
Wrong type while packing.
+ +Functions | ||||||||||
int | grib_get_offset (grib_handle *h, const char *key, size_t *offset) | |||||||||
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. | ||||||||||
int | grib_get_size (grib_handle *h, const char *key, size_t *size) | |||||||||
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. | ||||||||||
int | grib_get_long (grib_handle *h, const char *key, long *value) | |||||||||
Get a long value from a key, if several keys of the same name are present, the last one is returned. | ||||||||||
int | grib_get_double (grib_handle *h, const char *key, double *value) | |||||||||
Get a double value from a key, if several keys of the same name are present, the last one is returned. | ||||||||||
int | grib_get_double_element (grib_handle *h, const char *key, int i, double *value) | |||||||||
Get as double the i-th element of the "key" array. | ||||||||||
int | grib_get_double_elements (grib_handle *h, const char *key, int *i, long size, double *value) | |||||||||
Get as double array the elements of the "key" array whose indexes are listed in the input array i. | ||||||||||
int | grib_get_string (grib_handle *h, const char *key, char *mesg, size_t *length) | |||||||||
Get a string value from a key, if several keys of the same name are present, the last one is returned. | ||||||||||
int | grib_get_bytes (grib_handle *h, const char *key, unsigned char *bytes, size_t *length) | |||||||||
Get raw bytes values from a key. | ||||||||||
int | grib_get_double_array (grib_handle *h, const char *key, double *vals, size_t *length) | |||||||||
Get double array values from a key. | ||||||||||
int | grib_get_long_array (grib_handle *h, const char *key, long *vals, size_t *length) | |||||||||
Get long array values from a key. | ||||||||||
int | grib_copy_namespace (grib_handle *dest, const char *name, grib_handle *src) | |||||||||
Copy the keys belonging to a given namespace from a source handle to a destination handle. | ||||||||||
int | grib_set_long (grib_handle *h, const char *key, long val) | |||||||||
Set a long value from a key. | ||||||||||
int | grib_set_double (grib_handle *h, const char *key, double val) | |||||||||
Set a double value from a key. | ||||||||||
int | grib_set_string (grib_handle *h, const char *key, const char *mesg, size_t *length) | |||||||||
Set a string value from a key. | ||||||||||
int | grib_set_bytes (grib_handle *h, const char *key, const unsigned char *bytes, size_t *length) | |||||||||
Set a bytes array from a key. | ||||||||||
int | grib_set_double_array (grib_handle *h, const char *key, const double *vals, size_t length) | |||||||||
Set a double array from a key. | ||||||||||
int | grib_set_long_array (grib_handle *h, const char *key, const long *vals, size_t length) | |||||||||
Set a long array from a key. |
+Functions | |
int | codes_get_offset (codes_handle *h, const char *key, size_t *offset) |
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. More... | |
int | codes_get_size (codes_handle *h, const char *key, size_t *size) |
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. More... | |
int | codes_get_length (codes_handle *h, const char *key, size_t *length) |
Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned. More... | |
int | codes_get_long (codes_handle *h, const char *key, long *value) |
Get a long value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_double (codes_handle *h, const char *key, double *value) |
Get a double value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_double_element (codes_handle *h, const char *key, int i, double *value) |
Get as double the i-th element of the "key" array. More... | |
int | codes_get_double_elements (codes_handle *h, const char *key, int *i, long size, double *value) |
Get as double array the elements of the "key" array whose indexes are listed in the input array i. More... | |
int | codes_get_string (codes_handle *h, const char *key, char *mesg, size_t *length) |
Get a string value from a key, if several keys of the same name are present, the last one is returned. More... | |
int | codes_get_bytes (codes_handle *h, const char *key, unsigned char *bytes, size_t *length) |
Get raw bytes values from a key. More... | |
int | codes_get_double_array (codes_handle *h, const char *key, double *vals, size_t *length) |
Get double array values from a key. More... | |
int | codes_get_long_array (codes_handle *h, const char *key, long *vals, size_t *length) |
Get long array values from a key. More... | |
int | codes_copy_namespace (codes_handle *dest, const char *name, codes_handle *src) |
Copy the keys belonging to a given namespace from a source handle to a destination handle. More... | |
int | codes_set_long (codes_handle *h, const char *key, long val) |
Set a long value from a key. More... | |
int | codes_set_double (codes_handle *h, const char *key, double val) |
Set a double value from a key. More... | |
int | codes_set_string (codes_handle *h, const char *key, const char *mesg, size_t *length) |
Set a string value from a key. More... | |
int | codes_set_bytes (codes_handle *h, const char *key, const unsigned char *bytes, size_t *length) |
Set a bytes array from a key. More... | |
int | codes_set_double_array (codes_handle *h, const char *key, const double *vals, size_t length) |
Set a double array from a key. More... | |
int | codes_set_force_double_array (codes_handle *h, const char *key, const double *vals, size_t length) |
Same as codes_set_double_array but allows setting of READ-ONLY keys like codedValues. More... | |
int | codes_set_long_array (codes_handle *h, const char *key, const long *vals, size_t length) |
Set a long array from a key. More... | |
int grib_copy_namespace | +int codes_copy_namespace | ( | -grib_handle * | -dest, | +codes_handle * | +dest, |
- | const char * | -name, | +const char * | +name, | ||
- | grib_handle * | -src | + | codes_handle * | +src | |
) | -+ |
-Copy the keys belonging to a given namespace from a source handle to a destination handle. -
-
dest | : destination handle | |||||||||
name | : namespace | |||||||||
src | : source handle |
dest | : destination handle |
name | : namespace |
src | : source handle |
int grib_get_bytes | +int codes_get_bytes | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | unsigned char * | -bytes, | +unsigned char * | +bytes, | ||
- | size_t * | -length | + | size_t * | +length | |
) | -+ |
-Get raw bytes values from a key. -
-If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
bytes | : the address of a byte array where the data will be retreived | |||||||||
length | : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output |
h | : the handle to get the data from |
key | : the key to be searched |
bytes | : the address of a byte array where the data will be retrieved |
length | : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output |
int grib_get_double | +int codes_get_double | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | double * | -value | + | double * | +value | |
) | -+ |
-Get a double value from a key, if several keys of the same name are present, the last one is returned. -
-
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
value | : the address of a double where the data will be retreived |
h | : the handle to get the data from |
key | : the key to be searched |
value | : the address of a double where the data will be retrieved |
int grib_get_double_array | +int codes_get_double_array | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | double * | -vals, | +double * | +vals, | ||
- | size_t * | -length | + | size_t * | +length | |
) | -+ |
-Get double array values from a key. -
-If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
vals | : the address of a double array where the data will be retreived | |||||||||
length | : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output |
h | : the handle to get the data from |
key | : the key to be searched |
vals | : the address of a double array where the data will be retrieved |
length | : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output |
int grib_get_double_element | +int codes_get_double_element | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | int | -i, | +int | +i, | ||
- | double * | -value | + | double * | +value | |
) | -+ |
-Get as double the i-th element of the "key" array. -
-
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
i | : zero based index | |||||||||
value | : the address of a double where the data will be retreived |
h | : the handle to get the data from |
key | : the key to be searched |
i | : zero based index |
value | : the address of a double where the data will be retrieved |
int grib_get_double_elements | +int codes_get_double_elements | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | int * | -i, | +int * | +i, | ||
- | long | -size, | +long | +size, | ||
- | double * | -value | + | double * | +value | |
) | -+ |
-Get as double array the elements of the "key" array whose indexes are listed in the input array i. -
-
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
i | : zero based array of indexes | |||||||||
size | : size of the i and value arrays | |||||||||
value | : the address of a double where the data will be retreived |
h | : the handle to get the data from |
key | : the key to be searched |
i | : zero based array of indexes |
size | : size of the i and value arrays |
value | : the address of a double where the data will be retrieved |
int grib_get_long | +int codes_get_length | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | long * | -value | + | size_t * | +length | |
) | -+ |
-Get a long value from a key, if several keys of the same name are present, the last one is returned. -
-
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
value | : the address of a long where the data will be retreived |
h | : the handle to get the offset from |
key | : the key to be searched |
length | : the address of a size_t where the length will be set |
int grib_get_long_array | +int codes_get_long | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | long * | -vals, | -||||
- | - | size_t * | -length | + | long * | +value |
) | -+ |
-Get long array values from a key. -
-If several keys of the same name are present, the last one is returned
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
vals | : the address of a long array where the data will be retreived | |||||||||
length | : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output |
h | : the handle to get the data from |
key | : the key to be searched |
value | : the address of a long where the data will be retrieved |
int grib_get_offset | +int codes_get_long_array | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | size_t * | -offset | + | long * | +vals, | +|
+ | + | size_t * | +length | |||
) | -+ |
-Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. -
-
h | : the handle to get the offset from | |||||||||
key | : the key to be searched | |||||||||
offset | : the address of a size_t where the offset will be set |
h | : the handle to get the data from |
key | : the key to be searched |
vals | : the address of a long array where the data will be retrieved |
length | : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output |
int grib_get_size | +int codes_get_offset | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | size_t * | -size | + | size_t * | +offset | |
) | -+ |
-Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. -
-
h | : the handle to get the offset from | |||||||||
key | : the key to be searched | |||||||||
size | : the address of a size_t where the size will be set |
h | : the handle to get the offset from |
key | : the key to be searched |
offset | : the address of a size_t where the offset will be set |
int grib_get_string | +int codes_get_size | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | char * | -mesg, | -||||
- | - | size_t * | -length | + | size_t * | +size |
) | -+ |
-Get a string value from a key, if several keys of the same name are present, the last one is returned. -
-
h | : the handle to get the data from | |||||||||
key | : the key to be searched | |||||||||
mesg | : the address of a string where the data will be retreived | |||||||||
length | : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output |
h | : the handle to get the offset from |
key | : the key to be searched |
size | : the address of a size_t where the size will be set |
int grib_set_bytes | +int codes_get_string | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | const unsigned char * | -bytes, | +char * | +mesg, | ||
- | size_t * | -length | + | size_t * | +length | |
) | -+ |
-Set a bytes array from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |||||||||
key | : the key to be searched | |||||||||
bytes | : the address of a byte array where the data will be read | |||||||||
length | : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output |
h | : the handle to get the data from |
key | : the key to be searched |
mesg | : the address of a string where the data will be retrieved |
length | : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output |
int grib_set_double | +int codes_set_bytes | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | double | -val | + | const unsigned char * | +bytes, | +|
+ | + | size_t * | +length | |||
) | -+ |
-Set a double value from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |||||||||
key | : the key to be searched | |||||||||
val | : a double where the data will be read |
h | : the handle to set the data to |
key | : the key to be searched |
bytes | : the address of a byte array where the data will be read |
length | : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output |
int grib_set_double_array | +int codes_set_double | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | const double * | -vals, | -||||
- | - | size_t | -length | + | double | +val |
) | -+ |
-Set a double array from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |||||||||
key | : the key to be searched | |||||||||
vals | : the address of a double array where the data will be read | |||||||||
length | : a size_t that contains the length of the byte array on input |
h | : the handle to set the data to |
key | : the key to be searched |
val | : a double where the data will be read |
int grib_set_long | +int codes_set_double_array | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | long | -val | + | const double * | +vals, | +|
+ | + | size_t | +length | |||
) | -+ |
-Set a long value from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |||||||||
key | : the key to be searched | |||||||||
val | : a long where the data will be read |
h | : the handle to set the data to |
key | : the key to be searched |
vals | : the address of a double array where the data will be read |
length | : a size_t that contains the length of the byte array on input |
int grib_set_long_array | +int codes_set_force_double_array | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | const long * | -vals, | +const double * | +vals, | ||
- | size_t | -length | + | size_t | +length | |
) | -+ |
-Set a long array from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |
key | : the key to be searched | |
vals | : the address of a long array where the data will be read | |
length | : a size_t that contains the length of the long array on input |
Same as codes_set_double_array but allows setting of READ-ONLY keys like codedValues.
+Use with great caution!!
int grib_set_string | +int codes_set_long | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const char * | -key, | +const char * | +key, | ||
- | const char * | -mesg, | -||||
- | - | size_t * | -length | + | long | +val |
) | -+ |
-Set a string value from a key. -
-If several keys of the same name are present, the last one is set
h | : the handle to set the data to | |||||||||
key | : the key to be searched | |||||||||
mesg | : the address of a string where the data will be read | |||||||||
length | : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output |
h | : the handle to set the data to |
key | : the key to be searched |
val | : a long where the data will be read |
-
int codes_set_long_array | +( | +codes_handle * | +h, | +
+ | + | const char * | +key, | +
+ | + | const long * | +vals, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Set a long array from a key.
+If several keys of the same name are present, the last one is set
+h | : the handle to set the data to |
key | : the key to be searched |
vals | : the address of a long array where the data will be read |
length | : a size_t that contains the length of the long array on input |
int codes_set_string | +( | +codes_handle * | +h, | +
+ | + | const char * | +key, | +
+ | + | const char * | +mesg, | +
+ | + | size_t * | +length | +
+ | ) | ++ |
Set a string value from a key.
+If several keys of the same name are present, the last one is set
+h | : the handle to set the data to |
key | : the key to be searched |
mesg | : the address of a string where the data will be read |
length | : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output |
Functions | ||||||||||
int | grib_get_message (grib_handle *h, const void **message, size_t *message_length) | |||||||||
getting the message attached to a handle | ||||||||||
int | grib_get_message_copy (grib_handle *h, void *message, size_t *message_length) | |||||||||
getting a copy of the message attached to a handle |
+Functions | |
int | codes_get_message (codes_handle *h, const void **message, size_t *message_length) |
getting the message attached to a handle More... | |
int | codes_get_message_copy (codes_handle *h, void *message, size_t *message_length) |
getting a copy of the message attached to a handle More... | |
int grib_get_message | +int codes_get_message | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | const void ** | -message, | +const void ** | +message, | ||
- | size_t * | -message_length | + | size_t * | +message_length | |
) | -+ |
-getting the message attached to a handle -
-
h | : the grib handle to wich the buffer should be gathered | |||||||||
message | : the pointer to be set to the handle's data | |||||||||
message_length | : at exist, the message size in number of bytes |
h | : the handle to which the buffer should be gathered |
message | : the pointer to be set to the handle's data |
message_length | : On exit, the message size in number of bytes |
int grib_get_message_copy | +int codes_get_message_copy | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | void * | -message, | +void * | +message, | ||
- | size_t * | -message_length | + | size_t * | +message_length | |
) | -+ |
-getting a copy of the message attached to a handle -
-
h | : the grib handle to wich the buffer should be returned | |||||||||
message | : the pointer to the data buffer to be filled | |||||||||
message_length | : at entry, the size in number of bytes of the allocated empty message. At exist, the actual message length in number of bytes |
h | : the handle to which the buffer should be returned |
message | : the pointer to the data buffer to be filled |
message_length | : On entry, the size in number of bytes of the allocated empty message. On exit, the actual message length in number of bytes |
-
Functions | ||||||||||
grib_iterator * | grib_iterator_new (grib_handle *h, unsigned long flags, int *error) | |||||||||
Create a new iterator from a handle, using current geometry and values. | ||||||||||
int | grib_iterator_next (grib_iterator *i, double *lat, double *lon, double *value) | |||||||||
Get the next value from an iterator. | ||||||||||
int | grib_iterator_previous (grib_iterator *i, double *lat, double *lon, double *value) | |||||||||
Get the previous value from an iterator. | ||||||||||
int | grib_iterator_has_next (grib_iterator *i) | |||||||||
Test procedure for values in an iterator. | ||||||||||
int | grib_iterator_reset (grib_iterator *i) | |||||||||
Test procedure for values in an iterator. | ||||||||||
int | grib_iterator_delete (grib_iterator *i) | |||||||||
Frees an iterator from memory. | ||||||||||
grib_nearest * | grib_nearest_new (grib_handle *h, int *error) | |||||||||
Create a new nearest from a handle, using current geometry . | ||||||||||
int | grib_nearest_find (grib_nearest *nearest, grib_handle *h, double inlat, double inlon, unsigned long flags, double *outlats, double *outlons, double *values, double *distances, int *indexes, size_t *len) | |||||||||
Find the 4 nearest points of a latitude longitude point. | ||||||||||
int | grib_nearest_delete (grib_nearest *nearest) | |||||||||
Frees an nearest from memory. | ||||||||||
int | grib_nearest_find_multiple (grib_handle *h, int is_lsm, double *inlats, double *inlons, long npoints, double *outlats, double *outlons, double *values, double *distances, int *indexes) | |||||||||
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. |
+Data Structures | |
struct | codes_iterator |
struct | codes_nearest |
+Functions | |
codes_iterator * | codes_grib_iterator_new (codes_handle *h, unsigned long flags, int *error) |
Create a new iterator from a GRIB handle, using current geometry and values. More... | |
int | codes_grib_get_data (codes_handle *h, double *lats, double *lons, double *values) |
Get latitude/longitude and data values. More... | |
int | codes_grib_iterator_next (codes_iterator *i, double *lat, double *lon, double *value) |
Get the next value from an iterator. More... | |
int | codes_grib_iterator_previous (codes_iterator *i, double *lat, double *lon, double *value) |
Get the previous value from an iterator. More... | |
int | codes_grib_iterator_has_next (codes_iterator *i) |
Test procedure for values in an iterator. More... | |
int | codes_grib_iterator_reset (codes_iterator *i) |
Test procedure for values in an iterator. More... | |
int | codes_grib_iterator_delete (codes_iterator *i) |
Frees an iterator from memory. More... | |
codes_nearest * | codes_grib_nearest_new (codes_handle *h, int *error) |
Create a new nearest from a handle, using current geometry . More... | |
int | codes_grib_nearest_find (codes_nearest *nearest, codes_handle *h, double inlat, double inlon, unsigned long flags, double *outlats, double *outlons, double *values, double *distances, int *indexes, size_t *len) |
Find the 4 nearest points of a latitude longitude point. More... | |
int | codes_grib_nearest_delete (codes_nearest *nearest) |
Frees an nearest from memory. More... | |
int | codes_grib_nearest_find_multiple (codes_handle *h, int is_lsm, double *inlats, double *inlons, long npoints, double *outlats, double *outlons, double *values, double *distances, int *indexes) |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. More... | |
int grib_iterator_delete | +int codes_grib_get_data | ( | -grib_iterator * | -i | -) | -- |
-Frees an iterator from memory. -
-
i | : the iterator |
int grib_iterator_has_next | -( | -grib_iterator * | -i | -) | -- |
-Test procedure for values in an iterator. -
-
i | : the iterator |
grib_iterator* grib_iterator_new | -( | -grib_handle * | -h, | +codes_handle * | +h, | |
- | unsigned long | -flags, | +double * | +lats, | ||
- | int * | -error | + | double * | +lons, | +|
+ | + | double * | +values | |||
) | -+ |
-Create a new iterator from a handle, using current geometry and values. -
-
h | : the handle from which the iterator will be created | |||||||||
flags | : flags for future use. | |||||||||
error | : error code |
h | : handle from which geography and data values are taken |
lats | : returned array of latitudes |
lons | : returned array of longitudes |
values | : returned array of data values |
int grib_iterator_next | +int codes_grib_iterator_delete | ( | -grib_iterator * | -i, | +codes_iterator * | +i | ) | ++ |
Frees an iterator from memory.
+i | : the iterator |
int codes_grib_iterator_has_next | +( | +codes_iterator * | +i | ) | ++ |
Test procedure for values in an iterator.
+i | : the iterator |
codes_iterator* codes_grib_iterator_new | +( | +codes_handle * | +h, | |||
- | double * | -lat, | +unsigned long | +flags, | ||
- | double * | -lon, | -||||
- | - | double * | -value | + | int * | +error |
) | -+ |
-Get the next value from an iterator. -
-
i | : the iterator | |||||||||
lat | : on output latitude in degree | |||||||||
lon | : on output longitude in degree | |||||||||
value | : on output value of the point |
h | : the handle from which the iterator will be created |
flags | : flags for future use. |
error | : error code |
int grib_iterator_previous | +int codes_grib_iterator_next | ( | -grib_iterator * | -i, | +codes_iterator * | +i, |
- | double * | -lat, | +double * | +lat, | ||
- | double * | -lon, | +double * | +lon, | ||
- | double * | -value | + | double * | +value | |
) | -+ |
-Get the previous value from an iterator. -
-
i | : the iterator | |||||||||
lat | : on output latitude in degree | |||||||||
lon | : on output longitude in degree | |||||||||
value | : on output value of the point* |
i | : the iterator |
lat | : on output latitude in degree |
lon | : on output longitude in degree |
value | : on output value of the point |
int grib_iterator_reset | +int codes_grib_iterator_previous | ( | -grib_iterator * | -i | -) | -- |
-Test procedure for values in an iterator. -
-
i | : the iterator |
int grib_nearest_delete | -( | -grib_nearest * | -nearest | -) | -- |
-Frees an nearest from memory. -
-
nearest | : the nearest |
int grib_nearest_find | -( | -grib_nearest * | -nearest, | +codes_iterator * | +i, | |
- | grib_handle * | -h, | +double * | +lat, | ||
- | double | -inlat, | +double * | +lon, | ||
- | double | -inlon, | -||||
- | - | unsigned long | -flags, | -|||
- | - | double * | -outlats, | -|||
- | - | double * | -outlons, | -|||
- | - | double * | -values, | -|||
- | - | double * | -distances, | -|||
- | - | int * | -indexes, | -|||
- | - | size_t * | -len | + | double * | +value |
) | -+ |
-Find the 4 nearest points of a latitude longitude point. -
-The flags are provided to speed up the process of searching. If you are sure that the point you are asking for is not changing from a call to another you can use GRIB_NEAREST_SAME_POINT. The same is valid for the grid. Flags can be used together duing an or.
-
nearest | : nearest structure | |||||||||
h | : handle from which geography and data values are taken | |||||||||
inlat | : latitude of the point to search for | |||||||||
inlon | : longitude of the point to search for | |||||||||
flags | : GRIB_NEAREST_SAME_POINT, GRIB_NEAREST_SAME_GRID | |||||||||
outlats | : returned array of latitudes of the nearest points | |||||||||
outlons | : returned array of longitudes of the nearest points | |||||||||
values | : returned array of data values of the nearest points | |||||||||
distances | : returned array of distances from the nearest points | |||||||||
indexes | : returned array of indexes of the nearest points | |||||||||
len | : size of the arrays |
i | : the iterator |
lat | : on output latitude in degree |
lon | : on output longitude in degree |
value | : on output value of the point* |
int grib_nearest_find_multiple | +int codes_grib_iterator_reset | ( | -grib_handle * | -h, | -||
+ | codes_iterator * | +i | ) | - | int | -is_lsm, | -
- | - | double * | -inlats, | -|||
- | - | double * | -inlons, | -|||
- | - | long | -npoints, | -|||
- | - | double * | -outlats, | -|||
- | - | double * | -outlons, | -|||
- | - | double * | -values, | -|||
- | - | double * | -distances, | -|||
- | - | int * | -indexes | - | ||
- | ) | -
-Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. -
-If the flag is_lsm is 1 the nearest land point is returned and the grib passed as handle (h) is considered a land sea mask. The land nearest point is the nearest point with land sea mask value>=0.5. If no nearest land points are found the nearest value is returned. If the flag is_lsm is 0 the nearest point is returned. values, distances, indexes (in the "values" array) for the nearest points (ilons,ilats) are returned.
-
h | : handle from which geography and data values are taken | |||||||||
is_lsm | : lsm flag (1-> nearest land, 0-> nearest) | |||||||||
inlats | : latitudes of the points to search for | |||||||||
inlons | : longitudes of the points to search for | |||||||||
npoints | : number of points (size of the inlats,inlons,outlats,outlons,values,distances,indexes arrays) | |||||||||
outlats | : returned array of latitudes of the nearest points | |||||||||
outlons | : returned array of longitudes of the nearest points | |||||||||
values | : returned array of data values of the nearest points | |||||||||
distances | : returned array of distances from the nearest points | |||||||||
indexes | : returned array of indexes of the nearest points |
i | : the iterator |
grib_nearest* grib_nearest_new | +int codes_grib_nearest_delete | ( | -grib_handle * | -h, | +codes_nearest * | +nearest | ) | ++ |
Frees an nearest from memory.
+nearest | : the nearest |
int codes_grib_nearest_find | +( | +codes_nearest * | +nearest, | |||
- | int * | -error | + | codes_handle * | +h, | +|
+ | + | double | +inlat, | +|||
+ | + | double | +inlon, | +|||
+ | + | unsigned long | +flags, | +|||
+ | + | double * | +outlats, | +|||
+ | + | double * | +outlons, | +|||
+ | + | double * | +values, | +|||
+ | + | double * | +distances, | +|||
+ | + | int * | +indexes, | +|||
+ | + | size_t * | +len | |||
) | -+ |
-Create a new nearest from a handle, using current geometry . -
-
h | : the handle from which the iterator will be created | |||||||||
error | : error code |
nearest | : nearest structure |
h | : handle from which geography and data values are taken |
inlat | : latitude of the point to search for |
inlon | : longitude of the point to search for |
flags | : CODES_NEAREST_SAME_POINT, CODES_NEAREST_SAME_GRID |
outlats | : returned array of latitudes of the nearest points |
outlons | : returned array of longitudes of the nearest points |
values | : returned array of data values of the nearest points |
distances | : returned array of distances from the nearest points |
indexes | : returned array of indexes of the nearest points |
len | : size of the arrays |
-
int codes_grib_nearest_find_multiple | +( | +codes_handle * | +h, | +
+ | + | int | +is_lsm, | +
+ | + | double * | +inlats, | +
+ | + | double * | +inlons, | +
+ | + | long | +npoints, | +
+ | + | double * | +outlats, | +
+ | + | double * | +outlons, | +
+ | + | double * | +values, | +
+ | + | double * | +distances, | +
+ | + | int * | +indexes | +
+ | ) | ++ |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively.
+If the flag is_lsm is 1 the nearest land point is returned and the grib passed as handle (h) is considered a land sea mask. The land nearest point is the nearest point with land sea mask value>=0.5. If no nearest land points are found the nearest value is returned. If the flag is_lsm is 0 the nearest point is returned. values, distances, indexes (in the "values" array) for the nearest points (ilons,ilats) are returned. The distances are given in kilometres.
+h | : handle from which geography and data values are taken |
is_lsm | : lsm flag (1-> nearest land, 0-> nearest) |
inlats | : latitudes of the points to search for |
inlons | : longitudes of the points to search for |
npoints | : number of points (size of the inlats,inlons,outlats,outlons,values,distances,indexes arrays) |
outlats | : returned array of latitudes of the nearest points |
outlons | : returned array of longitudes of the nearest points |
values | : returned array of data values of the nearest points |
distances | : returned array of distances from the nearest points |
indexes | : returned array of indexes of the nearest points |
codes_nearest* codes_grib_nearest_new | +( | +codes_handle * | +h, | +
+ | + | int * | +error | +
+ | ) | ++ |
Create a new nearest from a handle, using current geometry .
+h | : the handle from which the iterator will be created |
error | : error code |
Defines | ||||||||||
#define | GRIB_KEYS_ITERATOR_ALL_KEYS 0 | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_CODED (1<<3) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_COMPUTED (1<<4) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5) | |||||||||
#define | GRIB_KEYS_ITERATOR_SKIP_FUNCTION (1<<6) | |||||||||
Typedefs | ||||||||||
typedef struct -grib_keys_iterator | grib_keys_iterator | |||||||||
Functions | ||||||||||
grib_keys_iterator * | grib_keys_iterator_new (grib_handle *h, unsigned long filter_flags, char *name_space) | |||||||||
int | grib_keys_iterator_next (grib_keys_iterator *kiter) | |||||||||
const char * | grib_keys_iterator_get_name (grib_keys_iterator *kiter) | |||||||||
int | grib_keys_iterator_delete (grib_keys_iterator *kiter) | |||||||||
int | grib_keys_iterator_rewind (grib_keys_iterator *kiter) |
+Data Structures | |
struct | codes_keys_iterator |
+Macros | |
#define | CODES_KEYS_ITERATOR_ALL_KEYS 0 |
#define | CODES_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0) |
#define | CODES_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1) |
#define | CODES_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2) |
#define | CODES_KEYS_ITERATOR_SKIP_CODED (1<<3) |
#define | CODES_KEYS_ITERATOR_SKIP_COMPUTED (1<<4) |
#define | CODES_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5) |
#define | CODES_KEYS_ITERATOR_SKIP_FUNCTION (1<<6) |
+Functions | |
codes_keys_iterator * | codes_keys_iterator_new (codes_handle *h, unsigned long filter_flags, const char *name_space) |
int | codes_keys_iterator_next (codes_keys_iterator *kiter) |
const char * | codes_keys_iterator_get_name (codes_keys_iterator *kiter) |
int | codes_keys_iterator_delete (codes_keys_iterator *kiter) |
int | codes_keys_iterator_rewind (codes_keys_iterator *kiter) |
The keys iterator is designed to get the key names defined in a message. Key names on which the iteration is carried out can be filtered through their attributes or by the namespace they belong to.
+#define GRIB_KEYS_ITERATOR_ALL_KEYS 0 | +#define CODES_KEYS_ITERATOR_ALL_KEYS 0 |
Iteration is carried out on all the keys available in the message +
-Iteration is carried out on all the keys available in the message
-
#define GRIB_KEYS_ITERATOR_SKIP_CODED (1<<3) | +#define CODES_KEYS_ITERATOR_SKIP_CODED (1<<3) |
coded keys are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_COMPUTED (1<<4) | +#define CODES_KEYS_ITERATOR_SKIP_COMPUTED (1<<4) |
computed keys are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5) | +#define CODES_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5) |
duplicates of a key are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2) | +#define CODES_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2) |
edition specific keys are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_FUNCTION (1<<6) | +#define CODES_KEYS_ITERATOR_SKIP_FUNCTION (1<<6) |
function keys are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1) | +#define CODES_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1) |
optional keys are skipped by keys iterator. +
#define GRIB_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0) | +#define CODES_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0) |
read only keys are skipped by keys iterator. +
-
typedef struct grib_keys_iterator grib_keys_iterator | -
-Grib keys iterator. Iterator over keys.
-
int grib_keys_iterator_delete | +int codes_keys_iterator_delete | ( | -grib_keys_iterator * | -kiter | -) | -+ | codes_keys_iterator * | +kiter | ) | +
-Delete the iterator.
kiter | : valid grib_keys_iterator |
kiter | : valid codes_keys_iterator |
const char* grib_keys_iterator_get_name | +const char* codes_keys_iterator_get_name | ( | -grib_keys_iterator * | -kiter | -) | -+ | codes_keys_iterator * | +kiter | ) | +
-get the key name from the iterator
kiter | : valid grib_keys_iterator |
kiter | : valid codes_keys_iterator |
grib_keys_iterator* grib_keys_iterator_new | +codes_keys_iterator* codes_keys_iterator_new | ( | -grib_handle * | -h, | +codes_handle * | +h, |
- | unsigned long | -filter_flags, | +unsigned long | +filter_flags, | ||
- | char * | -name_space | + | const char * | +name_space | |
) | -+ |
-Create a new iterator from a valid and initialized handle.
h | : the handle whose keys you want to iterate | |||||||||
filter_flags | : flags to filter out some of the keys through their attributes | |||||||||
name_space | : if not null the iteration is carried out only on keys belongin to the namespace passed. (NULL for all the keys) |
h | : the handle whose keys you want to iterate |
filter_flags | : flags to filter out some of the keys through their attributes |
name_space | : if not null the iteration is carried out only on keys belonging to the namespace passed. (NULL for all the keys) |
int grib_keys_iterator_next | +int codes_keys_iterator_next | ( | -grib_keys_iterator * | -kiter | -) | -+ | codes_keys_iterator * | +kiter | ) | +
-Step to the next iterator.
kiter | : valid grib_keys_iterator |
kiter | : valid codes_keys_iterator |
int grib_keys_iterator_rewind | +int codes_keys_iterator_rewind | ( | -grib_keys_iterator * | -kiter | -) | -+ | codes_keys_iterator * | +kiter | ) | +
-Rewind the iterator.
kiter | : valid grib_keys_iterator |
kiter | : valid codes_keys_iterator |
-
ecCodes is a package developed by ECMWF which provides an application programming interface and a set of tools for decoding and encoding messages in the following formats:
-With the grib_api library, that is written entirely in C, some command line tools are provided to give a quick way to manipulate grib data. Moreover a Fortran interface 90 is available giving access to the main features of the C library.
-The library is designed to access and modify messages in both editions with the same function calls using a set of Grib API keys to access the coded information ( examples: get.f90 set.f90, get.c, set.c, grib_get, grib_set ).
-The keys available for a message are different depending not only on the edition but also and mainly on the type of each message and the information it contains. A list of all the available keys in a message can be obtained dynamically using the library as shown in keys_iterator.c or using the Grib tools as shown in grib_dump or grib_keys.
-GRIB API will replace the GRIBEX function and a table of conversion between the numeric encoding of GRIBEX and the alphanumeric keys of GRIB API is provided to help the migration.
-To learn how to use the grib_api we recommend the user works through the Grib API examples.
-Reference manuals are also provided for the C library (organized in C interface) and for the Fortran 90 interface.
-Installation instructions are also provided.
-
-> xlc -o foo foo.c $GRIB_API_INCLUDE $GRIB_API_LIB -lm -
-> xlf90 -o foo foo.f90 $GRIB_API_INCLUDE $GRIB_API_LIB -
-> gcc -m32 -o foo foo.c $GRIB_API_INCLUDE $GRIB_API_LIB -
-> gcc -o foo foo.c $GRIB_API_INCLUDE $GRIB_API_LIB -
-> use pgf90 -> pgf90 -o foo foo.f90 $GRIB_API_INCLUDE $GRIB_API_LIB -
A useful set of command line tools provide quick access to the messages. C, Fortran 90 and Python interfaces provide access to the main ecCodes functionality.
+ecCodes is an evolution of GRIB-API. It is designed to provide the user with a simple set of functions to access data from several formats with a key/value approach.
+For GRIB encoding and decoding, the GRIB-API functionality is provided fully in ecCodes with the same user interface and behaviour. Interfaces for C, Fortran 90 and Python are all maintained as in GRIB-API. However, the GRIB-API Fortran 77 interface is no longer available.
+In addition, a new set of functions with the prefix "codes_" is provided to operate on all the supported message formats. These functions have the same interface and behaviour as the "grib_" functions.
+A selection of GRIB-API tools has been included in ecCodes (ecCodes GRIB tools), while new tools are available for the BUFR (ecCodes BUFR tools) and GTS formats. The new tools have been developed to be as similar as possible to the existing GRIB-API tools maintaining, where possible, the same options and behaviour. A significant difference compared with GRIB-API tools is that bufr_dump produces output in JSON format which can be used in many web based applications.
+Migration from GRIB-API to ecCodes is expected to be transparent for current GRIB-API users. The GRIB-API library is fully available in the ecCodes library. Users are encouraged to test their GRIB-API applications by linking with the ecCodes library and to provide feedback of any problems encountered.
+Reference manuals are also provided for the C library (organized in C interface), for the Fortran 90 interface and for the Python interface.
+Installation instructions are also provided.
+
+ eccodes
+
+ |
+
-The only required package for a standard installation is jasper which enables the jpeg2000 packing/unpacking algorithm. It is possible to build grib_api without jasper, by using the --disable-jpeg configure option, but to install a fully functional library, its download is recommended.
> gunzip grib_api-X.X.X.tar.gz - > tar xf grib_api-X.X.X.tar -
> mkdir grib_api_dir -
> cd grib_api-X.X.X - > ./configure --prefix=grib_api_dir -
> make - ... - > make check - ... - > make install - ... -
GRIB API installation is based on the standard configure utility. It is tested on several platforms and with several compilers. However for some platforms modifications to the installation engine may be required. If you encounter any problem during the installation procedure please send an e-mail with your problem to Softw. are. Suppo rt@e cmwf. int
+The only required package for a standard installation is jasper which enables the jpeg2000 packing/unpacking algorithm. It is possible to build GRIB API without jasper, by using the –disable-jpeg configure option, but to install a fully functional library, its download is recommended.
+The following instructions are valid only if you have already installed GRIB API and you need to update the current parameter files. The parameter files should work with any version of GRIB API.
+To install the parameter files, then please unpack the downloaded archive in the definition files folder of your GRIB API installation, i.e.:
+This process will overwrite any changes you might have done to the parameter files, so please do make a backup of the definition files folder before installing the downloaded GRIB API parameter files.
+The following instructions are valid only if you have already installed GRIB API and you need to update the definition files compatible with the same library version you have already installed. Please note that using the definition files with a version of the library different from the one indicated as compatible will cause some problems in decoding/encoding.
+
+ eccodes
+
+ |
+
Get the value for a key from a grib message. + More...
++Public Member Functions | |
subroutine | codes_get_int (msgid, key, value, status) |
Get the integer value of a key from a message. More... | |
subroutine | codes_get_long (msgid, key, value, status) |
Get the integer value of a key from a message. More... | |
subroutine | codes_get_real4 (msgid, key, value, status) |
Get the real(4) value of a key from a message. More... | |
subroutine | codes_get_real8 (msgid, key, value, status) |
Get the real(8) value of a key from a message. More... | |
subroutine | codes_get_string (msgid, key, value, status) |
Get the character value of a key from a message. More... | |
subroutine | codes_get_byte_array (msgid, key, value, length, status) |
Get the array of bytes (character) for a key from a message. More... | |
subroutine | codes_get_int_array (msgid, key, value, status) |
Get the integer array of values for a key from a message. More... | |
subroutine | codes_get_real4_array (msgid, key, value, status) |
Get the real(4) array of values for a key from a message. More... | |
subroutine | codes_get_real8_array (msgid, key, value, status) |
Get the real(8) array of values for a key from a message. More... | |
Get the value for a key from a grib message.
+Given a gribid and key as input a value for the key is returned. In some cases the value can be an array rather than a scalar. As examples of array keys we have "values","pl", "pv" respectively the data values, the list of number of points for each latitude in a reduced grid and the list of vertical levels. In these cases the value array must be allocated by the caller and their required dimension can be obtained with codes_get_size.
+ The value can be integer(4), real(4), real(8), character. Although each key has its own native type, a key of type integer can be retrieved (with codes_get) as real(4), real(8) or character. Analogous conversions are always provided when possible. Illegal conversions are real to integer and character to any other type.
The gribid references to a grib message loaded in memory.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_get_keys.f90, print_data.f90
+[in] | gribid | id of the grib loaded in memory |
[in] | key | key name |
[out] | value | value can be a scalar or array of integer(4),real(4),real(8),character |
[out] | status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_byte_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=1), dimension(:), intent(inout) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +length, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the array of bytes (character) for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | character(len=1) array of byte values |
length | (optional) output: number of values retrieved |
status | (optional) CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindofint), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_int_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind = kindoflong), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the integer value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(inout), allocatable | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) array of values for a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
+ Note: This function supports the allocatable array attribute
msgid | id of the message loaded in memory |
key | key name |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_string | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the character value of a key from a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | the real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get a value of specified index from an array key. + More...
++Public Member Functions | |
subroutine | codes_get_real4_element (msgid, key, index, value, status) |
Get a real(4) value of specified index from an array key. More... | |
subroutine | codes_get_real8_element (msgid, key, index, value, status) |
Get a real(8) value of specified index from an array key. More... | |
subroutine | codes_get_real4_elements (msgid, key, index, value, status) |
Get the real(4) values whose indexes are stored in the array "index" from an array key. More... | |
subroutine | codes_get_real8_elements (msgid, key, index, value, status) |
Get the real(8) values whose indexes are stored in the array "index" from an array key. More... | |
Get a value of specified index from an array key.
+Given an ID and key name as input a value corresponding to the given index is returned. The index is zero based i.e. the first element has zero index, the second element index one and so on. If the parameter index is an array all the values correspondig to the indexes list is returned. The ID references to a message loaded in memory.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_nearest.f90
+[in] | id | ID of the message loaded in memory |
[in] | key | key name |
[in] | index | index can be a scalar or array of integer(4) |
[out] | value | value can be a scalar or array of integer(4),real(4),real(8) |
[out] | status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_element | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +index, | +
+ | + | real(kind = kindoffloat), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get a real(4) value of specified index from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) index |
value | real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real4_elements | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +index, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(4) values whose indexes are stored in the array "index" from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) array indexes |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_element | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +index, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get a real(8) value of specified index from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) index |
value | real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_real8_elements | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +index, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the real(8) values whose indexes are stored in the array "index" from an array key.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
index | integer(4) array index |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get the size of a coded message. + More...
++Public Member Functions | |
subroutine | codes_get_message_size_int (msgid, nbytes, status) |
Get the size of a coded message. More... | |
subroutine | codes_get_message_size_size_t (msgid, nbytes, status) |
Get the size of a coded message. More... | |
Get the size of a coded message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
nbytes | size in bytes of the message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_message_size_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofint), intent(out) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of a coded message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
nbytes | size in bytes of the message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_message_size_size_t | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | integer(kind=kindofsize_t), intent(out) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of a coded message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
nbytes | size in bytes of the message |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get the size of an array key. + More...
++Public Member Functions | |
subroutine | codes_get_size_int (msgid, key, size, status) |
Get the size of an array key. More... | |
subroutine | codes_get_size_long (msgid, key, size, status) |
Get the size of an array key. More... | |
Get the size of an array key.
+To get the size of a key representing an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
key | name of the key |
size | size of the array key |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_size_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of an array key.
+To get the size of a key representing an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | name of the key |
size | size of the array key |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_get_size_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the size of an array key.
+To get the size of a key representing an array.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | name of the key |
size | size of the array key |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Find the nearest point/points of a given latitude/longitude point. + More...
++Public Member Functions | |
subroutine | codes_grib_find_nearest_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status) |
Find the nearest point of a given latitude/longitude point. More... | |
subroutine | codes_grib_find_nearest_four_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status) |
Find the 4 nearest points of a latitude longitude point. More... | |
subroutine | codes_grib_find_nearest_multiple (gribid, is_lsm, inlats, inlons, outlats, outlons, values, distances, indexes, status) |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively. More... | |
Find the nearest point/points of a given latitude/longitude point.
+The value in the nearest point (or the four nearest points) is returned as well as the zero based index (which can be used in codes_get_element) and its distance from the given point using the following formula radius * acos( sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2) ).
+If the is_lsm flag is .true. the input field gribid is considered as a land sea mask and the nearest land point is returned.
+ The nearest land point among the four neighbours is:
Arrays (real(8)) of latitude/longitude can be provided to find with one call the values,indexes and distances for all the lat/lon points listed in the arrays.
+If a single latitude/longitude point is provided and outlat,outlon,value,distance,index are defined as arrays with four elements the lat/lon coordinates and values, distances and indexes of the four nearest points are returned.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_nearest.f90
+[in] | gribid | id of the grib loaded in memory |
[in] | is_lsm | .true. if the nearest land point is required otherwise .false. |
[in] | inlat | latitude of the point in degrees |
[in] | inlon | longitudes of the point in degrees |
[out] | outlat | latitude of the nearest point in degrees |
[out] | outlon | longitude of the nearest point in degrees |
[out] | distance | distance between the given point and its nearest (in km) |
[out] | index | zero based index |
[out] | value | value of the field in the nearest point |
[out] | status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_four_single | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlat, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlon, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +outlat, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +outlon, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +value, | +
+ | + | real(kind = kindofdouble), dimension(4), intent(out) | +distance, | +
+ | + | integer(kind = kindofint), dimension(4), intent(out) | +index, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the 4 nearest points of a latitude longitude point.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the GRIB loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlat | latitude of the point |
inlon | longitudes of the point |
outlat | latitude of the nearest point |
outlon | longitude of the nearest point |
distance | distance between the given point and its nearest |
index | zero based index |
value | value of the field in the nearest point |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_multiple | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +inlats, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +inlons, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +outlats, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +outlons, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +values, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(out) | +distances, | +
+ | + | integer(kind = kindofint), dimension(:), intent(out) | +indexes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the nearest point of a set of points whose latitudes and longitudes are given in the inlats, inlons arrays respectively.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlats | input real(8) array of the latitudes of the points |
inlons | input real(8) array of the longitudes of the points |
outlats | output real(8) array of the latitudes of the nearest points |
outlons | output real(8) array of the longitudes of the nearest points |
distances | output real(8) array of the distances |
indexes | output integer(4) array of the zero based indexes |
values | output real(8) array of the values |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_find_nearest_single | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | logical, intent(in) | +is_lsm, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlat, | +
+ | + | real(kind = kindofdouble), intent(in) | +inlon, | +
+ | + | real(kind = kindofdouble), intent(out) | +outlat, | +
+ | + | real(kind = kindofdouble), intent(out) | +outlon, | +
+ | + | real(kind = kindofdouble), intent(out) | +value, | +
+ | + | real(kind = kindofdouble), intent(out) | +distance, | +
+ | + | integer(kind = kindofint), intent(out) | +index, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Find the nearest point of a given latitude/longitude point.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
is_lsm | .true. if the nearest land point is required otherwise .false. |
inlat | latitude of the point |
inlon | longitudes of the point |
outlat | latitude of the nearest point |
outlon | longitude of the nearest point |
distance | distance between the given point and its nearest |
index | zero based index |
value | value of the field in the nearest point |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get latitude/longitude and data values. + More...
++Public Member Functions | |
subroutine | codes_grib_get_data_real4 (gribid, lats, lons, values, status) |
Get latitudes/longitudes/data values (real(4)). More... | |
subroutine | codes_grib_get_data_real8 (gribid, lats, lons, values, status) |
Get latitudes/longitudes/data values (real(8)). More... | |
Get latitude/longitude and data values.
+Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the caller and their required dimension can be obtained with codes_get_size or by getting (with codes_get) the value of the integer key "numberOfPoints".
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: get_data.f90
+[in] | gribid | id of the grib loaded in memory |
[out] | lats | latitudes array with dimension "size" |
[out] | lons | longitudes array with dimension "size" |
[out] | values | data values array with dimension "size" |
subroutine codes_grib_get_data_real4 | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +lats, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +lons, | +
+ | + | real ( kind = kindoffloat ), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get latitudes/longitudes/data values (real(4)).
+Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the caller and their required dimension can be obtained with codes_get_size or by getting (with codes_get) the value of the integer key "numberOfPoints".
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
lats | latitudes array with dimension "size" |
lons | longitudes array with dimension "size" |
values | data values array with dimension "size" |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_grib_get_data_real8 | +( | +integer(kind=kindofint), intent(in) | +gribid, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +lats, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +lons, | +
+ | + | real ( kind = kindofdouble ), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get latitudes/longitudes/data values (real(8)).
+Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the calling program/function. Their required dimension can be obtained by getting (with codes_get) the value of the integer key "numberOfPoints". In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
gribid | id of the grib loaded in memory |
lats | latitudes array |
lons | longitudes array |
values | data values array |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get the distinct values of the key in argument contained in the index. + More...
++Public Member Functions | |
subroutine | codes_index_get_int (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_long (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_string (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_real8 (indexid, key, values, status) |
Get the distinct values of the key in argument contained in the index. More... | |
Get the distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_real8 | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind=kindofdouble), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_string | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), dimension(:), intent(out) | +values, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
values | array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Get the number of distinct values of the key in argument contained in the index. + More...
++Public Member Functions | |
subroutine | codes_index_get_size_int (indexid, key, size, status) |
Get the number of distinct values of the key in argument contained in the index. More... | |
subroutine | codes_index_get_size_long (indexid, key, size, status) |
Get the number of distinct values of the key in argument contained in the index. More... | |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for which the number of values is computed |
size | number of distinct values of the key in the index |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_size_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for which the number of values is computed |
size | number of distinct values of the key in the index |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_get_size_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(out) | +size, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Get the number of distinct values of the key in argument contained in the index.
+The key must belong to the index.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for which the number of values is computed |
size | number of distinct values of the key in the index |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Select the message subset with key==value. + More...
++Public Member Functions | |
subroutine | codes_index_select_int (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_long (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_string (indexid, key, value, status) |
Select the message subset with key==value. More... | |
subroutine | codes_index_select_real8 (indexid, key, value, status) |
Select the message subset with key==value. More... | |
Select the message subset with key==value.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_int | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_long | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_real8 | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind=kindofdouble), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a real. The key must have been created with real type or have real as native type if the type was not explicitly defined in the index creation.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_index_select_string | +( | +integer(kind=kindofint), intent(in) | +indexid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a integer. 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.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_index.f90
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Create a new message in memory from an integer or character array containting the coded message. + More...
++Public Member Functions | |
subroutine | codes_new_from_message_int4 (msgid, message, status) |
Create a new message in memory from an integer array containting the coded message. More... | |
subroutine | codes_new_from_message_char (msgid, message, status) |
Create a new message in memory from a character array containting the coded message. More... | |
Create a new message in memory from an integer or character array containting the coded message.
+The message can be accessed through its ID and it will be available
+ until codes_release is called. A reference to the original coded
+ message is kept in the new message structure.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_copy_message.f90
+id | ID of the message loaded in memory |
message | array containing the coded message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_new_from_message_char | +( | +integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | character(len=1), dimension(:), intent(in) | +message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new message in memory from a character array containting the coded message.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called. A reference to the original coded
+ message is kept in the new message structure.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_copy_message.f90
+msgid | id of the message loaded in memory |
message | character array containing the coded message |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_new_from_message_int4 | +( | +integer(kind=kindofint), intent(out) | +msgid, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +message, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Create a new message in memory from an integer array containting the coded message.
+The message can be accessed through its msgid and it will be available
+ until codes_release is called. A reference to the original coded
+ message is kept in the new message structure.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: grib_copy_message.f90
+msgid | id of the message loaded in memory |
message | integer array containing the coded message |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Reads nbytes bytes into the buffer from a file opened with codes_open_file. + More...
++Public Member Functions | |
subroutine | codes_read_bytes_int4 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_int4_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_char (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_char_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real8 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real8_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real4 (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
subroutine | codes_read_bytes_real4_size_t (ifile, buffer, nbytes, status) |
Reads nbytes bytes into the buffer from a file opened with codes_open_file. More... | |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real8 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_bytes_real8_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads nbytes bytes into the buffer from a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Reads a message in the buffer array from the file opened with codes_open_file. + More...
++Public Member Functions | |
subroutine | codes_read_from_file_int4 (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_int4_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_char (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
subroutine | codes_read_from_file_char_size_t (ifile, buffer, nbytes, status) |
Reads a message in the buffer array from the file opened with codes_open_file. More... | |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofint), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_read_from_file_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(out) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(inout) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Reads a message in the buffer array from the file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | binary buffer to be read |
nbytes | number of bytes to be read |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Set the value for a key in a grib message. + More...
++Public Member Functions | |
subroutine | codes_set_int (msgid, key, value, status) |
Set the integer value for a key in a message. More... | |
subroutine | codes_set_long (msgid, key, value, status) |
Set the integer value for a key in a message. More... | |
subroutine | codes_set_real4 (msgid, key, value, status) |
Set the real(4) value for a key in a message. More... | |
subroutine | codes_set_real8 (msgid, key, value, status) |
Set the real(8) value for a key in a message. More... | |
subroutine | codes_set_string (msgid, key, value, status) |
*/ More... | |
subroutine | codes_set_int_array (msgid, key, value, status) |
Set the integers values for an array key in a message. More... | |
subroutine | codes_set_long_array (msgid, key, value, status) |
Set the integers values for an array key in a message. More... | |
subroutine | codes_set_byte_array (msgid, key, value, length, status) |
Set the array of bytes (character) for a key in a message. More... | |
subroutine | codes_set_real4_array (msgid, key, value, status) |
Set the real(4) values for an array key in a message. More... | |
subroutine | codes_set_real8_array (msgid, key, value, status) |
Set the real(8) values for an array key in a message. More... | |
Set the value for a key in a grib message.
+The given value is set for the key in the gribid message. In some cases the value can be an array rather than a scalar. As examples of array keys we have "values","pl", "pv" respectively the data values, the list of number of points for each latitude in a reduced grid and the list of vertical levels. In these cases the value array must be allocated by the caller and their required dimension can be obtained with codes_get_size.
+ The gribid references to a grib message loaded in memory.
In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
Examples: set.f90
+[in] | gribid | id of the grib loaded in memory |
[in] | key | key name |
[out] | value | value can be a scalar or array of integer(4),real(4),real(8) |
[out] | status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_byte_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=1), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +length, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the array of bytes (character) for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | character(len=1) array of byte values |
length | (optional) output: number of values written |
status | (optional) CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_int | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integer value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_int_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindofint), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integers values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_long | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integer value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_long_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | integer(kind=kindoflong), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the integers values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | integer(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real4 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(4) value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(4) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real4_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindoffloat), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(4) values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(4) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real8 | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(8) value for a key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(8) value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_real8_array | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | real(kind = kindofdouble), dimension(:), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Set the real(8) values for an array key in a message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the message loaded in memory |
key | key name |
value | real(8) array value |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_set_string | +( | +integer(kind=kindofint), intent(in) | +msgid, | +
+ | + | character(len=*), intent(in) | +key, | +
+ | + | character(len=*), intent(in) | +value, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
*/
+Set the character value for a string key in a grib message.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
msgid | id of the grib loaded in memory |
key | key name |
value | character value |
status | CODES_SUCCESS if OK, integer value on error |
+ eccodes
+
+ |
+
Write nbytes bytes from the buffer in a file opened with codes_open_file. + More...
++Public Member Functions | |
subroutine | codes_write_bytes_int4 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_int4_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_char (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_char_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real8 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real8_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real4 (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
subroutine | codes_write_bytes_real4_size_t (ifile, buffer, nbytes, status) |
Write nbytes bytes from the buffer in a file opened with codes_open_file. More... | |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_char | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_char_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | character(len=1), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_int4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_int4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | integer(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real4 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real4_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=4), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real8 | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofint), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
subroutine codes_write_bytes_real8_size_t | +( | +integer(kind=kindofint), intent(in) | +ifile, | +
+ | + | real(kind=8), dimension(:), intent(in) | +buffer, | +
+ | + | integer(kind=kindofsize_t), intent(in) | +nbytes, | +
+ | + | integer(kind=kindofint), intent(out), optional | +status | +
+ | ) | ++ |
Write nbytes bytes from the buffer in a file opened with codes_open_file.
+In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
+ Otherwise the error message can be gathered with codes_get_error_string.
ifile | id of the opened file to be used in all the file functions. |
buffer | buffer to be written |
nbytes | number of bytes to be written |
status | CODES_SUCCESS if OK, integer value on error |
t |
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
This package is the Python interface to ecCodes. +More...
++Data Structures | |
class | CodesInternalError |
Wrap errors coming from the C API in a Python exception object. More... | |
+Functions | |
def | codes_gts_new_from_file |
Load in memory a GTS message from a file. More... | |
def | codes_metar_new_from_file |
Load in memory a METAR message from a file. More... | |
def | codes_new_from_file |
Load in memory a message from a file for a given product. More... | |
def | codes_any_new_from_file |
Load in memory a message from a file. More... | |
def | codes_bufr_new_from_file |
Load in memory a BUFR message from a file. More... | |
def | codes_grib_new_from_file |
Load in memory a grib message from a file. More... | |
def | codes_count_in_file |
Count the messages in a file. More... | |
def | codes_grib_multi_support_on |
Turn on the support for multiple fields in a single message. More... | |
def | codes_grib_multi_support_off |
Turn off the support for multiple fields in a single message. More... | |
def | codes_release |
Free the memory for the message referred as msgid. More... | |
def | codes_get_string |
Get the string value of a key from a message. More... | |
def | codes_set_string |
Set the value for a string key in a grib message. More... | |
def | codes_gribex_mode_on |
Turn on the compatibility mode with gribex. More... | |
def | codes_gribex_mode_off |
Turn off the compatibility mode with gribex. More... | |
def | codes_write |
Write a message to a file. More... | |
def | codes_grib_multi_write |
Write a multi field message to a file. More... | |
def | codes_grib_multi_append |
Append a single field grib message to a multi field grib message. More... | |
def | codes_get_size |
Get the size of an array key. More... | |
def | codes_get_string_length |
Get the length of the string version of a key. More... | |
def | codes_skip_computed |
Skip the computed keys in a keys iterator. More... | |
def | codes_skip_coded |
Skip the coded keys in a keys iterator. More... | |
def | codes_skip_edition_specific |
Skip the edition specific keys in a keys iterator. More... | |
def | codes_skip_duplicates |
Skip the duplicate keys in a keys iterator. More... | |
def | codes_skip_read_only |
Skip the read_only keys in a keys iterator. More... | |
def | codes_skip_function |
Skip the function keys in a keys iterator. More... | |
def | codes_grib_iterator_new |
Create a new geoiterator for the given message, using its geometry and values. More... | |
def | codes_grib_iterator_delete |
Delete a geoiterator and free memory. More... | |
def | codes_grib_iterator_next |
Retrieve the next value from a geoiterator. More... | |
def | codes_keys_iterator_new |
Create a new iterator on the keys. More... | |
def | codes_keys_iterator_next |
Advance to the next keys iterator value. More... | |
def | codes_keys_iterator_delete |
Delete a keys iterator and free memory. More... | |
def | codes_keys_iterator_get_name |
Get the name of a key from a keys iterator. More... | |
def | codes_keys_iterator_rewind |
Rewind a keys iterator. More... | |
def | codes_get_long |
Get the value of a key in a grib message as an int. More... | |
def | codes_get_double |
Get the value of a key in a grib message as a float. More... | |
def | codes_set_long |
Set the integer value for a key in a grib message. More... | |
def | codes_set_double |
Set the double value for a key in a grib message. More... | |
def | codes_new_from_samples |
Create a new valid GRIB message from a sample. More... | |
def | codes_bufr_new_from_samples |
Create a new valid BUFR message from a sample. More... | |
def | codes_clone |
Create a copy of a message. More... | |
def | codes_set_double_array |
Set the value of the key to a double array. More... | |
def | codes_get_double_array |
Get the value of the key as a NumPy array of doubles. More... | |
def | grib_get_string_array |
Get the value of the key as a list of strings. More... | |
def | grib_set_string_array |
Set the value of the key to a string array. More... | |
def | codes_set_long_array |
Set the value of the key to an integer array. More... | |
def | codes_get_long_array |
Get the integer array of values for a key from a grib message. More... | |
def | codes_grib_multi_new |
Create a new multi field and return its id. More... | |
def | codes_grib_multi_release |
Release a multi field from memory. More... | |
def | codes_copy_namespace |
Copy the value of all the keys belonging to a namespace from the source message to the destination message. More... | |
def | codes_index_new_from_file |
Create a new index from a file. More... | |
def | codes_index_add_file |
Add a file to an index. More... | |
def | codes_index_release |
Delete an index. More... | |
def | codes_index_get_size |
Get the number of distinct values for the index key. More... | |
def | codes_index_get_long |
Get the distinct values of the key in argument contained in the index. More... | |
def | codes_index_get_string |
Get the distinct values of the key in argument contained in the index. More... | |
def | codes_index_get_double |
Get the distinct values of the key in argument contained in the index. More... | |
def | codes_index_select_long |
Select the message subset with key==value. More... | |
def | codes_index_select_double |
Select the message subset with key==value. More... | |
def | codes_index_select_string |
Select the message subset with key==value. More... | |
def | codes_new_from_index |
Create a new handle from an index after having selected the key values. More... | |
def | codes_get_message_size |
Get the size of a coded message. More... | |
def | codes_get_message_offset |
Get the offset of a coded message. More... | |
def | codes_get_double_element |
Get as double the i-th element of the "key" array. More... | |
def | codes_get_double_elements |
Get as double array the elements of the "key" array whose indexes are listed in the input array. More... | |
def | codes_get_elements |
Retrieve the elements of the key array for the indexes specified in the input. More... | |
def | codes_set_missing |
Set as missing the value for a key in a grib message. More... | |
def | codes_set_key_vals |
Set the values for several keys at once in a grib message. More... | |
def | codes_is_missing |
Check if the value of a key is MISSING. More... | |
def | codes_is_defined |
Check if a key is defined (exists) More... | |
def | codes_grib_find_nearest |
Find the nearest grid point or the nearest four grid points to a given latitude/longitude. More... | |
def | codes_get_native_type |
Retrieve the native type of a key. More... | |
def | codes_get |
Get the value of a key in a grib message. More... | |
def | codes_get_array |
Get the contents of an array key. More... | |
def | codes_get_values |
Retrieve the contents of the 'values' key. More... | |
def | codes_set_values |
Set the contents of the 'values' key. More... | |
def | codes_set |
Set the value for a scalar key in a grib message. More... | |
def | codes_set_array |
Set the value for an array key in a message. More... | |
def | codes_index_get |
Get the distinct values of an index key. More... | |
def | codes_index_select |
Select the message subset with key==value. More... | |
def | codes_index_write |
Write an index to a file for later reuse. More... | |
def | codes_index_read |
Loads an index previously saved with codes_index_write to a file. More... | |
def | codes_no_fail_on_wrong_length |
Do not fail if the message has the wrong length. More... | |
def | codes_gts_header |
Set the GTS header on/off. More... | |
def | codes_get_api_version |
Get the api version. More... | |
def | codes_get_message |
Get the binary message. More... | |
def | codes_new_from_message |
Create a grib handle from a message in memory. More... | |
def | codes_set_definitions_path |
Set the definitions path. More... | |
def | codes_set_samples_path |
Set the samples path. More... | |
This package is the Python interface to ecCodes.
+It offers almost one to one bindings to the C API functions.
+The Python interface to ecCodes uses the NumPy package as the container of choice for the possible arrays of values that can be encoded/decoded in and from a grib message. Numpy is a package used for scientific computing in Python and an efficient container for generic data.
+The Python interface can be enabled/disabled from CMake by using the following flag:
+
When this is enabed, then the system Python will be used to build the interface.
+Requirements:
+- Python 2.6 or higher +- NumPy
def ecCodes.codes_any_new_from_file | +( | ++ | fileobj, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a message from a file.
+The message can be accessed through its id and will be available
+ until codes_release is called.
+ Examples: grib_get_keys.py
fileobj | python file object |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_bufr_new_from_file().
+ +Referenced by codes_new_from_file().
+ +def ecCodes.codes_bufr_new_from_file | +( | ++ | fileobj, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a BUFR message from a file.
+The message can be accessed through its id and will be available
+ until codes_release is called.
+ Examples: bufr_get_keys.py
fileobj | python file object |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_grib_new_from_file().
+ +Referenced by codes_any_new_from_file(), and codes_metar_new_from_file().
+ +def ecCodes.codes_bufr_new_from_samples | +( | ++ | samplename | ) | ++ |
Create a new valid BUFR message from a sample.
+The available samples are picked up from the directory pointed to by the environment variable ECCODES_SAMPLES_PATH. To know where the samples directory is run the codes_info tool.
+ Examples: grib_samples.py
samplename | name of the BUFR sample to be used |
CodesInternalError |
References codes_get_double_array(), and codes_get_size().
+ +Referenced by codes_set_long().
+ +def ecCodes.codes_clone | +( | ++ | msgid_src | ) | ++ |
Create a copy of a message.
+Create a copy of a given message (msgid_src) resulting in a new message in memory (msgid_dest) identical to the original one.
+Examples: grib_clone.py
+msgid_src | id of message to be cloned |
CodesInternalError |
References codes_get_size(), and grib_get_string_array().
+ +Referenced by codes_set_double().
+ +def ecCodes.codes_copy_namespace | +( | ++ | gribid_src, | +
+ | + | + | namespace, | +
+ | + | + | gribid_dest | +
+ | ) | ++ |
Copy the value of all the keys belonging to a namespace from the source message to the destination message.
+gribid_src | id of source message |
gribid_dest | id of destination message |
namespace | namespace to be copied |
CodesInternalError |
Referenced by grib_set_string_array().
+ +def ecCodes.codes_count_in_file | +( | ++ | fileobj | ) | ++ |
Count the messages in a file.
+Examples: count_messages.py
+fileobj | python file object |
CodesInternalError |
References codes_grib_multi_support_off().
+ +Referenced by codes_grib_new_from_file().
+ +def ecCodes.codes_get | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | ktype = None |
+
+ | ) | ++ |
Get the value of a key in a grib message.
+The type of value returned depends on the native type of the requested key. The type of value returned can be forced by using the type argument of the function. The type argument can be int, float or str.
+The msgid references a grib message loaded in memory.
+Examples: grib_get_keys.py, grib_print_data.py
+msgid | id of the grib loaded in memory |
key | key name |
ktype | the type we want the output in (int, float or str), native type if not specified |
CodesInternalError |
References codes_set(), codes_set_double(), codes_set_double_array(), codes_set_long(), and codes_set_string().
+ +Referenced by codes_is_defined().
+ +def ecCodes.codes_get_api_version | +( | +void | +) | ++ |
Get the api version.
+Get the API version.
+Returns the version of the api as a string in the format "major.minor.revision".
+ +Referenced by codes_index_get(), and codes_index_select().
+ +def ecCodes.codes_get_array | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | ktype = None |
+
+ | ) | ++ |
Get the contents of an array key.
+The output array will be stored in a NumPy ndarray. The type of the array returned depends on the native type of the requested key. The type of value returned can be forced by using the type argument of the function. The type argument can be int, float or string.
+msgid | id of the message loaded in memory |
key | the key to get the value for |
ktype | the type we want the output in (can be int, float or string), native type if not specified |
CodesInternalError |
References codes_set_array().
+ +Referenced by codes_grib_find_nearest().
+ +def ecCodes.codes_get_double | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the value of a key in a grib message as a float.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_new_from_samples().
+ +Referenced by codes_grib_find_nearest(), and codes_keys_iterator_delete().
+ +def ecCodes.codes_get_double_array | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the value of the key as a NumPy array of doubles.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_set_long_array().
+ +Referenced by codes_bufr_new_from_samples(), codes_get_native_type(), and codes_grib_find_nearest().
+ +def ecCodes.codes_get_double_element | +( | ++ | gribid, | +
+ | + | + | key, | +
+ | + | + | index | +
+ | ) | ++ |
Get as double the i-th element of the "key" array.
+gribid | id of the grib loaded in memory |
key | the key to be searched |
index | zero based index of value to retrieve |
CodesInternalError |
Referenced by codes_index_select_double().
+ +def ecCodes.codes_get_double_elements | +( | ++ | gribid, | +
+ | + | + | key, | +
+ | + | + | indexes | +
+ | ) | ++ |
Get as double array the elements of the "key" array whose indexes are listed in the input array.
+gribid | id of the grib loaded in memory |
key | the key to be searched |
indexes | list or tuple of indexes |
CodesInternalError |
Referenced by codes_index_select_string().
+ +def ecCodes.codes_get_elements | +( | ++ | gribid, | +
+ | + | + | key, | +
+ | + | + | indexes | +
+ | ) | ++ |
Retrieve the elements of the key array for the indexes specified in the input.
+gribid | id of the grib loaded in memory |
key | the key to be searched |
indexes | single index or a list of indexes |
CodesInternalError |
References codes_is_defined(), and codes_is_missing().
+ +Referenced by codes_new_from_index().
+ +def ecCodes.codes_get_long | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the value of a key in a grib message as an int.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_set_double().
+ +Referenced by codes_grib_find_nearest(), and codes_keys_iterator_next().
+ +def ecCodes.codes_get_long_array | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the integer array of values for a key from a grib message.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
Referenced by codes_grib_find_nearest(), and grib_get_string_array().
+ +def ecCodes.codes_get_message | +( | ++ | msgid | ) | ++ |
Get the binary message.
+Returns the binary string message associated with the grib identified by msgid.
+msgid | id of the grib loaded in memory |
CodesInternalError |
Referenced by codes_index_select().
+ +def ecCodes.codes_get_message_offset | +( | ++ | msgid | ) | ++ |
Get the offset of a coded message.
+msgid | id of the message loaded in memory |
CodesInternalError |
References codes_set_key_vals().
+ +Referenced by codes_index_select_double().
+ +def ecCodes.codes_get_message_size | +( | ++ | msgid | ) | ++ |
Get the size of a coded message.
+msgid | id of the message loaded in memory |
CodesInternalError |
References codes_set_missing().
+ +Referenced by codes_index_select_long().
+ +def ecCodes.codes_get_native_type | +( | ++ | gribid, | +
+ | + | + | key | +
+ | ) | ++ |
Retrieve the native type of a key.
+Possible values can be int, float or string.
+gribid | id of the grib loaded in memory |
key | key we want to find out the type for |
CodesInternalError |
References codes_get_double_array(), codes_get_values(), and codes_set_values().
+ +Referenced by codes_grib_find_nearest(), and codes_set_key_vals().
+ +def ecCodes.codes_get_size | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the size of an array key.
+Examples: grib_get_keys.py,count_messages.py
+msgid | id of the message loaded in memory |
key | name of the key |
CodesInternalError |
Referenced by codes_bufr_new_from_samples(), codes_clone(), codes_grib_multi_write(), and grib_get_string_array().
+ +def ecCodes.codes_get_string | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the string value of a key from a message.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_gribex_mode_off(), and codes_gribex_mode_on().
+ +Referenced by codes_grib_find_nearest(), and codes_grib_multi_support_off().
+ +def ecCodes.codes_get_string_length | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the length of the string version of a key.
+msgid | id of the message loaded in memory |
key | name of the key |
CodesInternalError |
References codes_skip_coded(), and codes_skip_edition_specific().
+ +Referenced by codes_grib_multi_append(), and codes_release().
+ +def ecCodes.codes_get_values | +( | ++ | gribid | ) | ++ |
Retrieve the contents of the 'values' key.
+A NumPy ndarray containing the values in the message is returned.
+Examples: grib_print_data.py, grib_samples.py
+gribid | id of the grib loaded in memory |
CodesInternalError |
References codes_index_get(), codes_set_double_array(), codes_set_long_array(), and grib_set_string_array().
+ +Referenced by codes_get_native_type().
+ +def ecCodes.codes_grib_find_nearest | +( | ++ | gribid, | +
+ | + | + | inlat, | +
+ | + | + | inlon, | +
+ | + | + | is_lsm = False , |
+
+ | + | + | npoints = 1 |
+
+ | ) | ++ |
Find the nearest grid point or the nearest four grid points to a given latitude/longitude.
+The number of nearest points returned can be controled through the npoints function argument.
+Examples: grib_nearest.py
+gribid | id of the grib loaded in memory |
inlat | latitude of the point |
inlon | longitude of the point |
is_lsm | True if the nearest land point is required otherwise False. |
npoints | 1 or 4 nearest grid points |
CodesInternalError |
References codes_get_array(), codes_get_double(), codes_get_double_array(), codes_get_long(), codes_get_long_array(), codes_get_native_type(), codes_get_string(), and grib_get_string_array().
+ +Referenced by codes_set_missing().
+ +def ecCodes.codes_grib_iterator_delete | +( | ++ | iterid | ) | ++ |
Delete a geoiterator and free memory.
+Examples: grib_iterator.py
+iterid | geoiterator id |
CodesInternalError |
Referenced by codes_skip_read_only().
+ +def ecCodes.codes_grib_iterator_new | +( | ++ | gribid, | +
+ | + | + | mode | +
+ | ) | ++ |
Create a new geoiterator for the given message, using its geometry and values.
+The geoiterator can be used to go through all the geopoints in a message and retrieve the values corresponding to those geopoints.
+Examples: grib_iterator.py
+gribid | id of the grib loaded in memory |
mode | flags for future use |
References codes_keys_iterator_new().
+ +Referenced by codes_skip_duplicates().
+ +def ecCodes.codes_grib_iterator_next | +( | ++ | iterid | ) | ++ |
Retrieve the next value from a geoiterator.
+Examples: grib_iterator.py
+iterid | geoiterator id |
CodesInternalError |
References codes_keys_iterator_delete(), and codes_keys_iterator_next().
+ +Referenced by codes_skip_function().
+ +def ecCodes.codes_grib_multi_append | +( | ++ | ingribid, | +
+ | + | + | startsection, | +
+ | + | + | multigribid | +
+ | ) | ++ |
Append a single field grib message to a multi field grib message.
+Only the sections with section number greather or equal "startsection" are copied from the input single message to the multi field output grib.
+Examples: grib_multi_write.py
+ingribid | id of the input single grib |
startsection | starting from startsection (included) all the sections are copied from the input single grib to the output multi grib |
multigribid | id of the output multi filed grib |
CodesInternalError |
References codes_get_string_length(), and codes_skip_computed().
+ +Referenced by codes_write().
+ +def ecCodes.codes_grib_multi_new | +( | +) | ++ |
Create a new multi field and return its id.
+Examples: grib_multi_write.py
+CodesInternalError |
References codes_index_add_file().
+ +Referenced by grib_get_string_array().
+ +def ecCodes.codes_grib_multi_release | +( | ++ | gribid | ) | ++ |
Release a multi field from memory.
+Examples: grib_multi_write.py
+gribid | id of the multi field we want to release the memory for |
CodesInternalError |
References codes_index_get_size(), and codes_index_release().
+ +Referenced by grib_set_string_array().
+ +def ecCodes.codes_grib_multi_support_off | +( | +) | ++ |
Turn off the support for multiple fields in a single message.
+CodesInternalError |
References codes_get_string().
+ +Referenced by codes_count_in_file().
+ +def ecCodes.codes_grib_multi_support_on | +( | +) | ++ |
Turn on the support for multiple fields in a single message.
+CodesInternalError |
References codes_release().
+ +Referenced by codes_grib_new_from_file().
+ +def ecCodes.codes_grib_multi_write | +( | ++ | multigribid, | +
+ | + | + | fileobj | +
+ | ) | ++ |
Write a multi field message to a file.
+Examples: grib_multi_write.py
+multigribid | id of the multi field grib loaded in memory |
fileobj | python file object |
CodesInternalError |
References codes_get_size().
+ +Referenced by codes_gribex_mode_off().
+ +def ecCodes.codes_grib_new_from_file | +( | ++ | fileobj, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a grib message from a file.
+The message can be accessed through its gribid and will be available
+ until codes_release is called.
+ The message can be loaded headers only by using the headers_only argument. Default is to have the headers only option set to off (False). If set to on (True), data values will be skipped. This will result in a significant performance gain if one is only interested in browsing through messages to retrieve metadata. Any attempt to retrieve data values keys when in the headers only mode will result in a key not found error.
Examples: grib_get_keys.py
+fileobj | python file object |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_count_in_file(), and codes_grib_multi_support_on().
+ +Referenced by codes_bufr_new_from_file(), and codes_metar_new_from_file().
+ +def ecCodes.codes_gribex_mode_off | +( | +) | ++ |
Turn off the compatibility mode with gribex.
+CodesInternalError |
References codes_grib_multi_write().
+ +Referenced by codes_get_string().
+ +def ecCodes.codes_gribex_mode_on | +( | +) | ++ |
Turn on the compatibility mode with gribex.
+CodesInternalError |
Referenced by codes_get_string().
+ +def ecCodes.codes_gts_header | +( | ++ | flag | ) | ++ |
Set the GTS header on/off.
+flag | True/False |
Referenced by codes_index_get().
+ +def ecCodes.codes_gts_new_from_file | +( | ++ | fileobj, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a GTS message from a file.
+The message can be accessed through its id and will be available
+ until codes_release is called.
+
fileobj | python file object |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_metar_new_from_file().
+ +Referenced by codes_new_from_file().
+ +def ecCodes.codes_index_add_file | +( | ++ | indexid, | +
+ | + | + | filename | +
+ | ) | ++ |
Add a file to an index.
+Examples: grib_index.py
+indexid | id of the index to add the file to |
filename | path of the file to be added to index |
CodesInternalError |
References codes_index_get_string().
+ +Referenced by codes_grib_multi_new().
+ +def ecCodes.codes_index_get | +( | ++ | indexid, | +
+ | + | + | key, | +
+ | + | + | ktype = str |
+
+ | ) | ++ |
Get the distinct values of an index key.
+The key must belong to the index.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created on the given key. |
key | key for which the values are returned |
ktype | the type we want the output in (int, float or str), str if not specified |
CodesInternalError |
References codes_get_api_version(), and codes_gts_header().
+ +Referenced by codes_get_values().
+ +def ecCodes.codes_index_get_double | +( | ++ | indexid, | +
+ | + | + | key | +
+ | ) | ++ |
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.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
CodesInternalError |
References codes_new_from_index().
+ +Referenced by codes_index_get_size(), and codes_set_values().
+ +def ecCodes.codes_index_get_long | +( | ++ | indexid, | +
+ | + | + | key | +
+ | ) | ++ |
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.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
CodesInternalError |
References codes_index_get_size(), and codes_index_select_long().
+ +Referenced by codes_index_new_from_file(), and codes_set_values().
+ +def ecCodes.codes_index_get_size | +( | ++ | indexid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the number of distinct values for the index key.
+The key must belong to the index.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created on the given key. |
key | key for which the number of values is computed |
CodesInternalError |
References codes_index_get_double().
+ +Referenced by codes_grib_multi_release(), codes_index_get_long(), codes_index_new_from_file(), and codes_index_release().
+ +def ecCodes.codes_index_get_string | +( | ++ | indexid, | +
+ | + | + | key | +
+ | ) | ++ |
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.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key for wich the values are returned |
CodesInternalError |
References codes_index_select_double(), and codes_index_select_string().
+ +Referenced by codes_index_add_file(), and codes_set_values().
+ +def ecCodes.codes_index_new_from_file | +( | ++ | filename, | +
+ | + | + | keys | +
+ | ) | ++ |
Create a new index from a file.
+Examples: grib_index.py
+filename | path of the file to index on |
keys | sequence of keys to index on. The type of the key can be explicitly declared appending :l for long (or alternatively :i), :d for double, :s for string to the key name. |
CodesInternalError |
References codes_index_get_long(), and codes_index_get_size().
+ +Referenced by codes_set_long_array().
+ +def ecCodes.codes_index_read | +( | ++ | filename | ) | ++ |
Loads an index previously saved with codes_index_write to a file.
+Examples: grib_index.py
+filename | path of file to load the index from |
CodesInternalError |
References codes_set_definitions_path(), and codes_set_samples_path().
+ +Referenced by codes_set_array().
+ +def ecCodes.codes_index_release | +( | ++ | indexid | ) | ++ |
Delete an index.
+Examples: grib_index.py
+indexid | id of an index created from a file. |
CodesInternalError |
References codes_index_get_size().
+ +Referenced by codes_grib_multi_release().
+ +def ecCodes.codes_index_select | +( | ++ | indexid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Select the message subset with key==value.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
CodesInternalError |
References codes_get_api_version(), codes_get_message(), and codes_new_from_message().
+ +Referenced by codes_set().
+ +def ecCodes.codes_index_select_double | +( | ++ | indexid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is a double.
+The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
CodesInternalError |
References codes_get_double_element(), and codes_get_message_offset().
+ +Referenced by codes_index_get_string(), and codes_set().
+ +def ecCodes.codes_index_select_long | +( | ++ | indexid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is an integer.
+The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
CodesInternalError |
References codes_get_message_size().
+ +Referenced by codes_index_get_long(), and codes_set().
+ +def ecCodes.codes_index_select_string | +( | ++ | indexid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Select the message subset with key==value.
+The value is an integer.
+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.
+Examples: grib_index.py
+indexid | id of an index created from a file. The index must have been created with the key in argument. |
key | key to be selected |
value | value of the key to select |
CodesInternalError |
References codes_get_double_elements().
+ +Referenced by codes_index_get_string(), and codes_set().
+ +def ecCodes.codes_index_write | +( | ++ | indexid, | +
+ | + | + | filename | +
+ | ) | ++ |
Write an index to a file for later reuse.
+An index can be loaded back from an index file with codes_index_read.
+Examples: grib_index.py
+indexid | id of the index |
filename | path of file to save the index to |
CodesInternalError |
Referenced by codes_set().
+ +def ecCodes.codes_is_defined | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Check if a key is defined (exists)
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_get().
+ +Referenced by codes_get_elements().
+ +def ecCodes.codes_is_missing | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Check if the value of a key is MISSING.
+The value of a key is considered as MISSING when all the bits assigned to it are set to 1. This is different from the actual key missing from the grib message. The value of a key MISSING has a special significance and that can be read about in the WMO documentation.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
Referenced by codes_get_elements().
+ +def ecCodes.codes_keys_iterator_delete | +( | ++ | iterid | ) | ++ |
Delete a keys iterator and free memory.
+Examples: grib_keys_iterator.py
+iterid | keys iterator id created with codes_keys_iterator_new |
CodesInternalError |
References codes_get_double().
+ +Referenced by codes_grib_iterator_next().
+ +def ecCodes.codes_keys_iterator_get_name | +( | ++ | iterid | ) | ++ |
Get the name of a key from a keys iterator.
+Examples: grib_keys_iterator.py
+iterid | keys iterator id created with codes_keys_iterator_new |
CodesInternalError |
References codes_set_long().
+ +Referenced by codes_keys_iterator_new().
+ +def ecCodes.codes_keys_iterator_new | +( | ++ | msgid, | +
+ | + | + | namespace = None |
+
+ | ) | ++ |
Create a new iterator on the keys.
+The keys iterator can be navigated to give all the key names which can then be used to get or set the key values with codes_get or codes_set. The set of keys returned can be controlled with the input variable namespace or using the functions codes_skip_read_only, codes_skip_duplicates, codes_skip_coded,codes_skip_computed. If namespace is a non empty string only the keys belonging to that namespace are returned. Example namespaces are "ls" (to get the same default keys as the grib_ls) and "mars" to get the keys used by mars.
+Examples: grib_iterator.py
+msgid | id of the message loaded in memory |
namespace | the namespace of the keys to search for (all the keys if None) |
CodesInternalError |
References codes_keys_iterator_get_name().
+ +Referenced by codes_grib_iterator_new().
+ +def ecCodes.codes_keys_iterator_next | +( | ++ | iterid | ) | ++ |
Advance to the next keys iterator value.
+Examples: grib_keys_iterator.py
+iterid | keys iterator id created with codes_keys_iterator_new |
CodesInternalError |
References codes_get_long(), and codes_keys_iterator_rewind().
+ +Referenced by codes_grib_iterator_next().
+ +def ecCodes.codes_keys_iterator_rewind | +( | ++ | iterid | ) | ++ |
Rewind a keys iterator.
+iterid | keys iterator id created with codes_keys_iterator_new |
CodesInternalError |
Referenced by codes_keys_iterator_next().
+ +def ecCodes.codes_metar_new_from_file | +( | ++ | fileobj, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a METAR message from a file.
+The message can be accessed through its id and will be available
+ until codes_release is called.
+
fileobj | python file object |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_bufr_new_from_file(), codes_grib_new_from_file(), and codes_new_from_file().
+ +Referenced by codes_gts_new_from_file().
+ +def ecCodes.codes_new_from_file | +( | ++ | fileobj, | +
+ | + | + | product_kind, | +
+ | + | + | headers_only = False |
+
+ | ) | ++ |
Load in memory a message from a file for a given product.
+The message can be accessed through its id and will be available
+ until codes_release is called.
+ Examples: get_product_kind.py
fileobj | python file object |
product_kind | one of CODES_PRODUCT_GRIB, CODES_PRODUCT_BUFR, CODES_PRODUCT_METAR or CODES_PRODUCT_GTS |
headers_only | whether or not to load the message with the headers only |
CodesInternalError |
References codes_any_new_from_file(), and codes_gts_new_from_file().
+ +Referenced by codes_metar_new_from_file().
+ +def ecCodes.codes_new_from_index | +( | ++ | indexid | ) | ++ |
Create a new handle from an index after having selected the key values.
+All the keys belonging to the index must be selected before calling this function. Successive calls to this function will return all the handles compatible with the constraints defined selecting the values of the index keys.
+The message can be accessed through its gribid and will be available until codes_release is called.
+Examples: grib_index.py
+indexid | id of an index created from a file. |
CodesInternalError |
References codes_get_elements().
+ +Referenced by codes_index_get_double().
+ +def ecCodes.codes_new_from_message | +( | ++ | message | ) | ++ |
Create a grib handle from a message in memory.
+Create a new grib message from the input binary string and return its grib id.
+message | binary string message |
CodesInternalError |
Referenced by codes_index_select().
+ +def ecCodes.codes_new_from_samples | +( | ++ | samplename | ) | ++ |
Create a new valid GRIB message from a sample.
+The available samples are picked up from the directory pointed to by the environment variable ECCODES_SAMPLES_PATH. To know where the samples directory is run the codes_info tool.
+ Examples: grib_samples.py
samplename | name of the sample to be used |
CodesInternalError |
References codes_set_double_array().
+ +Referenced by codes_get_double().
+ +def ecCodes.codes_no_fail_on_wrong_length | +( | ++ | flag | ) | ++ |
Do not fail if the message has the wrong length.
+flag | True/False |
Referenced by codes_set_array().
+ +def ecCodes.codes_release | +( | ++ | msgid | ) | ++ |
Free the memory for the message referred as msgid.
+Examples: grib_get_keys.py
+msgid | id of the message loaded in memory |
CodesInternalError |
References codes_get_string_length(), and codes_set_string().
+ +Referenced by codes_grib_multi_support_on().
+ +def ecCodes.codes_set | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Set the value for a scalar key in a grib message.
+The input value can be a python int, float or str.
+Examples: grib_set_keys.py
+msgid | id of the grib loaded in memory |
key | key name |
value | scalar value to set for key |
CodesInternalError |
References codes_index_select(), codes_index_select_double(), codes_index_select_long(), codes_index_select_string(), and codes_index_write().
+ +Referenced by codes_get().
+ +def ecCodes.codes_set_array | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Set the value for an array key in a message.
+Examples of array keys: "values" - data values "pl" - list of number of points for each latitude in a reduced grid "pv" - list of vertical levels
+The input array can be a numpy.ndarray or a python sequence like tuple, list, array, ...
+The wrapper will internally try to convert the input to a NumPy array before extracting its data and length. This is possible as NumPy allows the construction of arrays from arbitrary python sequences.
+msgid | id of the message loaded in memory |
key | key name |
value | array to set for key |
CodesInternalError |
References codes_index_read(), and codes_no_fail_on_wrong_length().
+ +Referenced by codes_get_array().
+ +def ecCodes.codes_set_definitions_path | +( | ++ | defs_path | ) | ++ |
Set the definitions path.
+defs_path | definitions path |
Referenced by codes_index_read().
+ +def ecCodes.codes_set_double | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Set the double value for a key in a grib message.
+A TypeError exception will be thrown if value cannot be represented as a float.
+msgid | id of the message loaded in memory |
key | key name |
value | float value to set |
CodesInternalError,TypeError |
References codes_clone().
+ +Referenced by codes_get(), and codes_get_long().
+ +def ecCodes.codes_set_double_array | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | inarray | +
+ | ) | ++ |
Set the value of the key to a double array.
+The input array can be a numpy.ndarray or a python sequence like tuple, list, array, ...
+The wrapper will internally try to convert the input to a NumPy array before extracting its data and length. This is possible as NumPy allows the construction of arrays from arbitrary python sequences.
+The elements of the input sequence need to be convertible to a double.
+msgid | id of the message loaded in memory |
key | key name |
inarray | tuple,list,array,numpy.ndarray |
CodesInternalError |
References grib_set_string_array().
+ +Referenced by codes_get(), codes_get_values(), and codes_new_from_samples().
+ +def ecCodes.codes_set_key_vals | +( | ++ | gribid, | +
+ | + | + | key_vals | +
+ | ) | ++ |
Set the values for several keys at once in a grib message.
+gribid | id of the grib loaded in memory |
key_vals | can be a string, list/tuple or dictionary. If a string, format must be "key1=val1,key2=val2" If a list, it must contain strings of the form "key1=val1" |
CodesInternalError |
References codes_get_native_type().
+ +Referenced by codes_get_message_offset().
+ +def ecCodes.codes_set_long | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Set the integer value for a key in a grib message.
+A TypeError exception will be thrown if value cannot be represented as an integer.
+msgid | id of the message loaded in memory |
key | key name |
value | value to set |
CodesInternalError,TypeError |
References codes_bufr_new_from_samples().
+ +Referenced by codes_get(), and codes_keys_iterator_get_name().
+ +def ecCodes.codes_set_long_array | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | inarray | +
+ | ) | ++ |
Set the value of the key to an integer array.
+The input array can be a numpy.ndarray or a python sequence like tuple, list, array, ...
+The wrapper will internally try to convert the input to a NumPy array before extracting its data and length. This is possible as NumPy allows the construction of arrays from arbitrary python sequences.
+The elements of the input sequence need to be convertible to an int.
+msgid | id of the message loaded in memory |
key | key name |
inarray | tuple,list,python array,numpy.ndarray |
CodesInternalError |
References codes_index_new_from_file().
+ +Referenced by codes_get_double_array(), and codes_get_values().
+ +def ecCodes.codes_set_missing | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Set as missing the value for a key in a grib message.
+It can be used to set a missing value in the grib header but not in the data values.
+Examples: grib_set_missing.py
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_grib_find_nearest().
+ +Referenced by codes_get_message_size().
+ +def ecCodes.codes_set_samples_path | +( | ++ | samples_path | ) | ++ |
Set the samples path.
+samples_path | samples path |
Referenced by codes_index_read().
+ +def ecCodes.codes_set_string | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | value | +
+ | ) | ++ |
Set the value for a string key in a grib message.
+msgid | id of the message loaded in memory |
key | key name |
value | string value |
CodesInternalError |
References codes_write().
+ +Referenced by codes_get(), and codes_release().
+ +def ecCodes.codes_set_values | +( | ++ | gribid, | +
+ | + | + | values | +
+ | ) | ++ |
Set the contents of the 'values' key.
+The input array can be a numpy.ndarray or a python sequence like tuple, list, array, ...
+The wrapper will internally try to convert the input to a NumPy array before extracting its data and length. This is possible as NumPy allows the construction of arrays from arbitrary python sequences.
+The elements of the input sequence need to be convertible to a double.
+Examples: grib_clone.py, grib_samples.py
+gribid | id of the grib loaded in memory |
values | array of values to set as tuple, list, array or numpy.ndarray |
References codes_index_get_double(), codes_index_get_long(), and codes_index_get_string().
+ +Referenced by codes_get_native_type().
+ +def ecCodes.codes_skip_coded | +( | ++ | iterid | ) | ++ |
Skip the coded keys in a keys iterator.
+The coded keys are actually coded in the message.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_skip_read_only().
+ +Referenced by codes_get_string_length().
+ +def ecCodes.codes_skip_computed | +( | ++ | iterid | ) | ++ |
Skip the computed keys in a keys iterator.
+The computed keys are not coded in the message, they are computed from other keys.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_skip_duplicates().
+ +Referenced by codes_grib_multi_append().
+ +def ecCodes.codes_skip_duplicates | +( | ++ | iterid | ) | ++ |
Skip the duplicate keys in a keys iterator.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_grib_iterator_new().
+ +Referenced by codes_skip_computed().
+ +def ecCodes.codes_skip_edition_specific | +( | ++ | iterid | ) | ++ |
Skip the edition specific keys in a keys iterator.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_skip_function().
+ +Referenced by codes_get_string_length().
+ +def ecCodes.codes_skip_function | +( | ++ | iterid | ) | ++ |
Skip the function keys in a keys iterator.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_grib_iterator_next().
+ +Referenced by codes_skip_edition_specific().
+ +def ecCodes.codes_skip_read_only | +( | ++ | iterid | ) | ++ |
Skip the read_only keys in a keys iterator.
+Read only keys cannot be set.
+ +iterid | keys iterator id |
CodesInternalError |
References codes_grib_iterator_delete().
+ +Referenced by codes_skip_coded().
+ +def ecCodes.codes_write | +( | ++ | msgid, | +
+ | + | + | fileobj | +
+ | ) | ++ |
Write a message to a file.
+Examples: grib_set_keys.py
+msgid | id of the message loaded in memory |
fileobj | python file object |
CodesInternalError |
References codes_grib_multi_append().
+ +Referenced by codes_set_string().
+ +def ecCodes.grib_get_string_array | +( | ++ | msgid, | +
+ | + | + | key | +
+ | ) | ++ |
Get the value of the key as a list of strings.
+msgid | id of the message loaded in memory |
key | key name |
CodesInternalError |
References codes_get_long_array(), codes_get_size(), and codes_grib_multi_new().
+ +Referenced by codes_clone(), and codes_grib_find_nearest().
+ +def ecCodes.grib_set_string_array | +( | ++ | msgid, | +
+ | + | + | key, | +
+ | + | + | inarray | +
+ | ) | ++ |
Set the value of the key to a string array.
+The input array can be a python sequence like tuple, list, array, ...
+The wrapper will internally try to convert the input to a NumPy array before extracting its data and length. This is possible as NumPy allows the construction of arrays from arbitrary python sequences.
+The elements of the input sequence need to be convertible to a double.
+msgid | id of the message loaded in memory |
key | key name |
inarray | tuple,list,array |
CodesInternalError |
References codes_copy_namespace(), and codes_grib_multi_release().
+ +Referenced by codes_get_values(), and codes_set_double_array().
+ +
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
+ eccodes
+
+ |
+
Codes context, structure containing the memory methods, the parsers and the formats.
+
+ eccodes
+
+ |
+
Codes handle, structure giving access to parsed values by keys
+
+ eccodes
+
+ |
+
index structure to access messages in a file.
+
+ eccodes
+
+ |
+
Codes iterator, structure supporting a geographic iteration of values in a GRIB message.
+
+ eccodes
+
+ |
+
Codes keys iterator. Iterator over keys.
+
+ eccodes
+
+ |
+
GRIB multi field handle, structure used to build multi fields messages.
+
+ eccodes
+
+ |
+
Codes nearest, structure used to find the nearest points of a latitude longitude point in a GRIB message.
+