ECC-200: Python links to confluence

This commit is contained in:
Shahram Najm 2016-08-25 18:25:36 +01:00
parent b4d6fc5d1a
commit 464052db63
12 changed files with 38 additions and 33 deletions

View File

@ -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 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 set.py How to set values through the key names.
\example grib_nearest.py How to find the nearest grid points. \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 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_clone.py How to clone a message.
\example grib_iterator.py How to use an iterator on latitude, longitude, values. \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. \example grib_keys_iterator.py How to get the names of all the keys.

View File

@ -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 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 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 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 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_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_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. - \ref grib_keys_iterator.py "grib_keys_iterator.py" How to get the names of all the keys.

View File

@ -45,12 +45,17 @@ done
pnames=" pnames="
grib_get_keys grib_get_keys
bufr_get_keys grib_set_keys
grib_samples
grib_set_missing
grib_nearest grib_nearest
grib_index grib_index
grib_print_data
grib_multi_write grib_multi_write
grib_iterator grib_iterator
grib_clone grib_clone
grib_keys_iterator
bufr_get_keys
" "
for fn in $pnames; do for fn in $pnames; do
perl -p -i -e "s|$fn\.py|<a href=\"https://software.ecmwf.int/wiki/display/ECC/$fn\" target=\"_blank\">$fn.py</a>|" $Py_file perl -p -i -e "s|$fn\.py|<a href=\"https://software.ecmwf.int/wiki/display/ECC/$fn\" target=\"_blank\">$fn.py</a>|" $Py_file

View File

@ -38,9 +38,9 @@ list( APPEND tests
grib_multi_write grib_multi_write
grib_nearest grib_nearest
grib_print_data grib_print_data
samples grib_samples
grib_set_keys grib_set_keys
set_missing grib_set_missing
binary_message binary_message
grib_set_bitmap grib_set_bitmap
bufr_attributes bufr_attributes

View File

@ -10,9 +10,9 @@ TESTS = grib_clone.sh \
grib_multi_write.sh \ grib_multi_write.sh \
grib_nearest.sh \ grib_nearest.sh \
grib_print_data.sh \ grib_print_data.sh \
samples.sh \ grib_samples.sh \
grib_set_keys.sh \ grib_set_keys.sh \
set_missing.sh \ grib_set_missing.sh \
binary_message.sh \ binary_message.sh \
grib_set_bitmap.sh \ grib_set_bitmap.sh \
bufr_read_header.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_multi_write.py \
grib_nearest.py \ grib_nearest.py \
grib_print_data.py \ grib_print_data.py \
samples.py \ grib_samples.py \
grib_set_keys.py \ grib_set_keys.py \
set_missing.py \ grib_set_missing.py \
binary_message.py \ binary_message.py \
grib_set_pv.py \ grib_set_pv.py \
grib_set_bitmap.py \ grib_set_bitmap.py \

View File

@ -15,7 +15,7 @@ import sys
from eccodes import * from eccodes import *
INPUT = '../../data/tp_ecmwf.grib' INPUT = '../../data/tp_ecmwf.grib'
OUTPUT = 'out.samples.grib' OUTPUT = 'p_out.grib_samples.grib'
VERBOSE = 1 # verbose error reporting VERBOSE = 1 # verbose error reporting

View File

@ -0,0 +1,7 @@
#!/bin/sh
. ./include.sh
REDIRECT=/dev/null
$PYTHON $examples_src/grib_samples.py
rm -f p_out.grib_samples.grib

View File

@ -15,7 +15,7 @@ import sys
from eccodes import * from eccodes import *
INPUT = '../../data/tigge/tigge_ecmf_pl_t.grib' INPUT = '../../data/tigge/tigge_ecmf_pl_t.grib'
OUTPUT = 'out.set_missing.grib' OUTPUT = 'out.p_set_missing.grib'
VERBOSE = 1 # verbose error reporting VERBOSE = 1 # verbose error reporting

View File

@ -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

View File

@ -1,7 +0,0 @@
#!/bin/sh
. ./include.sh
REDIRECT=/dev/null
$PYTHON $examples_src/samples.py
rm -f out.samples.grib

View File

@ -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

View File

@ -789,7 +789,7 @@ def grib_new_from_samples(samplename):
by the environment variable ECCODES_SAMPLES_PATH. by the environment variable ECCODES_SAMPLES_PATH.
To know where the samples directory is run the codes_info tool.\n 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 @param samplename name of the sample to be used
@return id of the message loaded in memory @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. by the environment variable ECCODES_SAMPLES_PATH.
To know where the samples directory is run the codes_info tool.\n 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 @param samplename name of the BUFR sample to be used
@return id of the message loaded in memory @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 It can be used to set a missing value in the grib header but not in
the data values. 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 msgid id of the message loaded in memory
@param key key name @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. 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 @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. 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 @param gribid id of the grib loaded in memory
@return numpy.ndarray @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. 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 gribid id of the grib loaded in memory
@param values array of values to set as tuple, list, array or numpy.ndarray @param values array of values to set as tuple, list, array or numpy.ndarray