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 |