diff --git a/.gitignore b/.gitignore index 4e707a3c2..915e99a94 100644 --- a/.gitignore +++ b/.gitignore @@ -265,7 +265,7 @@ examples/F90/f_get_product_kind examples/F90/f_get_pl examples/F90/f_get_pv examples/F90/f_get_set_uuid -examples/F90/f_index +examples/F90/f_grib_index examples/F90/f_grib_keys_iterator examples/F90/f_grib_multi examples/F90/f_grib_multi_write diff --git a/confluence/examples.par b/confluence/examples.par index 350fbf284..a1dd2bfdc 100644 --- a/confluence/examples.par +++ b/confluence/examples.par @@ -4,7 +4,7 @@ GRIB ( grib_clone grib_ensemble_index grib_get_keys - index + grib_index grib_iterator_bitmap grib_iterator grib_keys_iterator diff --git a/doxygen/examples.dox b/doxygen/examples.dox index 3e6815f3f..f26987f37 100644 --- a/doxygen/examples.dox +++ b/doxygen/examples.dox @@ -11,7 +11,7 @@ defined in a message and how to iterate through them. \example grib_print_data.c grib_print_data.c How to print all the data from a grib message. \example grib_nearest.c grib_nearest.c How to find the nearest grid points. -\example index.f90 How access a grib file through and index. +\example grib_index.f90 How access a grib file through and index. \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. diff --git a/doxygen/grib_examples.dox b/doxygen/grib_examples.dox index e877c390f..10151d3cb 100644 --- a/doxygen/grib_examples.dox +++ b/doxygen/grib_examples.dox @@ -19,7 +19,7 @@ that can be taken as a starting point to write more complex programs.\n - \ref grib_set_pv.py "grib_set_pv.py" How to encode the pv coefficients. \section fortran90 Fortran 90 -- \ref index.f90 "index.f90" how to access a grib file through an index. +- \ref grib_index.f90 "grib_index.f90" how to access a grib file through an index. - \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. diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 74a55360d..a4344722d 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/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 tests - index + grib_index copy_message grib_get_keys get_data diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index 6ab82eecc..1b09a6d20 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -4,11 +4,11 @@ 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 grib_precision.sh grib_multi_write.sh grib_multi.sh grib_print_data.sh grib_set_keys.sh \ grib_set_bitmap.sh set_missing.sh grib_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 \ + read_from_file.sh grib_index.sh get_set_uuid.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_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 \ +noinst_PROGRAMS = f_grib_index f_copy_message f_grib_get_keys f_get_data f_get_pl f_get_pv f_grib_keys_iterator \ f_grib_multi_write f_grib_multi f_grib_nearest f_grib_precision f_grib_print_data f_grib_set_keys \ f_grib_set_bitmap f_set_missing f_grib_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 \ @@ -16,7 +16,7 @@ noinst_PROGRAMS = f_index f_copy_message f_grib_get_keys f_get_data f_get_pl f_ f_bufr_read_synop 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 +f_grib_index_SOURCES=grib_index.f90 f_copy_message_SOURCES=copy_message.f90 f_grib_get_keys_SOURCES=grib_get_keys.f90 f_get_data_SOURCES=get_data.f90 diff --git a/examples/F90/index.f90 b/examples/F90/grib_index.f90 similarity index 98% rename from examples/F90/index.f90 rename to examples/F90/grib_index.f90 index 6295049c2..a09c10cdd 100644 --- a/examples/F90/index.f90 +++ b/examples/F90/grib_index.f90 @@ -7,7 +7,7 @@ ! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. ! ! -! Description: How to create and use and index to access messages from a file. +! Description: How to create and use an index to access GRIB messages from a file. ! Demo also loading and writing an index from a file. ! ! diff --git a/examples/F90/index.sh b/examples/F90/grib_index.sh similarity index 88% rename from examples/F90/index.sh rename to examples/F90/grib_index.sh index a738fda72..972745498 100755 --- a/examples/F90/index.sh +++ b/examples/F90/grib_index.sh @@ -11,11 +11,11 @@ # if an index file does not exist then # create index and save to disk -${examples_dir}f_index > index_f90.out +${examples_dir}f_grib_index > index_f90.out diff index_f90.out ${data_dir}/index_f90.ok # if an index file exists then load the index from it -${examples_dir}f_index > index_f90.out +${examples_dir}f_grib_index > index_f90.out diff index_f90.out ${data_dir}/index_f90.ok rm -f index.idx index_f90.out diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index e37b50484..664faa5d6 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -28,7 +28,7 @@ list( APPEND tests grib_clone count_messages grib_get_keys - index + grib_index grib_iterator grib_keys_iterator grib_multi_write diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index 67ba71756..3e576e5e0 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -1,7 +1,7 @@ if WITH_PYTHON AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ -TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh index.sh grib_iterator.sh \ +TESTS = grib_clone.sh count_messages.sh grib_get_keys.sh grib_index.sh grib_iterator.sh \ grib_keys_iterator.sh grib_multi_write.sh grib_nearest.sh grib_print_data.sh \ samples.sh grib_set_keys.sh set_missing.sh binary_message.sh grib_set_bitmap.sh \ bufr_read_header.sh bufr_read_synop.sh bufr_clone.sh bufr_get_keys.sh \ @@ -18,7 +18,7 @@ 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 \ +EXTRA_DIST = $(TESTS) include.sh grib_clone.py count_messages.py grib_get_keys.py grib_index.py \ grib_iterator.py grib_keys_iterator.py grib_multi_write.py \ grib_nearest.py grib_print_data.py samples.py grib_set_keys.py \ set_missing.py binary_message.py grib_set_pv.py grib_set_bitmap.py \ diff --git a/examples/python/index.py b/examples/python/grib_index.py similarity index 100% rename from examples/python/index.py rename to examples/python/grib_index.py diff --git a/examples/python/index.sh b/examples/python/grib_index.sh similarity index 57% rename from examples/python/index.sh rename to examples/python/grib_index.sh index 148554633..c28d0805a 100755 --- a/examples/python/index.sh +++ b/examples/python/grib_index.sh @@ -3,5 +3,5 @@ . ./include.sh REDIRECT=/dev/null -$PYTHON index.py 2> $REDIRECT > $REDIRECT +$PYTHON grib_index.py 2> $REDIRECT > $REDIRECT rm my.idx || true diff --git a/fortran/grib_f90_int.f90 b/fortran/grib_f90_int.f90 index 160ac10e7..cf69beca4 100644 --- a/fortran/grib_f90_int.f90 +++ b/fortran/grib_f90_int.f90 @@ -14,7 +14,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -33,7 +33,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for which the number of values is computed @@ -50,7 +50,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected diff --git a/fortran/grib_f90_long_int.f90 b/fortran/grib_f90_long_int.f90 index b9d1a48df..1544b9d56 100644 --- a/fortran/grib_f90_long_int.f90 +++ b/fortran/grib_f90_long_int.f90 @@ -14,7 +14,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -34,7 +34,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for which the number of values is computed @@ -52,7 +52,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected diff --git a/fortran/grib_f90_tail.f90 b/fortran/grib_f90_tail.f90 index bc132cad1..247ea8005 100644 --- a/fortran/grib_f90_tail.f90 +++ b/fortran/grib_f90_tail.f90 @@ -39,7 +39,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "index.f90" + !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> !> @param indexid id of the newly created index !> @param filename name of the file of messages to be indexed @@ -67,7 +67,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 filename name of the file I want to add to the index @@ -93,7 +93,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for which the number of values is computed @@ -121,7 +121,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for which the number of values is computed @@ -149,7 +149,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -179,7 +179,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -209,7 +209,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -241,7 +241,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key for wich the values are returned @@ -273,7 +273,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected @@ -301,7 +301,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected @@ -329,7 +329,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected @@ -357,7 +357,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "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 key key to be selected @@ -385,7 +385,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 index.f90 "index.f90" + !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> !> @param indexid id of an index created from a file. !> @param gribid id of the grib loaded in memory @@ -411,7 +411,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "index.f90" + !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> !> @param indexid id of loaded index !> @param filename name of the index file to load @@ -439,7 +439,7 @@ !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> \b Examples: \ref index.f90 "index.f90" + !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> !> @param indexid id of the index to save to file !> @param filename name of file to save the index to diff --git a/python/gribapi.py b/python/gribapi.py index 0f9d0e6af..fc06f5333 100644 --- a/python/gribapi.py +++ b/python/gribapi.py @@ -929,7 +929,7 @@ def grib_index_new_from_file(filename, keys): """ @brief Create a new index from a file. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param filename path of the file to index on @param keys sequence of keys to index on @@ -946,7 +946,7 @@ def grib_index_add_file(indexid, filename): """ @brief Add a file to an index. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of the index to add the file to @param filename path of the file to be added to index @@ -960,7 +960,7 @@ def grib_index_release(indexid): """ @brief Delete an index. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. @exception GribInternalError @@ -972,7 +972,7 @@ def grib_index_get_size(indexid,key): """ @brief Get the number of distinct values for the index key. The key must belong to the index. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created on the given key. @param key key for which the number of values is computed @@ -990,7 +990,7 @@ def grib_index_get_long(indexid,key): 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. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @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 @@ -1019,7 +1019,7 @@ def grib_index_get_string(indexid,key): This function is used when the type of the key was explicitly defined as string or when the native type of the key is string. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @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 @@ -1050,7 +1050,7 @@ def grib_index_get_double(iid,key): This function is used when the type of the key was explicitly defined as double or when the native type of the key is double. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @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 @@ -1080,7 +1080,7 @@ def grib_index_select_long(indexid,key,val): The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created with the key in argument. @param key key to be selected @@ -1096,7 +1096,7 @@ def grib_index_select_double(iid,key,val): The key must have been created with integer type or have integer as native type if the type was not explicitly defined in the index creation. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created with the key in argument. @param key key to be selected @@ -1116,7 +1116,7 @@ def grib_index_select_string(indexid,key,val): exit with an error message.\n Otherwise the error message can be gathered with @ref grib_get_error_string. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created with the key in argument. @param key key to be selected @@ -1134,7 +1134,7 @@ def grib_new_from_index(indexid): The message can be accessed through its gribid and it will be available until @ref grib_release is called. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. @return id of the grib loaded in memory or None if end of index @@ -1567,7 +1567,7 @@ def grib_index_get(indexid,key, ktype=str): """ @brief Get the distinct values of an index key. The key must belong to the index. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created on the given key. @param key key for which the values are returned @@ -1596,7 +1596,7 @@ def grib_index_select(indexid,key,value): """ @brief Select the message subset with key==value. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of an index created from a file. The index must have been created with the key in argument. @param key key to be selected @@ -1619,7 +1619,7 @@ def grib_index_write(indexid, filename): An index can be loaded back from an index file with \ref grib_index_read. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param indexid id of the index @param filename path of file to save the index to @@ -1632,7 +1632,7 @@ def grib_index_read(filename): """ @brief Loads an index previously saved with \ref grib_index_write to a file. - \b Examples: \ref index.py "index.py" + \b Examples: \ref grib_index.py "grib_index.py" @param filename path of file to load the index from @return id of the loaded index