diff --git a/doxygen/examples.dox b/doxygen/examples.dox index b9a77731d..1db8822af 100644 --- a/doxygen/examples.dox +++ b/doxygen/examples.dox @@ -46,9 +46,9 @@ defined in a message and how to iterate through them. \example grib_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 grib_nearest.py How to find the nearest grid points. -\example set_missing.py How to set a missing value in the header. +\example grib_set_missing.py How to set a missing value in the GRIB header. \example count_messages.py How to count the messages in a file and loop through them. -\example samples.py How to create a new message from a sample. +\example grib_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 grib_keys_iterator.py How to get the names of all the keys. diff --git a/doxygen/grib_examples.dox b/doxygen/grib_examples.dox index 8da918814..b32d75ea8 100644 --- a/doxygen/grib_examples.dox +++ b/doxygen/grib_examples.dox @@ -9,9 +9,9 @@ that can be taken as a starting point to write more complex programs.\n - \ref grib_print_data.py "grib_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 grib_nearest.py "grib_nearest.py" How to find the nearest grid points. -- \ref set_missing.py "set_missing.py" How to set a missing value in the header. +- \ref grib_set_missing.py "grib_set_missing.py" How to set a missing value in the header. - \ref count_messages.py "count_messages.py" How to count the messages in a file and loop through them. -- \ref samples.py "samples.py" How to create a new message from a sample. +- \ref grib_samples.py "grib_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 grib_keys_iterator.py "grib_keys_iterator.py" How to get the names of all the keys. diff --git a/doxygen/make_dox.sh b/doxygen/make_dox.sh index fc49b3e2e..b21747397 100755 --- a/doxygen/make_dox.sh +++ b/doxygen/make_dox.sh @@ -45,12 +45,17 @@ done pnames=" grib_get_keys -bufr_get_keys +grib_set_keys +grib_samples +grib_set_missing grib_nearest grib_index +grib_print_data grib_multi_write grib_iterator grib_clone +grib_keys_iterator +bufr_get_keys " for fn in $pnames; do perl -p -i -e "s|$fn\.py|$fn.py|" $Py_file diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index cf39e8177..2371f2c69 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -38,9 +38,9 @@ list( APPEND tests grib_multi_write grib_nearest grib_print_data - samples + grib_samples grib_set_keys - set_missing + grib_set_missing binary_message grib_set_bitmap bufr_attributes diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index 5e64304cc..cb168cecc 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -10,9 +10,9 @@ TESTS = grib_clone.sh \ grib_multi_write.sh \ grib_nearest.sh \ grib_print_data.sh \ - samples.sh \ + grib_samples.sh \ grib_set_keys.sh \ - set_missing.sh \ + grib_set_missing.sh \ binary_message.sh \ grib_set_bitmap.sh \ bufr_read_header.sh \ @@ -51,9 +51,9 @@ EXTRA_DIST = $(TESTS) include.sh CMakeLists.txt include.ctest.sh.in \ grib_multi_write.py \ grib_nearest.py \ grib_print_data.py \ - samples.py \ + grib_samples.py \ grib_set_keys.py \ - set_missing.py \ + grib_set_missing.py \ binary_message.py \ grib_set_pv.py \ grib_set_bitmap.py \ diff --git a/examples/python/samples.py b/examples/python/grib_samples.py similarity index 98% rename from examples/python/samples.py rename to examples/python/grib_samples.py index 944c116f9..af8ac6b54 100644 --- a/examples/python/samples.py +++ b/examples/python/grib_samples.py @@ -15,7 +15,7 @@ import sys from eccodes import * INPUT = '../../data/tp_ecmwf.grib' -OUTPUT = 'out.samples.grib' +OUTPUT = 'p_out.grib_samples.grib' VERBOSE = 1 # verbose error reporting diff --git a/examples/python/grib_samples.sh b/examples/python/grib_samples.sh new file mode 100755 index 000000000..ef0dc0c20 --- /dev/null +++ b/examples/python/grib_samples.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. ./include.sh + +REDIRECT=/dev/null +$PYTHON $examples_src/grib_samples.py +rm -f p_out.grib_samples.grib diff --git a/examples/python/set_missing.py b/examples/python/grib_set_missing.py similarity index 97% rename from examples/python/set_missing.py rename to examples/python/grib_set_missing.py index 91400e6d4..7b70a9d98 100644 --- a/examples/python/set_missing.py +++ b/examples/python/grib_set_missing.py @@ -15,7 +15,7 @@ import sys from eccodes import * INPUT = '../../data/tigge/tigge_ecmf_pl_t.grib' -OUTPUT = 'out.set_missing.grib' +OUTPUT = 'out.p_set_missing.grib' VERBOSE = 1 # verbose error reporting diff --git a/examples/python/grib_set_missing.sh b/examples/python/grib_set_missing.sh new file mode 100755 index 000000000..86d3024de --- /dev/null +++ b/examples/python/grib_set_missing.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. ./include.sh + +REDIRECT=/dev/null +$PYTHON $examples_src/grib_set_missing.py 2> $REDIRECT > $REDIRECT +rm -f out.p_set_missing.grib diff --git a/examples/python/samples.sh b/examples/python/samples.sh deleted file mode 100755 index 66fec128e..000000000 --- a/examples/python/samples.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. ./include.sh - -REDIRECT=/dev/null -$PYTHON $examples_src/samples.py -rm -f out.samples.grib diff --git a/examples/python/set_missing.sh b/examples/python/set_missing.sh deleted file mode 100755 index 65f85c9a0..000000000 --- a/examples/python/set_missing.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. ./include.sh - -REDIRECT=/dev/null -$PYTHON $examples_src/set_missing.py 2> $REDIRECT > $REDIRECT -rm -f out.set_missing.grib || true diff --git a/python/gribapi/gribapi.py b/python/gribapi/gribapi.py index 4b2303344..45e42fd75 100644 --- a/python/gribapi/gribapi.py +++ b/python/gribapi/gribapi.py @@ -789,7 +789,7 @@ def grib_new_from_samples(samplename): by the environment variable ECCODES_SAMPLES_PATH. To know where the samples directory is run the codes_info tool.\n - \b Examples: \ref samples.py "samples.py" + \b Examples: \ref grib_samples.py "grib_samples.py" @param samplename name of the sample to be used @return id of the message loaded in memory @@ -809,7 +809,7 @@ def codes_bufr_new_from_samples(samplename): by the environment variable ECCODES_SAMPLES_PATH. To know where the samples directory is run the codes_info tool.\n - \b Examples: \ref samples.py "samples.py" + \b Examples: \ref grib_samples.py "grib_samples.py" @param samplename name of the BUFR sample to be used @return id of the message loaded in memory @@ -1334,7 +1334,7 @@ def grib_set_missing(msgid, key): It can be used to set a missing value in the grib header but not in the data values. - \b Examples: \ref set_missing.py "set_missing.py" + \b Examples: \ref grib_set_missing.py "grib_set_missing.py" @param msgid id of the message loaded in memory @param key key name @@ -1496,7 +1496,7 @@ def grib_get(msgid, key, ktype=None): The \em msgid references a grib message loaded in memory. - \b Examples: \ref grib_get_keys.py "grib_get_keys.py", \ref print_data.py "print_data.py" + \b Examples: \ref grib_get_keys.py "grib_get_keys.py", \ref grib_print_data.py "grib_print_data.py" @see grib_new_from_file, grib_release, grib_set @@ -1557,7 +1557,7 @@ def grib_get_values(gribid): A NumPy ndarray containing the values in the message is returned. - \b Examples: \ref print_data.py "print_data.py", \ref samples.py "samples.py" + \b Examples: \ref grib_print_data.py "grib_print_data.py", \ref grib_samples.py "grib_samples.py" @param gribid id of the grib loaded in memory @return numpy.ndarray @@ -1579,7 +1579,7 @@ def grib_set_values(gribid, values): The elements of the input sequence need to be convertible to a double. - \b Examples: \ref grib_clone.py "grib_clone.py", \ref samples.py "samples.py" + \b Examples: \ref grib_clone.py "grib_clone.py", \ref grib_samples.py "grib_samples.py" @param gribid id of the grib loaded in memory @param values array of values to set as tuple, list, array or numpy.ndarray