mirror of https://github.com/ecmwf/eccodes.git
ECC-86: Rename all grib related API examples (Part 1)
This commit is contained in:
parent
8d3e66d50d
commit
ee2ab390b9
|
@ -92,10 +92,11 @@ examples/F90/*.sh.log
|
|||
examples/F90/*.sh.trs
|
||||
examples/F90/test-suite.log
|
||||
examples/C/bufr_read_header
|
||||
examples/C/bufr_read_synop
|
||||
examples/C/bufr_read_temp
|
||||
examples/C/bufr_print_data
|
||||
examples/C/bufr_print_header
|
||||
examples/C/get
|
||||
examples/C/grib_get_keys
|
||||
examples/C/get_data
|
||||
examples/C/get_product_kind
|
||||
examples/C/iterator
|
||||
|
@ -259,7 +260,7 @@ examples/F90/f_clone
|
|||
examples/F90/f_copy_message
|
||||
examples/F90/f_copy_namespace
|
||||
examples/F90/f_count_messages
|
||||
examples/F90/f_get
|
||||
examples/F90/f_grib_get_keys
|
||||
examples/F90/f_get_data
|
||||
examples/F90/f_get_product_kind
|
||||
examples/F90/f_get_pl
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*! \page examples Grib API examples
|
||||
|
||||
\example get.c get.c How to get values through the key names.
|
||||
\example grib_get_keys.c grib_get_keys.c How to get values through the key names.
|
||||
\example set.c set.c How to set values through the key names.
|
||||
\example keys_iterator.c keys_iterator.c How to get the names of all the keys
|
||||
defined in a message and how to iterate through them.
|
||||
|
@ -12,7 +12,7 @@ defined in a message and how to iterate through them.
|
|||
\example nearest.c nearest.c How to find the nearest grid points.
|
||||
|
||||
\example index.f90 How access a grib file through and index.
|
||||
\example get.f90 How to get values through the key names.
|
||||
\example grib_get_keys.f90 How to get values through the key names.
|
||||
\example count_messages.f90 count the messages in a file and loop through them.
|
||||
\example get_pl.f90 How to get the list of number of points for each parallel in reduced grids.
|
||||
\example get_pv.f90 How to get the list of levels.
|
||||
|
@ -42,7 +42,7 @@ defined in a message and how to iterate through them.
|
|||
\example print_data_fortran.F print_data_fortran.F How to print all the data from a grib message.
|
||||
|
||||
\example index.py How access a grib file through and index.
|
||||
\example get.py How to get values through the key names.
|
||||
\example grib_get_keys.py How to get values through the key names.
|
||||
\example print_data.py How to print all the data contained in a grib file.
|
||||
\example set.py How to set values through the key names.
|
||||
\example nearest.py How to find the nearest grid points.
|
||||
|
|
|
@ -24,7 +24,7 @@ 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
|
||||
\ref get_set "function calls" using a set of \ref keys to access the coded information
|
||||
( examples: \ref get.f90 "get.f90" \ref set.f90 "set.f90", \ref get.c "get.c", \ref set.c "set.c", \ref grib_get_examples "grib_get", \ref grib_set_examples "grib_set" ).
|
||||
( examples: \ref grib_get_keys.f90 "grib_get_keys.f90" \ref set.f90 "set.f90", \ref grib_get_keys.c "grib_get_keys.c", \ref set.c "set.c", \ref grib_get_examples "grib_get", \ref grib_set_examples "grib_set" ).
|
||||
|
||||
The \ref keys "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.
|
||||
|
|
|
@ -5,7 +5,7 @@ that can be taken as a starting point to write more complex programs.\n
|
|||
|
||||
\section python Python
|
||||
- \ref index.py "index.py" How access a grib file through and index.
|
||||
- \ref get.py "get.py" How to get values through the key names.
|
||||
- \ref grib_get_keys.py "grib_get_keys.py" How to get values through the key names.
|
||||
- \ref print_data.py "print_data.py" How to print all the data contained in a grib file.
|
||||
- \ref set.py "set.py" How to set values through the key names.
|
||||
- \ref nearest.py "nearest.py" How to find the nearest grid points.
|
||||
|
@ -20,7 +20,7 @@ that can be taken as a starting point to write more complex programs.\n
|
|||
|
||||
\section fortran90 Fortran 90
|
||||
- \ref index.f90 "index.f90" how to access a grib file through an index.
|
||||
- \ref get.f90 "get.f90" how to get values through the key names.
|
||||
- \ref grib_get_keys.f90 "grib_get_keys.f90" how to get values through the key names.
|
||||
- \ref count_messages.f90 "count_messages.f90" count the messages in a file and loop through them.
|
||||
- \ref get_pl.f90 "get_pl.f90" how to get the list of number of points for each parallel in reduced grids.
|
||||
- \ref get_pv.f90 "get_pv.f90" how to get the list of levels.
|
||||
|
@ -41,7 +41,7 @@ defined in a message and how to iterate through them.
|
|||
- \ref nearest.f90 "nearest.f90" how to find the nearest grid points.
|
||||
|
||||
\section C
|
||||
- \ref get.c "get.c" is an example showing how to get values through the key names.
|
||||
- \ref grib_get_keys.c "grib_get_keys.c" is an example showing how to get values through the key names.
|
||||
- \ref set.c "set.c" is an example illustrating how to set values through the key names.
|
||||
- \ref keys_iterator.c "keys_iterator.c" explains how to get the names of all the keys
|
||||
defined in a message and how to iterate through them.
|
||||
|
|
|
@ -10,7 +10,7 @@ list( APPEND test_bins
|
|||
nearest
|
||||
set_bitmap
|
||||
iterator
|
||||
get
|
||||
grib_get_keys
|
||||
print_data
|
||||
set
|
||||
set_missing
|
||||
|
@ -57,7 +57,7 @@ endforeach()
|
|||
#################################################
|
||||
list( APPEND tests
|
||||
iterator
|
||||
get
|
||||
grib_get_keys
|
||||
print_data
|
||||
set
|
||||
keys_iterator
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@
|
||||
|
||||
TESTS = iterator.sh get.sh print_data.sh set.sh keys_iterator.sh multi.sh multi_write.sh \
|
||||
TESTS = iterator.sh grib_get_keys.sh print_data.sh set.sh keys_iterator.sh multi.sh multi_write.sh \
|
||||
precision.sh list.sh large_grib1.sh get_data.sh sections_copy.sh set_missing.sh clone.sh set_pv.sh \
|
||||
check_gaussian_grids.sh \
|
||||
bufr_attributes.sh bufr_clone.sh bufr_expanded.sh bufr_get_keys.sh bufr_read_header.sh bufr_read_synop.sh \
|
||||
bufr_set_keys.sh bufr_subset.sh bufr_keys_iterator.sh bufr_missing.sh bufr_read_temp.sh \
|
||||
get_product_kind.sh
|
||||
|
||||
noinst_PROGRAMS = nearest set_bitmap iterator get print_data set set_missing keys_iterator \
|
||||
noinst_PROGRAMS = nearest set_bitmap iterator grib_get_keys print_data set set_missing keys_iterator \
|
||||
set_data mars_param values_check box multi multi2 multi_write precision \
|
||||
set_pv list sections_copy large_grib1 get_data iterator_bitmap clone new_sample \
|
||||
check_gaussian_grid ensemble_index points \
|
||||
|
@ -24,7 +24,7 @@ mars_param_SOURCES = mars_param.c
|
|||
values_check_SOURCES = values_check.c
|
||||
nearest_SOURCES = nearest.c
|
||||
multi_write_SOURCES = multi_write.c
|
||||
get_SOURCES = get.c
|
||||
grib_get_keys_SOURCES = grib_get_keys.c
|
||||
print_data_SOURCES = print_data.c
|
||||
set_SOURCES = set.c
|
||||
set_missing_SOURCES = set_missing.c
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* C Implementation: get
|
||||
* C Implementation: grib_get_keys
|
||||
*
|
||||
* Description: how to get values using keys.
|
||||
* Description: how to get values using keys from GRIB messages
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
|
@ -9,6 +9,5 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
${examples_dir}get > /dev/null
|
||||
|
||||
${examples_dir}grib_get_keys > /dev/null
|
||||
|
|
@ -9,7 +9,7 @@ configure_file( include.ctest.sh.in include.ctest.sh @ONLY )
|
|||
list( APPEND tests
|
||||
index
|
||||
copy_message
|
||||
get
|
||||
grib_get_keys
|
||||
get_data
|
||||
get_pl
|
||||
get_pv
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ @FORCE_32_CFLAGS@
|
||||
|
||||
TESTS = copy_message.sh get.sh get_data.sh get_pl.sh get_pv.sh keys_iterator.sh \
|
||||
TESTS = copy_message.sh grib_get_keys.sh get_data.sh get_pl.sh get_pv.sh keys_iterator.sh \
|
||||
nearest.sh precision.sh multi_write.sh multi.sh print_data.sh set.sh set_bitmap.sh set_missing.sh \
|
||||
set_pv.sh samples.sh count_messages.sh read_message.sh read_from_file.sh index.sh get_set_uuid.sh \
|
||||
bufr_attributes.sh bufr_clone.sh bufr_expanded.sh bufr_get_keys.sh bufr_print_header.sh bufr_print_data.sh bufr_set_keys.sh \
|
||||
bufr_keys_iterator.sh bufr_subset.sh get_product_kind.sh bufr_read_temp.sh
|
||||
|
||||
noinst_PROGRAMS = f_index f_copy_message f_get f_get_data f_get_pl f_get_pv f_keys_iterator \
|
||||
noinst_PROGRAMS = f_index f_copy_message f_grib_get_keys f_get_data f_get_pl f_get_pv f_keys_iterator \
|
||||
f_multi_write f_multi f_nearest f_precision f_print_data f_set f_set_bitmap f_set_missing \
|
||||
f_set_pv f_samples f_count_messages f_read_message f_read_from_file f_new_from_file \
|
||||
f_copy_namespace f_get_set_uuid f_set_gvc f_clone f_bufr_clone f_bufr_expanded f_bufr_get_keys \
|
||||
|
@ -16,7 +16,7 @@ noinst_PROGRAMS = f_index f_copy_message f_get f_get_data f_get_pl f_get_pv f_k
|
|||
|
||||
f_index_SOURCES=index.f90
|
||||
f_copy_message_SOURCES=copy_message.f90
|
||||
f_get_SOURCES=get.f90
|
||||
f_grib_get_keys_SOURCES=grib_get_keys.f90
|
||||
f_get_data_SOURCES=get_data.f90
|
||||
f_get_pl_SOURCES=get_pl.f90
|
||||
f_get_pv_SOURCES=get_pv.f90
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
!
|
||||
!
|
||||
! Description: how to get values using keys.
|
||||
! Description: how to get values using keys from GRIB messages
|
||||
!
|
||||
!
|
||||
program get
|
||||
program grib_get_keys
|
||||
use eccodes
|
||||
implicit none
|
||||
|
||||
|
@ -120,4 +120,4 @@ program get
|
|||
|
||||
call codes_close_file(ifile)
|
||||
|
||||
end program get
|
||||
end program grib_get_keys
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
${examples_dir}f_get > /dev/null
|
||||
${examples_dir}f_grib_get_keys > /dev/null
|
|
@ -27,7 +27,7 @@ endforeach()
|
|||
list( APPEND tests
|
||||
clone
|
||||
count_messages
|
||||
get
|
||||
grib_get_keys
|
||||
index
|
||||
iterator
|
||||
keys_iterator
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if WITH_PYTHON
|
||||
AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@
|
||||
|
||||
TESTS = clone.sh count_messages.sh get.sh index.sh iterator.sh keys_iterator.sh multi_write.sh nearest.sh print_data.sh \
|
||||
TESTS = clone.sh count_messages.sh grib_get_keys.sh index.sh iterator.sh keys_iterator.sh multi_write.sh nearest.sh print_data.sh \
|
||||
samples.sh set.sh set_missing.sh binary_message.sh set_bitmap.sh bufr_print_header.sh bufr_print_data.sh \
|
||||
bufr_clone.sh bufr_get_keys.sh bufr_set_keys.sh bufr_expanded.sh bufr_keys_iterator.sh bufr_subset.sh \
|
||||
bufr_attributes.sh get_product_kind.sh bufr_read_temp.sh
|
||||
|
@ -16,7 +16,7 @@ INCLUDES = -I$(top_builddir)/src
|
|||
LDADD = $(top_builddir)/src/libeccodes.la
|
||||
DEPENDENCIES = $(LDADD)
|
||||
|
||||
EXTRA_DIST = $(TESTS) include.sh clone.py count_messages.py get.py index.py iterator.py keys_iterator.py multi_write.py \
|
||||
EXTRA_DIST = $(TESTS) include.sh clone.py count_messages.py grib_get_keys.py index.py iterator.py keys_iterator.py multi_write.py \
|
||||
nearest.py print_data.py samples.py set.py set_missing.py binary_message.py set_pv.py set_bitmap.py \
|
||||
bufr_print_header.py bufr_print_data.py bufr_clone.py bufr_get_keys.py bufr_set_keys.py \
|
||||
bufr_expanded.py bufr_keys_iterator.py bufr_subset.py bufr_attributes.py \
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
. ./include.sh
|
||||
|
||||
REDIRECT=/dev/null
|
||||
$PYTHON get.py 2> $REDIRECT > $REDIRECT
|
||||
$PYTHON grib_get_keys.py 2> $REDIRECT > $REDIRECT
|
||||
|
||||
# Rerun test with no type check decorator (See GRIB-51)
|
||||
export GRIB_API_PYTHON_NO_TYPE_CHECKS=1
|
||||
$PYTHON get.py 2> $REDIRECT > $REDIRECT
|
||||
$PYTHON grib_get_keys.py 2> $REDIRECT > $REDIRECT
|
|
@ -82,7 +82,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref codes_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90", \ref print_data.f90 "print_data.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90", \ref print_data.f90 "print_data.f90"
|
||||
!>
|
||||
!> @see codes_new_from_file, codes_release, codes_set
|
||||
!>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref codes_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90", \ref print_data.f90 "print_data.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90", \ref print_data.f90 "print_data.f90"
|
||||
!>
|
||||
!> @see codes_new_from_file, codes_release, codes_set
|
||||
!>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref grib_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90", \ref print_data.f90 "print_data.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90", \ref print_data.f90 "print_data.f90"
|
||||
!>
|
||||
!> @see grib_new_from_file, grib_release, grib_set
|
||||
!>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref grib_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90", \ref print_data.f90 "print_data.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90", \ref print_data.f90 "print_data.f90"
|
||||
!>
|
||||
!> @see grib_new_from_file, grib_release, grib_set
|
||||
!>
|
||||
|
|
|
@ -488,7 +488,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref grib_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
|
||||
!>
|
||||
!> @param ifile id of the opened file to be used in all the file functions.
|
||||
!> @param filename name of the file to be open
|
||||
|
@ -1202,7 +1202,7 @@
|
|||
!> If the \em fileid does not refer to an opened file an error code
|
||||
!> is returned in status.\n
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
|
||||
!>
|
||||
!> In case of error, if the status parameter (optional) is not given, the program will
|
||||
!> exit with an error message.\n Otherwise the error message can be
|
||||
|
@ -1249,7 +1249,7 @@
|
|||
!> The message can be accessed through its gribid and it will be available\n
|
||||
!> until @ref grib_release is called.\n
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.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 gribid id of the grib loaded in memory
|
||||
|
@ -1273,7 +1273,7 @@
|
|||
!> The message can be accessed through its gribid and it will be available\n
|
||||
!> until @ref grib_release is called.\n
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.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 gribid id of the grib loaded in memory
|
||||
|
@ -1297,7 +1297,7 @@
|
|||
!> The message can be accessed through its bufrid and it will be available\n
|
||||
!> until @ref codes_release is called.\n
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
|
||||
!>
|
||||
!> @param ifile id of the file opened with @ref codes_open_file
|
||||
!> @param bufrid id of the BUFR loaded in memory
|
||||
|
@ -1432,7 +1432,7 @@
|
|||
!> exit with an error message.\n Otherwise the error message can be
|
||||
!> gathered with @ref grib_get_error_string.
|
||||
!>
|
||||
!> \b Examples: \ref get.f90 "get.f90"
|
||||
!> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90"
|
||||
!>
|
||||
!> @param gribid id of the grib loaded in memory
|
||||
!> @param status GRIB_SUCCESS if OK, integer value on error
|
||||
|
|
|
@ -164,7 +164,7 @@ def gts_new_from_file(fileobj, headers_only = False):
|
|||
Any attempt to retrieve data values keys when in the headers only mode will
|
||||
result in a key not found error.
|
||||
|
||||
\b Examples: \ref get.py "get.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py"
|
||||
|
||||
@param fileobj python file object
|
||||
@param headers_only whether or not to load the message with the headers only
|
||||
|
@ -198,7 +198,7 @@ def any_new_from_file(fileobj, headers_only = False):
|
|||
The message can be accessed through its id and it will be available\n
|
||||
until @ref codes_release is called.\n
|
||||
|
||||
\b Examples: \ref get.py "get.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py"
|
||||
|
||||
@param fileobj python file object
|
||||
@param headers_only whether or not to load the message with the headers only
|
||||
|
@ -229,7 +229,7 @@ def bufr_new_from_file(fileobj, headers_only = False):
|
|||
Any attempt to retrieve data values keys when in the headers only mode will
|
||||
result in a key not found error.
|
||||
|
||||
\b Examples: \ref get.py "get.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py"
|
||||
|
||||
@param fileobj python file object
|
||||
@param headers_only whether or not to load the message with the headers only
|
||||
|
@ -260,7 +260,7 @@ def grib_new_from_file(fileobj, headers_only = False):
|
|||
Any attempt to retrieve data values keys when in the headers only mode will
|
||||
result in a key not found error.
|
||||
|
||||
\b Examples: \ref get.py "get.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py"
|
||||
|
||||
@param fileobj python file object
|
||||
@param headers_only whether or not to load the message with the headers only
|
||||
|
@ -312,7 +312,7 @@ def grib_release(gribid):
|
|||
"""
|
||||
@brief Free the memory for the message referred as gribid.
|
||||
|
||||
\b Examples: \ref get.py "get.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py"
|
||||
|
||||
@param gribid id of the grib loaded in memory
|
||||
@exception GribInternalError
|
||||
|
@ -416,7 +416,7 @@ def grib_get_size(gribid,key):
|
|||
"""
|
||||
@brief Get the size of an array key.
|
||||
|
||||
\b Examples: \ref get.py "get.py",\ref count_messages.py "count_messages.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py",\ref count_messages.py "count_messages.py"
|
||||
|
||||
@param gribid id of the grib loaded in memory
|
||||
@param key name of the key
|
||||
|
@ -1418,7 +1418,7 @@ def grib_get(gribid,key, ktype=None):
|
|||
|
||||
The \em gribid references a grib message loaded in memory.
|
||||
|
||||
\b Examples: \ref get.py "get.py", \ref print_data.py "print_data.py"
|
||||
\b Examples: \ref grib_get_keys.py "grib_get_keys.py", \ref print_data.py "print_data.py"
|
||||
|
||||
@see grib_new_from_file, grib_release, grib_set
|
||||
|
||||
|
|
Loading…
Reference in New Issue