From 81011ca5a10cc54c05ccf508c590986796f583fb Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 17 Mar 2015 16:17:33 +0000 Subject: [PATCH 1/3] ECC-86: Rename all grib related API examples (Part 10) --- .gitignore | 4 ++-- confluence/examples.par | 2 +- doxygen/examples.dox | 2 +- doxygen/grib_examples.dox | 2 +- examples/C/CMakeLists.txt | 2 +- examples/C/Makefile.am | 4 ++-- examples/C/{set_bitmap.c => grib_set_bitmap.c} | 4 ++-- examples/F90/CMakeLists.txt | 2 +- examples/F90/Makefile.am | 13 +++++++------ .../F90/{set_bitmap.f90 => grib_set_bitmap.f90} | 0 examples/F90/{set_bitmap.sh => grib_set_bitmap.sh} | 2 +- examples/python/CMakeLists.txt | 2 +- examples/python/Makefile.am | 12 +++++++----- .../python/{set_bitmap.py => grib_set_bitmap.py} | 0 .../python/{set_bitmap.sh => grib_set_bitmap.sh} | 2 +- 15 files changed, 28 insertions(+), 25 deletions(-) rename examples/C/{set_bitmap.c => grib_set_bitmap.c} (95%) rename examples/F90/{set_bitmap.f90 => grib_set_bitmap.f90} (100%) rename examples/F90/{set_bitmap.sh => grib_set_bitmap.sh} (90%) rename examples/python/{set_bitmap.py => grib_set_bitmap.py} (100%) rename examples/python/{set_bitmap.sh => grib_set_bitmap.sh} (57%) diff --git a/.gitignore b/.gitignore index e50e14d2b..368998dbc 100644 --- a/.gitignore +++ b/.gitignore @@ -113,7 +113,7 @@ examples/C/precision examples/C/grib_print_data examples/C/sections_copy examples/C/grib_set_keys -examples/C/set_bitmap +examples/C/grib_set_bitmap examples/C/set_data examples/C/set_missing examples/C/set_pv @@ -278,7 +278,7 @@ examples/F90/f_read_from_file examples/F90/f_read_message examples/F90/f_samples examples/F90/f_grib_set_keys -examples/F90/f_set_bitmap +examples/F90/f_grib_set_bitmap examples/F90/f_set_gvc examples/F90/f_set_missing examples/F90/f_set_pv diff --git a/confluence/examples.par b/confluence/examples.par index 8951d5ef1..68060cd0e 100644 --- a/confluence/examples.par +++ b/confluence/examples.par @@ -13,7 +13,7 @@ GRIB ( grib_nearest precision grib_print_data - set_bitmap + grib_set_bitmap set_data set_pv grib_set_keys diff --git a/doxygen/examples.dox b/doxygen/examples.dox index 19b0306cc..2ef16a595 100644 --- a/doxygen/examples.dox +++ b/doxygen/examples.dox @@ -18,7 +18,7 @@ defined in a message and how to iterate through them. \example get_pv.f90 How to get the list of levels. \example get_data.f90 How to get latitude/longitude/values. \example set.f90 How to set values through the key names. -\example set_bitmap.f90 How to set and use a bitmap. +\example grib_set_bitmap.f90 How to set and use a bitmap. \example set_missing.f90 How to set a missing value in the header. \example set_pv.f90 How to set the list of levels. \example samples.f90 How to create a new message from a samples. diff --git a/doxygen/grib_examples.dox b/doxygen/grib_examples.dox index c17380947..3486969f9 100644 --- a/doxygen/grib_examples.dox +++ b/doxygen/grib_examples.dox @@ -26,7 +26,7 @@ that can be taken as a starting point to write more complex programs.\n - \ref get_pv.f90 "get_pv.f90" how to get the list of levels. - \ref get_data.f90 "get_data.f90" how to get latitude/longitude/values. - \ref set.f90 "set.f90" how to set values through the key names. -- \ref set_bitmap.f90 "set_bitmap.f90" how to set and use a bitmap. +- \ref grib_set_bitmap.f90 "grib_set_bitmap.f90" how to set and use a bitmap. - \ref set_missing.f90 "set_missing.f90" how to set a missing value in the header. - \ref set_pv.f90 "set_pv.f90" how to set the list of levels. - \ref samples.f90 "samples.f90" how to create a new message from a template. diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index 406732fb0..6dc93b15d 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -8,7 +8,7 @@ configure_file( include.ctest.sh.in include.ctest.sh @ONLY ) ################################################ list( APPEND test_bins grib_nearest - set_bitmap + grib_set_bitmap grib_iterator grib_get_keys grib_print_data diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am index c90ea4fe9..60c66a6d0 100644 --- a/examples/C/Makefile.am +++ b/examples/C/Makefile.am @@ -10,7 +10,7 @@ TESTS = grib_iterator.sh grib_get_keys.sh grib_print_data.sh grib_set_keys.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 = grib_nearest set_bitmap grib_iterator grib_get_keys grib_print_data grib_set_keys set_missing grib_keys_iterator \ +noinst_PROGRAMS = grib_nearest grib_set_bitmap grib_iterator grib_get_keys grib_print_data grib_set_keys 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 \ @@ -30,7 +30,7 @@ grib_get_keys_SOURCES = grib_get_keys.c grib_print_data_SOURCES = grib_print_data.c grib_set_keys_SOURCES = grib_set_keys.c set_missing_SOURCES = set_missing.c -set_bitmap_SOURCES = set_bitmap.c +grib_set_bitmap_SOURCES = grib_set_bitmap.c multi_SOURCES = multi.c multi2_SOURCES = multi2.c grib_keys_iterator_SOURCES = grib_keys_iterator.c diff --git a/examples/C/set_bitmap.c b/examples/C/grib_set_bitmap.c similarity index 95% rename from examples/C/set_bitmap.c rename to examples/C/grib_set_bitmap.c index 030ece8bc..3ad6255ea 100644 --- a/examples/C/set_bitmap.c +++ b/examples/C/grib_set_bitmap.c @@ -9,9 +9,9 @@ */ /* - * C Implementation: set_bitmap + * C Implementation: grib_set_bitmap * - * Description: how to set a bitmap in a grib message + * Description: how to set a bitmap in a GRIB message * * */ diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 9e0da9278..10ec0b3c2 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -20,7 +20,7 @@ list( APPEND tests precision grib_print_data grib_set_keys - set_bitmap + grib_set_bitmap set_missing set_pv samples diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index 77540cf49..c820f40de 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -3,16 +3,17 @@ 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 grib_keys_iterator.sh \ grib_nearest.sh precision.sh multi_write.sh multi.sh grib_print_data.sh grib_set_keys.sh \ - set_bitmap.sh set_missing.sh set_pv.sh samples.sh count_messages.sh read_message.sh \ + grib_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_grib_keys_iterator \ - f_multi_write f_multi f_grib_nearest f_precision f_grib_print_data f_grib_set_keys 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 \ - f_bufr_print_header f_bufr_print_data f_bufr_set_keys f_bufr_keys_iterator f_bufr_subset f_bufr_attributes \ + f_multi_write f_multi f_grib_nearest f_precision f_grib_print_data f_grib_set_keys \ + f_grib_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 f_bufr_print_header \ + f_bufr_print_data f_bufr_set_keys f_bufr_keys_iterator f_bufr_subset f_bufr_attributes \ f_get_product_kind f_bufr_read_temp f_index_SOURCES=index.f90 @@ -28,7 +29,7 @@ f_grib_nearest_SOURCES=grib_nearest.f90 f_precision_SOURCES=precision.f90 f_grib_print_data_SOURCES=grib_print_data.f90 f_grib_set_keys_SOURCES=grib_set_keys.f90 -f_set_bitmap_SOURCES=set_bitmap.f90 +f_grib_set_bitmap_SOURCES=grib_set_bitmap.f90 f_set_missing_SOURCES=set_missing.f90 f_set_pv_SOURCES=set_pv.f90 f_samples_SOURCES=samples.f90 diff --git a/examples/F90/set_bitmap.f90 b/examples/F90/grib_set_bitmap.f90 similarity index 100% rename from examples/F90/set_bitmap.f90 rename to examples/F90/grib_set_bitmap.f90 diff --git a/examples/F90/set_bitmap.sh b/examples/F90/grib_set_bitmap.sh similarity index 90% rename from examples/F90/set_bitmap.sh rename to examples/F90/grib_set_bitmap.sh index 5409aa45c..86e4b383f 100755 --- a/examples/F90/set_bitmap.sh +++ b/examples/F90/grib_set_bitmap.sh @@ -8,5 +8,5 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. . ./include.sh -${examples_dir}f_set_bitmap > /dev/null +${examples_dir}f_grib_set_bitmap > /dev/null rm -f out.bmp.grib diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index 9efaa08b7..d10ad3d35 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -38,7 +38,7 @@ list( APPEND tests grib_set_keys set_missing binary_message - set_bitmap + grib_set_bitmap bufr_attributes bufr_clone bufr_expanded diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index 425da7049..2d6cd781b 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -3,7 +3,7 @@ AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh index.sh grib_iterator.sh \ grib_keys_iterator.sh multi_write.sh grib_nearest.sh grib_print_data.sh \ - samples.sh grib_set_keys.sh set_missing.sh binary_message.sh set_bitmap.sh \ + samples.sh grib_set_keys.sh set_missing.sh binary_message.sh grib_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 @@ -18,10 +18,12 @@ INCLUDES = -I$(top_builddir)/src 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 \ - grib_keys_iterator.py multi_write.py \ - grib_nearest.py grib_print_data.py samples.py grib_set_keys.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 \ +EXTRA_DIST = $(TESTS) include.sh grib_clone.py count_messages.py grib_get_keys.py index.py \ + grib_iterator.py grib_keys_iterator.py multi_write.py \ + grib_nearest.py grib_print_data.py samples.py grib_set_keys.py \ + set_missing.py binary_message.py set_pv.py grib_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 \ get_product_kind.py bufr_read_temp.py \ CMakeLists.txt include.ctest.sh.in diff --git a/examples/python/set_bitmap.py b/examples/python/grib_set_bitmap.py similarity index 100% rename from examples/python/set_bitmap.py rename to examples/python/grib_set_bitmap.py diff --git a/examples/python/set_bitmap.sh b/examples/python/grib_set_bitmap.sh similarity index 57% rename from examples/python/set_bitmap.sh rename to examples/python/grib_set_bitmap.sh index 21ea4158b..40f4cda8d 100755 --- a/examples/python/set_bitmap.sh +++ b/examples/python/grib_set_bitmap.sh @@ -3,5 +3,5 @@ . ./include.sh REDIRECT=/dev/null -$PYTHON set_bitmap.py 2> $REDIRECT > $REDIRECT +$PYTHON grib_set_bitmap.py 2> $REDIRECT > $REDIRECT rm out.bmp.grib || true From 50cb0c5f520c1b25130ba09595e706410a10afde Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 17 Mar 2015 16:26:03 +0000 Subject: [PATCH 2/3] ECC-86: Rename all grib related API examples (Part 11) --- .gitignore | 2 +- confluence/examples.par | 2 +- examples/C/CMakeLists.txt | 2 +- examples/C/Makefile.am | 4 ++-- examples/C/{set_data.c => grib_set_data.c} | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename examples/C/{set_data.c => grib_set_data.c} (98%) diff --git a/.gitignore b/.gitignore index 368998dbc..daa423280 100644 --- a/.gitignore +++ b/.gitignore @@ -114,7 +114,7 @@ examples/C/grib_print_data examples/C/sections_copy examples/C/grib_set_keys examples/C/grib_set_bitmap -examples/C/set_data +examples/C/grib_set_data examples/C/set_missing examples/C/set_pv examples/C/values_check diff --git a/confluence/examples.par b/confluence/examples.par index 68060cd0e..4ee11b0c4 100644 --- a/confluence/examples.par +++ b/confluence/examples.par @@ -14,7 +14,7 @@ GRIB ( precision grib_print_data grib_set_bitmap - set_data + grib_set_data set_pv grib_set_keys ) diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index 6dc93b15d..fd4dec8ac 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -15,7 +15,7 @@ list( APPEND test_bins grib_set_keys set_missing grib_keys_iterator - set_data + grib_set_data mars_param values_check box diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am index 60c66a6d0..07a5a8f94 100644 --- a/examples/C/Makefile.am +++ b/examples/C/Makefile.am @@ -11,7 +11,7 @@ TESTS = grib_iterator.sh grib_get_keys.sh grib_print_data.sh grib_set_keys.sh \ bufr_read_temp.sh get_product_kind.sh noinst_PROGRAMS = grib_nearest grib_set_bitmap grib_iterator grib_get_keys grib_print_data grib_set_keys set_missing grib_keys_iterator \ - set_data mars_param values_check box multi multi2 multi_write precision \ + grib_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 \ bufr_attributes bufr_clone bufr_expanded bufr_get_keys bufr_read_header bufr_read_synop \ @@ -21,7 +21,7 @@ noinst_PROGRAMS = grib_nearest grib_set_bitmap grib_iterator grib_get_keys grib #bin_PROGRAMS = points box_SOURCES = box.c -set_data_SOURCES = set_data.c +grib_set_data_SOURCES = grib_set_data.c mars_param_SOURCES = mars_param.c values_check_SOURCES = values_check.c grib_nearest_SOURCES = grib_nearest.c diff --git a/examples/C/set_data.c b/examples/C/grib_set_data.c similarity index 98% rename from examples/C/set_data.c rename to examples/C/grib_set_data.c index f4b1213e1..15dff712e 100644 --- a/examples/C/set_data.c +++ b/examples/C/grib_set_data.c @@ -9,7 +9,7 @@ */ /* - * C Implementation: set_data + * C Implementation: grib_set_data * * Description: set the data contained in a GRIB file * From 9e742ccadd8556f74d45237dba858e2e24e1c9e3 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 17 Mar 2015 16:48:41 +0000 Subject: [PATCH 3/3] Fix conflicts --- examples/python/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index 340da7c80..a6bd36738 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -18,7 +18,6 @@ INCLUDES = -I$(top_builddir)/src LDADD = $(top_builddir)/src/libeccodes.la DEPENDENCIES = $(LDADD) -<<<<<<< HEAD EXTRA_DIST = $(TESTS) include.sh grib_clone.py count_messages.py grib_get_keys.py index.py \ grib_iterator.py grib_keys_iterator.py multi_write.py \ grib_nearest.py grib_print_data.py samples.py grib_set_keys.py \