mirror of https://github.com/ecmwf/eccodes.git
Testing: add test for C ensemble index example
This commit is contained in:
parent
18b297dc52
commit
c791ee1c82
|
@ -70,6 +70,7 @@ list( APPEND tests
|
||||||
grib_precision
|
grib_precision
|
||||||
grib_clone
|
grib_clone
|
||||||
grib_copy_message
|
grib_copy_message
|
||||||
|
grib_ensemble_index
|
||||||
grib_set_pv
|
grib_set_pv
|
||||||
grib_set_bitmap
|
grib_set_bitmap
|
||||||
grib_list
|
grib_list
|
||||||
|
|
|
@ -30,9 +30,11 @@ int main(int argc, char * argv[])
|
||||||
double min=1e13,max=-1e13,avg=0;
|
double min=1e13,max=-1e13,avg=0;
|
||||||
codes_index* index;
|
codes_index* index;
|
||||||
codes_handle* h=NULL;
|
codes_handle* h=NULL;
|
||||||
|
|
||||||
|
if (argc<2) return 1;
|
||||||
|
|
||||||
/* create index of file contents for paramId and number */
|
/* create index of file contents for paramId and number */
|
||||||
index = codes_index_new_from_file(0, "eps", "paramId,number",&ret);
|
index = codes_index_new_from_file(0, argv[1], "paramId,number",&ret);
|
||||||
CODES_CHECK(ret,0);
|
CODES_CHECK(ret,0);
|
||||||
|
|
||||||
/* get size of "paramId" list */
|
/* get size of "paramId" list */
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Copyright 2005-2016 ECMWF.
|
||||||
|
#
|
||||||
|
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||||
|
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
#
|
||||||
|
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||||
|
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||||
|
|
||||||
|
. ./include.sh
|
||||||
|
|
||||||
|
input="../../data/index.grib"
|
||||||
|
${examples_dir}c_grib_ensemble_index $input
|
|
@ -2,6 +2,5 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
REDIRECT=/dev/null
|
$PYTHON $examples_src/grib_index.py
|
||||||
$PYTHON $examples_src/grib_index.py 2> $REDIRECT > $REDIRECT
|
rm -f my.idx
|
||||||
rm my.idx || true
|
|
||||||
|
|
Loading…
Reference in New Issue