From dc1a3d85d2c1a6fb92ac381b35008e496f1749f6 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 17 Mar 2015 15:01:07 +0000 Subject: [PATCH] ECC-86: Rename all grib related API examples (Part 6) --- .gitignore | 4 ++-- confluence/examples.par | 2 +- doxygen/examples.dox | 6 +++--- doxygen/grib_examples.dox | 6 +++--- examples/C/CMakeLists.txt | 4 ++-- examples/C/Makefile.am | 6 +++--- examples/C/{keys_iterator.c => grib_keys_iterator.c} | 4 ++-- .../C/{keys_iterator.sh => grib_keys_iterator.sh} | 4 ++-- examples/F90/CMakeLists.txt | 2 +- examples/F90/Makefile.am | 6 +++--- .../{keys_iterator.f90 => grib_keys_iterator.f90} | 0 .../F90/{keys_iterator.sh => grib_keys_iterator.sh} | 2 +- examples/python/CMakeLists.txt | 4 ++-- examples/python/Makefile.am | 9 +++++---- .../python/{keys_iterator.c => grib_keys_iterator.c} | 5 ++--- .../{keys_iterator.py => grib_keys_iterator.py} | 0 examples/python/grib_keys_iterator.sh | 12 ++++++++++++ examples/python/keys_iterator.sh | 12 ------------ python/gribapi.py | 6 +++--- 19 files changed, 47 insertions(+), 47 deletions(-) rename examples/C/{keys_iterator.c => grib_keys_iterator.c} (97%) rename examples/C/{keys_iterator.sh => grib_keys_iterator.sh} (69%) rename examples/F90/{keys_iterator.f90 => grib_keys_iterator.f90} (100%) rename examples/F90/{keys_iterator.sh => grib_keys_iterator.sh} (89%) rename examples/python/{keys_iterator.c => grib_keys_iterator.c} (97%) rename examples/python/{keys_iterator.py => grib_keys_iterator.py} (100%) create mode 100755 examples/python/grib_keys_iterator.sh delete mode 100755 examples/python/keys_iterator.sh diff --git a/.gitignore b/.gitignore index aa2dee53e..b1e0b31c7 100644 --- a/.gitignore +++ b/.gitignore @@ -100,7 +100,7 @@ examples/C/grib_get_keys examples/C/get_data examples/C/get_product_kind examples/C/grib_iterator -examples/C/keys_iterator +examples/C/grib_keys_iterator examples/C/large_grib1 examples/C/list examples/C/mars_param @@ -267,7 +267,7 @@ examples/F90/f_get_pl examples/F90/f_get_pv examples/F90/f_get_set_uuid examples/F90/f_index -examples/F90/f_keys_iterator +examples/F90/f_grib_keys_iterator examples/F90/f_multi examples/F90/f_multi_write examples/F90/f_nearest diff --git a/confluence/examples.par b/confluence/examples.par index 6471734e6..c2aef929f 100644 --- a/confluence/examples.par +++ b/confluence/examples.par @@ -7,7 +7,7 @@ GRIB ( index grib_iterator_bitmap grib_iterator - keys_iterator + grib_keys_iterator multi_write multi nearest diff --git a/doxygen/examples.dox b/doxygen/examples.dox index 4f7312ee5..192c5fd3c 100644 --- a/doxygen/examples.dox +++ b/doxygen/examples.dox @@ -2,7 +2,7 @@ \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 +\example grib_keys_iterator.c grib_keys_iterator.c How to get the names of all the keys defined in a message and how to iterate through them. \example grib_iterator.c grib_iterator.c How to use an iterator on latitude, longitude, values. \example precision.c precision.c How to control precision when coding a grib field. @@ -24,7 +24,7 @@ defined in a message and how to iterate through them. \example samples.f90 How to create a new message from a samples. \example grib_clone.f90 How to clone a message. \example copy_message.f90 How to copy a message in memory and create a new message. -\example keys_iterator.f90 How to get the names of all the keys +\example grib_keys_iterator.f90 How to get the names of all the keys defined in a message and how to iterate through them. \example precision.f90 How to control precision when coding a grib field. \example multi_write.f90 How to encode a grib message containing many fields. @@ -51,7 +51,7 @@ defined in a message and how to iterate through them. \example samples.py How to create a new message from a sample. \example grib_clone.py How to clone a message. \example grib_iterator.py How to use an iterator on latitude, longitude, values. -\example keys_iterator.py How to get the names of all the keys. +\example grib_keys_iterator.py How to get the names of all the keys. \example multi_write.py How to encode a multi grib message. \example set_pv.py How to encode the pv coefficients. diff --git a/doxygen/grib_examples.dox b/doxygen/grib_examples.dox index a972c36f9..22f8468dc 100644 --- a/doxygen/grib_examples.dox +++ b/doxygen/grib_examples.dox @@ -14,7 +14,7 @@ that can be taken as a starting point to write more complex programs.\n - \ref samples.py "samples.py" How to create a new message from a sample. - \ref grib_clone.py "grib_clone.py" How to clone a message. - \ref grib_iterator.py "grib_iterator.py" How to use an iterator on latitude, longitude, values. -- \ref keys_iterator.py "keys_iterator.py" How to get the names of all the keys. +- \ref grib_keys_iterator.py "grib_keys_iterator.py" How to get the names of all the keys. - \ref multi_write.py "multi_write.py" How to encode a multi grib message. - \ref set_pv.py "set_pv.py" How to encode the pv coefficients. @@ -32,7 +32,7 @@ that can be taken as a starting point to write more complex programs.\n - \ref samples.f90 "samples.f90" how to create a new message from a template. - \ref grib_clone.f90 "grib_clone.f90" how to clone a message. - \ref copy_message.f90 "copy_message.f90" how to copy a message in memory and create a new message. -- \ref keys_iterator.f90 "keys_iterator.f90" how to get the names of all the keys +- \ref grib_keys_iterator.f90 "grib_keys_iterator.f90" how to get the names of all the keys defined in a message and how to iterate through them. - \ref precision.f90 "precision.f90" how to control precision when coding a grib field. - \ref multi_write.f90 "multi_write.f90" how to encode a grib message containing many fields. @@ -43,7 +43,7 @@ defined in a message and how to iterate through them. \section C - \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 +- \ref grib_keys_iterator.c "grib_keys_iterator.c" explains how to get the names of all the keys defined in a message and how to iterate through them. - \ref grib_iterator.c "grib_iterator.c" shows how to use an iterator on latitude, longitude, values. - \ref precision.c "precision.c" illustrates how to control precision when coding a grib field. diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index a5f5a1a36..7be464bc3 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -14,7 +14,7 @@ list( APPEND test_bins print_data set set_missing - keys_iterator + grib_keys_iterator set_data mars_param values_check @@ -60,7 +60,7 @@ list( APPEND tests grib_get_keys print_data set - keys_iterator + grib_keys_iterator multi multi_write precision diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am index c6870e419..55fbafaa2 100644 --- a/examples/C/Makefile.am +++ b/examples/C/Makefile.am @@ -1,14 +1,14 @@ AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ -TESTS = grib_iterator.sh grib_get_keys.sh print_data.sh set.sh keys_iterator.sh multi.sh multi_write.sh \ +TESTS = grib_iterator.sh grib_get_keys.sh print_data.sh set.sh grib_keys_iterator.sh multi.sh multi_write.sh \ precision.sh list.sh large_grib1.sh get_data.sh sections_copy.sh set_missing.sh grib_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 grib_iterator grib_get_keys print_data set set_missing keys_iterator \ +noinst_PROGRAMS = nearest set_bitmap grib_iterator grib_get_keys print_data set set_missing grib_keys_iterator \ set_data mars_param values_check box multi multi2 multi_write precision \ set_pv list sections_copy large_grib1 get_data grib_iterator_bitmap grib_clone new_sample \ check_gaussian_grid grib_ensemble_index points \ @@ -31,7 +31,7 @@ set_missing_SOURCES = set_missing.c set_bitmap_SOURCES = set_bitmap.c multi_SOURCES = multi.c multi2_SOURCES = multi2.c -keys_iterator_SOURCES = keys_iterator.c +grib_keys_iterator_SOURCES = grib_keys_iterator.c grib_iterator_SOURCES = grib_iterator.c grib_iterator_bitmap_SOURCES = grib_iterator_bitmap.c set_pv_SOURCES = set_pv.c diff --git a/examples/C/keys_iterator.c b/examples/C/grib_keys_iterator.c similarity index 97% rename from examples/C/keys_iterator.c rename to examples/C/grib_keys_iterator.c index a97525036..2c8398467 100644 --- a/examples/C/keys_iterator.c +++ b/examples/C/grib_keys_iterator.c @@ -9,12 +9,12 @@ */ /* - * C Implementation: keys_iterator + * C Implementation: grib_keys_iterator * * Description: * Example on how to use keys_iterator functions and the * codes_keys_iterator structure to get all the available - * keys in a message. + * keys in a GRIB message. * */ diff --git a/examples/C/keys_iterator.sh b/examples/C/grib_keys_iterator.sh similarity index 69% rename from examples/C/keys_iterator.sh rename to examples/C/grib_keys_iterator.sh index 161cfa32b..01cca8a60 100755 --- a/examples/C/keys_iterator.sh +++ b/examples/C/grib_keys_iterator.sh @@ -9,7 +9,7 @@ . ./include.sh -${examples_dir}keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null +${examples_dir}grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null -${examples_dir}keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null +${examples_dir}grib_keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 5ea3af93e..e580b1e8d 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -13,7 +13,7 @@ list( APPEND tests get_data get_pl get_pv - keys_iterator + grib_keys_iterator multi_write multi nearest diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index 99d71c744..ec0e389d7 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -1,13 +1,13 @@ AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ @FORCE_32_CFLAGS@ -TESTS = copy_message.sh grib_get_keys.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 grib_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_grib_get_keys 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_grib_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_grib_clone f_bufr_clone f_bufr_expanded f_bufr_get_keys \ @@ -20,7 +20,7 @@ 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 -f_keys_iterator_SOURCES=keys_iterator.f90 +f_grib_keys_iterator_SOURCES=grib_keys_iterator.f90 f_multi_write_SOURCES=multi_write.f90 f_multi_SOURCES=multi.f90 f_nearest_SOURCES=nearest.f90 diff --git a/examples/F90/keys_iterator.f90 b/examples/F90/grib_keys_iterator.f90 similarity index 100% rename from examples/F90/keys_iterator.f90 rename to examples/F90/grib_keys_iterator.f90 diff --git a/examples/F90/keys_iterator.sh b/examples/F90/grib_keys_iterator.sh similarity index 89% rename from examples/F90/keys_iterator.sh rename to examples/F90/grib_keys_iterator.sh index bf78daae8..19137e8fc 100755 --- a/examples/F90/keys_iterator.sh +++ b/examples/F90/grib_keys_iterator.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}f_keys_iterator > /dev/null +${examples_dir}f_grib_keys_iterator > /dev/null diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index a6b65f3c1..7ca9e4933 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -7,7 +7,7 @@ configure_file( include.ctest.sh.in include.ctest.sh @ONLY ) # Build the executables used by test scripts ################################################ list( APPEND test_bins - keys_iterator + grib_keys_iterator print_data grib_iterator count_messages @@ -30,7 +30,7 @@ list( APPEND tests grib_get_keys index grib_iterator - keys_iterator + grib_keys_iterator multi_write nearest print_data diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index f208d56d3..050352c03 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -1,14 +1,15 @@ if WITH_PYTHON AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ -TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh index.sh grib_iterator.sh keys_iterator.sh multi_write.sh nearest.sh print_data.sh \ +TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh index.sh grib_iterator.sh grib_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 TESTS_ENVIRONMENT = TOPBUILDDIR=$(top_builddir) PYTHON=$(PYTHON) -noinst_PROGRAMS = p_keys_iterator p_print_data p_grib_iterator p_count_messages -p_keys_iterator_SOURCES = keys_iterator.c +noinst_PROGRAMS = p_grib_keys_iterator p_print_data p_grib_iterator p_count_messages +p_grib_keys_iterator_SOURCES = grib_keys_iterator.c p_print_data_SOURCES = print_data.c p_grib_iterator_SOURCES = grib_iterator.c p_count_messages_SOURCES = count_messages.c @@ -17,7 +18,7 @@ LDADD = $(top_builddir)/src/libeccodes.la DEPENDENCIES = $(LDADD) EXTRA_DIST = $(TESTS) include.sh grib_clone.py count_messages.py grib_get_keys.py index.py grib_iterator.py \ - keys_iterator.py multi_write.py \ + grib_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 \ diff --git a/examples/python/keys_iterator.c b/examples/python/grib_keys_iterator.c similarity index 97% rename from examples/python/keys_iterator.c rename to examples/python/grib_keys_iterator.c index 97c73d9df..102076681 100644 --- a/examples/python/keys_iterator.c +++ b/examples/python/grib_keys_iterator.c @@ -9,13 +9,12 @@ */ /* - * C Implementation: keys_iterator + * C Implementation: grib_keys_iterator * * Description: * Example on how to use keys_iterator functions and the * grib_keys_iterator structure to get all the available - * keys in a message. - * + * keys in a GRIB message. * * */ diff --git a/examples/python/keys_iterator.py b/examples/python/grib_keys_iterator.py similarity index 100% rename from examples/python/keys_iterator.py rename to examples/python/grib_keys_iterator.py diff --git a/examples/python/grib_keys_iterator.sh b/examples/python/grib_keys_iterator.sh new file mode 100755 index 000000000..99b3b4c13 --- /dev/null +++ b/examples/python/grib_keys_iterator.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. ./include.sh + +TEMP1=temp1.$$ +TEMP2=temp2.$$ + +$PYTHON grib_keys_iterator.py 2> $TEMP1 > $TEMP1 +./p_grib_keys_iterator ../../data/reduced_latlon_surface.grib1 2> $TEMP2 > $TEMP2 + +diff $TEMP1 $TEMP2 +rm $TEMP1 $TEMP2 || true diff --git a/examples/python/keys_iterator.sh b/examples/python/keys_iterator.sh deleted file mode 100755 index 1c57f2adc..000000000 --- a/examples/python/keys_iterator.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -. ./include.sh - -TEMP1=temp1.$$ -TEMP2=temp2.$$ - -$PYTHON keys_iterator.py 2> $TEMP1 > $TEMP1 -./p_keys_iterator ../../data/reduced_latlon_surface.grib1 2> $TEMP2 > $TEMP2 - -diff $TEMP1 $TEMP2 -rm $TEMP1 $TEMP2 || true diff --git a/python/gribapi.py b/python/gribapi.py index c53cbab07..9071bce9d 100644 --- a/python/gribapi.py +++ b/python/gribapi.py @@ -599,7 +599,7 @@ def grib_keys_iterator_next(iterid): """ @brief Advance to the next keys iterator value. - \b Examples: \ref keys_iterator.py "keys_iterator.py" + \b Examples: \ref grib_keys_iterator.py "grib_keys_iterator.py" @param iterid keys iterator id created with @ref grib_keys_iterator_new @exception GribInternalError @@ -614,7 +614,7 @@ def grib_keys_iterator_delete(iterid): """ @brief Delete a keys iterator and free memory. - \b Examples: \ref keys_iterator.py "keys_iterator.py" + \b Examples: \ref grib_keys_iterator.py "grib_keys_iterator.py" @param iterid keys iterator id created with @ref grib_keys_iterator_new @exception GribInternalError @@ -626,7 +626,7 @@ def grib_keys_iterator_get_name(iterid): """ @brief Get the name of a key from a keys iterator. - \b Examples: \ref keys_iterator.py "keys_iterator.py" + \b Examples: \ref grib_keys_iterator.py "grib_keys_iterator.py" @param iterid keys iterator id created with @ref grib_keys_iterator_new @return key name to be retrieved