ECC-1580: Add test

This commit is contained in:
Shahram Najm 2023-05-05 10:49:36 +01:00 committed by shahramn
parent 276cc91604
commit e6359b76c1
4 changed files with 189 additions and 130 deletions

View File

@ -13,6 +13,7 @@ if( HAVE_BUILD_TOOLS )
grib_set_data grib_set_data
bufr_ecc-1284 bufr_ecc-1284
bufr_ecc-1019 bufr_ecc-1019
get_native_type
grib_ecc-671 ) grib_ecc-671 )
list( APPEND tests_extra list( APPEND tests_extra
grib_index grib_index
@ -62,6 +63,7 @@ else()
list( APPEND tests_sanity list( APPEND tests_sanity
grib_set_pv grib_set_pv
grib_set_data grib_set_data
get_native_type
grib_ecc-671 ) grib_ecc-671 )
list( APPEND tests_extra list( APPEND tests_extra
grib_index grib_index

View File

@ -0,0 +1,41 @@
! (C) Copyright 2005- ECMWF.
!
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSECODES_INTERNAL_ERROR.0.
!
! In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
!
program get_native_type
use eccodes
implicit none
integer :: iret
integer :: ihandle
integer :: ktype = CODES_TYPE_UNDEFINED
CALL codes_grib_new_from_samples(ihandle, "regular_ll_sfc_grib2")
CALL codes_get_native_type(ihandle, 'edition', ktype)
IF (ktype /= CODES_TYPE_LONG) THEN
call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key edition should have integer type')
END IF
CALL codes_get_native_type(ihandle, 'referenceValue', ktype)
IF (ktype /= CODES_TYPE_DOUBLE) THEN
call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key referenceValue should have double type')
END IF
CALL codes_get_native_type(ihandle, 'identifier', ktype)
IF (ktype /= CODES_TYPE_STRING) THEN
call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key identifier should have string type')
END IF
CALL codes_set(ihandle, 'bitmapPresent', 1)
CALL codes_get_native_type(ihandle, 'bitmap', ktype)
IF (ktype /= CODES_TYPE_BYTES) THEN
call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key bitmap should have bytes type')
END IF
CALL codes_release(ihandle)
end program get_native_type

15
examples/F90/get_native_type.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
. ./include.ctest.sh
label="get_native_type_f"
${examples_dir}/eccodes_f_get_native_type

View File

@ -12,7 +12,7 @@
!> !>
!> \b Examples: \ref grib_set_missing.f90 "grib_set_missing.f90" !> \b Examples: \ref grib_set_missing.f90 "grib_set_missing.f90"
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_set_missing(gribid, key, status) subroutine grib_set_missing(gribid, key, status)
@ -41,9 +41,9 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of the newly created index !> @param indexid ID of the newly created index
!> @param filename name of the file of messages to be indexed !> @param filename name of the file of messages to be indexed
!> @param keys : comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. !> @param keys comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed.
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_index_create(indexid, filename, keys, status) subroutine grib_index_create(indexid, filename, keys, status)
integer(kind=kindOfInt), intent(inout) :: indexid integer(kind=kindOfInt), intent(inout) :: indexid
@ -69,7 +69,7 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of the index I want to add a file to !> @param indexid ID of the index I want to add a file to
!> @param filename name of the file I want to add to the index !> @param filename name of the file I want to add to the index
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_index_add_file(indexid, filename, status) subroutine grib_index_add_file(indexid, filename, status)
@ -95,7 +95,7 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of an index created from a file. The index must have been created with the key in argument. !> @param indexid ID of an index created from a file. The index must have been created with the key in argument.
!> @param key key for which the number of values is computed !> @param key key for which the number of values is computed
!> @param size number of distinct values of the key in the index !> @param size number of distinct values of the key in the index
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -123,7 +123,7 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of an index created from a file. The index must have been created with the key in argument. !> @param indexid ID of an index created from a file. The index must have been created with the key in argument.
!> @param key key for which the number of values is computed !> @param key key for which the number of values is computed
!> @param size number of distinct values of the key in the index !> @param size number of distinct values of the key in the index
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -142,7 +142,9 @@
end if end if
end subroutine grib_index_get_size_int end subroutine grib_index_get_size_int
!> 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. !> 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 !> In case of error, if the status parameter (optional) is not given, the program will
@ -151,7 +153,7 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of an index created from a file. The index must have been created with the key in argument. !> @param indexid ID of an index created from a file. The index must have been created with the key in argument.
!> @param key key for wich the values are returned !> @param key key for wich the values are returned
!> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. !> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -181,7 +183,7 @@
!> !>
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of an index created from a file. The index must have been created with the key in argument. !> @param indexid ID of an index created from a file. The index must have been created with the key in argument.
!> @param key key for wich the values are returned !> @param key key for wich the values are returned
!> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. !> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -388,7 +390,7 @@
!> \b Examples: \ref grib_index.f90 "grib_index.f90" !> \b Examples: \ref grib_index.f90 "grib_index.f90"
!> !>
!> @param indexid id of an index created from a file. !> @param indexid id of an index created from a file.
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code
subroutine grib_new_from_index(indexid, gribid, status) subroutine grib_new_from_index(indexid, gribid, status)
integer(kind=kindOfInt), intent(in) :: indexid integer(kind=kindOfInt), intent(in) :: indexid
@ -1250,7 +1252,7 @@
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
!> !>
!> @param ifile id of the file opened with @ref grib_open_file !> @param ifile id of the file opened with @ref grib_open_file
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code
subroutine grib_headers_only_new_from_file(ifile, gribid, status) subroutine grib_headers_only_new_from_file(ifile, gribid, status)
integer(kind=kindOfInt), intent(in) :: ifile integer(kind=kindOfInt), intent(in) :: ifile
@ -1274,7 +1276,7 @@
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
!> !>
!> @param ifile id of the file opened with @ref grib_open_file !> @param ifile id of the file opened with @ref grib_open_file
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code
subroutine grib_new_from_file(ifile, gribid, status) subroutine grib_new_from_file(ifile, gribid, status)
integer(kind=kindOfInt), intent(in) :: ifile integer(kind=kindOfInt), intent(in) :: ifile
@ -1348,7 +1350,7 @@
!> !>
!> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90" !> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90"
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param message character array containing the coded message !> @param message character array containing the coded message
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_new_from_message_char(gribid, message, status) subroutine grib_new_from_message_char(gribid, message, status)
@ -1381,7 +1383,7 @@
!> !>
!> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90" !> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90"
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param message integer array containing the coded message !> @param message integer array containing the coded message
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_new_from_message_int4(gribid, message, status) subroutine grib_new_from_message_int4(gribid, message, status)
@ -1412,7 +1414,7 @@
!> !>
!> \b Examples: \ref grib_samples.f90 "grib_samples.f90" !> \b Examples: \ref grib_samples.f90 "grib_samples.f90"
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param samplename name of the sample to be used !> @param samplename name of the sample to be used
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_new_from_samples(gribid, samplename, status) subroutine grib_new_from_samples(gribid, samplename, status)
@ -1437,7 +1439,7 @@
!> !>
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_release(gribid, status) subroutine grib_release(gribid, status)
integer(kind=kindOfInt), intent(in) :: gribid integer(kind=kindOfInt), intent(in) :: gribid
@ -1561,7 +1563,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param lats latitudes array with dimension "size" !> @param lats latitudes array with dimension "size"
!> @param lons longitudes array with dimension "size" !> @param lons longitudes array with dimension "size"
!> @param values data values array with dimension "size" !> @param values data values array with dimension "size"
@ -1597,7 +1599,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param lats latitudes array !> @param lats latitudes array
!> @param lons longitudes array !> @param lons longitudes array
!> @param values data values array !> @param values data values array
@ -1640,7 +1642,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param iterid keys iterator id to be used in the keys iterator functions !> @param iterid keys iterator id to be used in the keys iterator functions
!> @param namespace the namespace of the keys to search for (all the keys if empty) !> @param namespace the namespace of the keys to search for (all the keys if empty)
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1746,7 +1748,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_dump(gribid, status) subroutine grib_dump(gribid, status)
integer(kind=kindOfInt), intent(in) :: gribid integer(kind=kindOfInt), intent(in) :: gribid
@ -1788,7 +1790,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key name of the key !> @param key name of the key
!> @param size size of the array key !> @param size size of the array key
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1818,7 +1820,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key name of the key !> @param key name of the key
!> @param size size of the array key !> @param size size of the array key
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1846,7 +1848,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value the integer(4) value !> @param value the integer(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1874,7 +1876,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value the integer(4) value !> @param value the integer(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1931,7 +1933,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param is_missing 0->not missing, 1->missing !> @param is_missing 0->not missing, 1->missing
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1959,7 +1961,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param is_defined 0->not defined, 1->defined !> @param is_defined 0->not defined, 1->defined
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -1987,7 +1989,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value the real(4) value !> @param value the real(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2005,7 +2007,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_real4', key)
end if end if
end subroutine grib_get_real4 end subroutine grib_get_real4
@ -2015,7 +2017,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value the real(8) value !> @param value the real(8) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2033,7 +2035,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_real8', key)
end if end if
end subroutine grib_get_real8 end subroutine grib_get_real8
@ -2043,7 +2045,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value the real(8) value !> @param value the real(8) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2061,7 +2063,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_string', key)
end if end if
end subroutine grib_get_string end subroutine grib_get_string
@ -2071,7 +2073,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) array value !> @param value integer(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2092,7 +2094,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_int_array', key)
end if end if
end subroutine grib_get_int_array end subroutine grib_get_int_array
@ -2102,7 +2104,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) array value !> @param value integer(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2122,7 +2124,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_long_array', key)
end if end if
end subroutine grib_get_long_array end subroutine grib_get_long_array
@ -2132,7 +2134,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value character(len=1) array of byte values !> @param value character(len=1) array of byte values
!> @param length (optional) output: number of values retrieved !> @param length (optional) output: number of values retrieved
@ -2160,7 +2162,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_byte_array', key)
end if end if
end subroutine grib_get_byte_array end subroutine grib_get_byte_array
@ -2170,7 +2172,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(4) array value !> @param value real(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2190,7 +2192,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_real4_array', key)
end if end if
end subroutine grib_get_real4_array end subroutine grib_get_real4_array
@ -2200,7 +2202,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(8) array value !> @param value real(8) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2220,7 +2222,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_real8_array', key)
end if end if
end subroutine grib_get_real8_array end subroutine grib_get_real8_array
@ -2230,7 +2232,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param kindex integer(4) index !> @param kindex integer(4) index
!> @param value real(4) value !> @param value real(4) value
@ -2250,7 +2252,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'get', key) call grib_check(iret, 'get_real4_element', key)
end if end if
end subroutine grib_get_real4_element end subroutine grib_get_real4_element
@ -2260,7 +2262,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param kindex integer(4) index !> @param kindex integer(4) index
!> @param value real(8) value !> @param value real(8) value
@ -2290,7 +2292,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param kindex integer(4) array indexes !> @param kindex integer(4) array indexes
!> @param value real(4) array value !> @param value real(4) array value
@ -2322,7 +2324,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param kindex integer(4) array index !> @param kindex integer(4) array index
!> @param value real(8) array value !> @param value real(8) array value
@ -2354,7 +2356,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) value !> @param value integer(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2382,7 +2384,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) value !> @param value integer(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2410,7 +2412,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(4) value !> @param value real(4) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2438,7 +2440,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(8) value !> @param value real(8) value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2456,7 +2458,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_real8', key)
end if end if
end subroutine grib_set_real8 end subroutine grib_set_real8
@ -2466,7 +2468,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) array value !> @param value integer(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2486,7 +2488,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_int_array', key)
end if end if
end subroutine grib_set_int_array end subroutine grib_set_int_array
@ -2496,7 +2498,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value integer(4) array value !> @param value integer(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2516,7 +2518,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_long_array', key)
end if end if
end subroutine grib_set_long_array end subroutine grib_set_long_array
@ -2527,7 +2529,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value character(len=1) array of byte values !> @param value character(len=1) array of byte values
!> @param length (optional) output: number of values written !> @param length (optional) output: number of values written
@ -2554,7 +2556,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_byte_array', key)
end if end if
end subroutine grib_set_byte_array end subroutine grib_set_byte_array
@ -2564,7 +2566,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(4) array value !> @param value real(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2584,7 +2586,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_real4_array', key)
end if end if
end subroutine grib_set_real4_array end subroutine grib_set_real4_array
@ -2594,7 +2596,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(8) array value !> @param value real(8) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2614,7 +2616,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_real8_array', key)
end if end if
end subroutine grib_set_real8_array end subroutine grib_set_real8_array
@ -2625,7 +2627,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(4) array value !> @param value real(4) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2656,7 +2658,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value real(8) array value !> @param value real(8) array value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2686,7 +2688,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param key key name !> @param key key name
!> @param value character value !> @param value character value
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
@ -2704,7 +2706,7 @@
if (present(status)) then if (present(status)) then
status = iret status = iret
else else
call grib_check(iret, 'set', key) call grib_check(iret, 'set_string', key)
end if end if
end subroutine grib_set_string end subroutine grib_set_string
@ -2714,7 +2716,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param nbytes size in bytes of the message !> @param nbytes size in bytes of the message
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_get_message_size_int(gribid, nbytes, status) subroutine grib_get_message_size_int(gribid, nbytes, status)
@ -2745,7 +2747,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param nbytes size in bytes of the message !> @param nbytes size in bytes of the message
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_get_message_size_size_t(gribid, nbytes, status) subroutine grib_get_message_size_size_t(gribid, nbytes, status)
@ -2771,7 +2773,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param message array containing the coded message to be copied !> @param message array containing the coded message to be copied
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_copy_message(gribid, message, status) subroutine grib_copy_message(gribid, message, status)
@ -2799,7 +2801,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param ifile file id of a file opened with \ref grib_open_file !> @param ifile file id of a file opened with \ref grib_open_file
!> @param status GRIB_SUCCESS if OK, integer value on error !> @param status GRIB_SUCCESS if OK, integer value on error
subroutine grib_write(gribid, ifile, status) subroutine grib_write(gribid, ifile, status)
@ -2874,7 +2876,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param is_lsm .true. if the nearest land point is required otherwise .false.
!> @param inlats input real(8) array of the latitudes of the points !> @param inlats input real(8) array of the latitudes of the points
!> @param inlons input real(8) array of the longitudes of the points !> @param inlons input real(8) array of the longitudes of the points
@ -2920,7 +2922,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param is_lsm .true. if the nearest land point is required otherwise .false.
!> @param inlat latitude of the point !> @param inlat latitude of the point
!> @param inlon longitudes of the point !> @param inlon longitudes of the point
@ -2963,7 +2965,7 @@
!> exit with an error message.\n Otherwise the error message can be !> exit with an error message.\n Otherwise the error message can be
!> gathered with @ref grib_get_error_string. !> gathered with @ref grib_get_error_string.
!> !>
!> @param gribid id of the grib loaded in memory !> @param gribid ID of the message loaded in memory
!> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param is_lsm .true. if the nearest land point is required otherwise .false.
!> @param inlat latitude of the point !> @param inlat latitude of the point
!> @param inlon longitudes of the point !> @param inlon longitudes of the point
@ -3217,4 +3219,3 @@
end subroutine grib_set_samples_path end subroutine grib_set_samples_path
end module grib_api end module grib_api