mirror of https://github.com/ecmwf/eccodes.git
Rationalize and clean up C examples
This commit is contained in:
parent
e05a7aaae2
commit
de1b8016f6
|
@ -67,17 +67,65 @@ tools/mars_request
|
||||||
tools/parser
|
tools/parser
|
||||||
tools/xref
|
tools/xref
|
||||||
tools/grib1to2
|
tools/grib1to2
|
||||||
|
tools/bufr_compare
|
||||||
|
tools/bufr_copy
|
||||||
|
tools/bufr_dump
|
||||||
|
tools/bufr_filter
|
||||||
|
tools/bufr_get
|
||||||
|
tools/bufr_index_build
|
||||||
|
tools/bufr_ls
|
||||||
|
tools/bufr_set
|
||||||
|
tools/grib_to_json
|
||||||
|
tools/metar_dump
|
||||||
|
tools/metar_filter
|
||||||
|
tools/metar_get
|
||||||
|
tools/metar_ls
|
||||||
|
tools/taf_dump
|
||||||
|
tools/taf_filter
|
||||||
|
tools/taf_get
|
||||||
|
tools/taf_ls
|
||||||
examples/C/.libs/
|
examples/C/.libs/
|
||||||
examples/C/test-suite.log
|
examples/C/test-suite.log
|
||||||
examples/C/box
|
examples/C/c_box
|
||||||
examples/C/bufr_clone
|
examples/C/c_bufr_clone
|
||||||
examples/C/bufr_missing
|
examples/C/c_bufr_missing
|
||||||
examples/C/bufr_attributes
|
examples/C/c_bufr_attributes
|
||||||
examples/C/bufr_keys_iterator
|
examples/C/c_bufr_keys_iterator
|
||||||
examples/C/bufr_set_keys
|
examples/C/c_bufr_set_keys
|
||||||
examples/C/bufr_expanded
|
examples/C/c_bufr_expanded
|
||||||
examples/C/bufr_get_keys
|
examples/C/c_bufr_get_keys
|
||||||
examples/C/bufr_subset
|
examples/C/c_bufr_subset
|
||||||
|
examples/C/c_check_gaussian_grid
|
||||||
|
examples/C/c_grib_ensemble_index
|
||||||
|
examples/C/c_grib_clone
|
||||||
|
examples/C/c_grib_iterator_bitmap
|
||||||
|
examples/C/c_new_sample
|
||||||
|
examples/C/c_bufr_read_header
|
||||||
|
examples/C/c_bufr_read_temp
|
||||||
|
examples/C/c_bufr_read_synop
|
||||||
|
examples/C/c_grib_get_keys
|
||||||
|
examples/C/c_grib_get_data
|
||||||
|
examples/C/c_get_product_kind
|
||||||
|
examples/C/c_grib_iterator
|
||||||
|
examples/C/c_grib_index
|
||||||
|
examples/C/c_grib_keys_iterator
|
||||||
|
examples/C/c_large_grib1
|
||||||
|
examples/C/c_grib_list
|
||||||
|
examples/C/c_mars_param
|
||||||
|
examples/C/c_grib_multi
|
||||||
|
examples/C/c_multi2
|
||||||
|
examples/C/c_grib_multi_write
|
||||||
|
examples/C/c_grib_nearest
|
||||||
|
examples/C/c_points
|
||||||
|
examples/C/c_grib_precision
|
||||||
|
examples/C/c_grib_print_data
|
||||||
|
examples/C/c_sections_copy
|
||||||
|
examples/C/c_grib_set_keys
|
||||||
|
examples/C/c_grib_set_bitmap
|
||||||
|
examples/C/c_grib_set_data
|
||||||
|
examples/C/c_set_missing
|
||||||
|
examples/C/c_grib_set_pv
|
||||||
|
examples/C/c_values_check
|
||||||
examples/C/*.sh.log
|
examples/C/*.sh.log
|
||||||
examples/C/*.sh.trs
|
examples/C/*.sh.trs
|
||||||
examples/F90/f_bufr_expanded
|
examples/F90/f_bufr_expanded
|
||||||
|
@ -88,35 +136,46 @@ examples/F90/f_bufr_set_keys
|
||||||
examples/F90/f_bufr_get_keys
|
examples/F90/f_bufr_get_keys
|
||||||
examples/F90/f_bufr_keys_iterator
|
examples/F90/f_bufr_keys_iterator
|
||||||
examples/F90/f_bufr_subset
|
examples/F90/f_bufr_subset
|
||||||
|
examples/F90/f_bufr_clone
|
||||||
|
examples/F90/f_bufr_read_header
|
||||||
|
examples/F90/f_grib_clone
|
||||||
|
examples/F90/f_copy_message
|
||||||
|
examples/F90/f_copy_namespace
|
||||||
|
examples/F90/f_count_messages
|
||||||
|
examples/F90/f_grib_get_keys
|
||||||
|
examples/F90/f_get_data
|
||||||
|
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_grib_index
|
||||||
|
examples/F90/f_grib_keys_iterator
|
||||||
|
examples/F90/f_grib_multi
|
||||||
|
examples/F90/f_grib_multi_write
|
||||||
|
examples/F90/f_grib_nearest
|
||||||
|
examples/F90/f_new_from_file
|
||||||
|
examples/F90/f_grib_precision
|
||||||
|
examples/F90/f_grib_print_data
|
||||||
|
examples/F90/f_read_from_file
|
||||||
|
examples/F90/f_read_message
|
||||||
|
examples/F90/f_samples
|
||||||
|
examples/F90/f_grib_set_keys
|
||||||
|
examples/F90/f_grib_set_bitmap
|
||||||
|
examples/F90/f_set_gvc
|
||||||
|
examples/F90/f_set_missing
|
||||||
|
examples/F90/f_grib_set_pv
|
||||||
examples/F90/*.sh.log
|
examples/F90/*.sh.log
|
||||||
examples/F90/*.sh.trs
|
examples/F90/*.sh.trs
|
||||||
examples/F90/test-suite.log
|
examples/F90/test-suite.log
|
||||||
examples/C/bufr_read_header
|
examples/python/.libs/
|
||||||
examples/C/bufr_read_temp
|
examples/python/my.idx
|
||||||
examples/C/bufr_read_synop
|
examples/python/p_count_messages
|
||||||
examples/C/grib_get_keys
|
examples/python/p_grib_iterator
|
||||||
examples/C/get_data
|
examples/python/p_grib_keys_iterator
|
||||||
examples/C/get_product_kind
|
examples/python/p_grib_print_data
|
||||||
examples/C/grib_iterator
|
examples/python/*.sh.log
|
||||||
examples/C/grib_index
|
examples/python/*.sh.trs
|
||||||
examples/C/grib_keys_iterator
|
examples/python/test-suite.log
|
||||||
examples/C/large_grib1
|
|
||||||
examples/C/list
|
|
||||||
examples/C/mars_param
|
|
||||||
examples/C/grib_multi
|
|
||||||
examples/C/multi2
|
|
||||||
examples/C/grib_multi_write
|
|
||||||
examples/C/grib_nearest
|
|
||||||
examples/C/points
|
|
||||||
examples/C/grib_precision
|
|
||||||
examples/C/grib_print_data
|
|
||||||
examples/C/sections_copy
|
|
||||||
examples/C/grib_set_keys
|
|
||||||
examples/C/grib_set_bitmap
|
|
||||||
examples/C/grib_set_data
|
|
||||||
examples/C/set_missing
|
|
||||||
examples/C/grib_set_pv
|
|
||||||
examples/C/values_check
|
|
||||||
fortran/.libs/
|
fortran/.libs/
|
||||||
fortran/*.mod
|
fortran/*.mod
|
||||||
fortran/grib_f90.f90
|
fortran/grib_f90.f90
|
||||||
|
@ -125,6 +184,9 @@ fortran/grib_kinds.h
|
||||||
fortran/grib_types
|
fortran/grib_types
|
||||||
fortran/same_int_long
|
fortran/same_int_long
|
||||||
fortran/same_int_size_t
|
fortran/same_int_size_t
|
||||||
|
python/.libs/
|
||||||
|
python/gribapi_swig.py
|
||||||
|
python/gribapi_swig_wrap.c
|
||||||
python/eccode_swig.py
|
python/eccode_swig.py
|
||||||
python/eccode_swig_wrap.c
|
python/eccode_swig_wrap.c
|
||||||
python/setup.py
|
python/setup.py
|
||||||
|
@ -155,27 +217,6 @@ tigge/tigge_accumulations
|
||||||
tigge/tigge_check
|
tigge/tigge_check
|
||||||
tigge/tigge_name
|
tigge/tigge_name
|
||||||
tigge/tigge_split
|
tigge/tigge_split
|
||||||
# After you do a make check
|
|
||||||
examples/C/out.grib1
|
|
||||||
examples/C/out_surface_level.grib2
|
|
||||||
examples/F90/index.idx
|
|
||||||
examples/F90/index_f90.out
|
|
||||||
examples/F90/multi.out
|
|
||||||
examples/F90/multi_created.grib2
|
|
||||||
examples/F90/out.grib1
|
|
||||||
examples/F90/out_surface_level.grib2
|
|
||||||
examples/F90/.libs/
|
|
||||||
tests/bitmap.rules
|
|
||||||
tests/loc.grib1
|
|
||||||
tests/out.grib1
|
|
||||||
tests/out.grib2
|
|
||||||
tests/out.gribidx
|
|
||||||
tests/rules
|
|
||||||
tests/simple_ieee_test.grib1.txt
|
|
||||||
tests/statistics.filter
|
|
||||||
tests/statistics.out
|
|
||||||
tests/x.grib
|
|
||||||
|
|
||||||
|
|
||||||
# IFS samples
|
# IFS samples
|
||||||
ifs_samples/*/*.tmpl
|
ifs_samples/*/*.tmpl
|
||||||
|
@ -248,70 +289,6 @@ share/
|
||||||
lib
|
lib
|
||||||
include
|
include
|
||||||
|
|
||||||
#from make
|
|
||||||
examples/C/check_gaussian_grid
|
|
||||||
examples/C/grib_ensemble_index
|
|
||||||
examples/C/grib_clone
|
|
||||||
examples/C/grib_iterator_bitmap
|
|
||||||
examples/C/new_sample
|
|
||||||
examples/F90/f_bufr_clone
|
|
||||||
examples/F90/f_bufr_read_header
|
|
||||||
examples/F90/f_grib_clone
|
|
||||||
examples/F90/f_copy_message
|
|
||||||
examples/F90/f_copy_namespace
|
|
||||||
examples/F90/f_count_messages
|
|
||||||
examples/F90/f_grib_get_keys
|
|
||||||
examples/F90/f_get_data
|
|
||||||
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_grib_index
|
|
||||||
examples/F90/f_grib_keys_iterator
|
|
||||||
examples/F90/f_grib_multi
|
|
||||||
examples/F90/f_grib_multi_write
|
|
||||||
examples/F90/f_grib_nearest
|
|
||||||
examples/F90/f_new_from_file
|
|
||||||
examples/F90/f_grib_precision
|
|
||||||
examples/F90/f_grib_print_data
|
|
||||||
examples/F90/f_read_from_file
|
|
||||||
examples/F90/f_read_message
|
|
||||||
examples/F90/f_samples
|
|
||||||
examples/F90/f_grib_set_keys
|
|
||||||
examples/F90/f_grib_set_bitmap
|
|
||||||
examples/F90/f_set_gvc
|
|
||||||
examples/F90/f_set_missing
|
|
||||||
examples/F90/f_grib_set_pv
|
|
||||||
examples/python/.libs/
|
|
||||||
examples/python/my.idx
|
|
||||||
examples/python/p_count_messages
|
|
||||||
examples/python/p_grib_iterator
|
|
||||||
examples/python/p_grib_keys_iterator
|
|
||||||
examples/python/p_grib_print_data
|
|
||||||
examples/python/*.sh.log
|
|
||||||
examples/python/*.sh.trs
|
|
||||||
examples/python/test-suite.log
|
|
||||||
tools/bufr_compare
|
|
||||||
tools/bufr_copy
|
|
||||||
tools/bufr_dump
|
|
||||||
tools/bufr_filter
|
|
||||||
tools/bufr_get
|
|
||||||
tools/bufr_index_build
|
|
||||||
tools/bufr_ls
|
|
||||||
tools/bufr_set
|
|
||||||
tools/grib_to_json
|
|
||||||
tools/metar_dump
|
|
||||||
tools/metar_filter
|
|
||||||
tools/metar_get
|
|
||||||
tools/metar_ls
|
|
||||||
tools/taf_dump
|
|
||||||
tools/taf_filter
|
|
||||||
tools/taf_get
|
|
||||||
tools/taf_ls
|
|
||||||
python/.libs/
|
|
||||||
python/gribapi_swig.py
|
|
||||||
python/gribapi_swig_wrap.c
|
|
||||||
|
|
||||||
data/bufr/*diff
|
data/bufr/*diff
|
||||||
data/bufr/*decode
|
data/bufr/*decode
|
||||||
data/bufr/*test
|
data/bufr/*test
|
||||||
|
|
|
@ -25,8 +25,8 @@ list( APPEND test_bins
|
||||||
grib_multi_write
|
grib_multi_write
|
||||||
grib_precision
|
grib_precision
|
||||||
grib_set_pv
|
grib_set_pv
|
||||||
list
|
grib_list
|
||||||
get_data
|
grib_get_data
|
||||||
sections_copy
|
sections_copy
|
||||||
grib_iterator_bitmap
|
grib_iterator_bitmap
|
||||||
large_grib1
|
large_grib1
|
||||||
|
@ -47,7 +47,7 @@ list( APPEND test_bins
|
||||||
bufr_subset
|
bufr_subset
|
||||||
)
|
)
|
||||||
foreach( tool ${test_bins} )
|
foreach( tool ${test_bins} )
|
||||||
ecbuild_add_executable( TARGET ${tool}
|
ecbuild_add_executable( TARGET c_${tool}
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES ${tool}.c
|
SOURCES ${tool}.c
|
||||||
LIBS eccodes
|
LIBS eccodes
|
||||||
|
@ -65,13 +65,13 @@ list( APPEND tests
|
||||||
grib_multi
|
grib_multi
|
||||||
grib_multi_write
|
grib_multi_write
|
||||||
grib_precision
|
grib_precision
|
||||||
list
|
|
||||||
large_grib1
|
|
||||||
get_data
|
|
||||||
set_missing
|
|
||||||
grib_clone
|
grib_clone
|
||||||
sections_copy
|
|
||||||
grib_set_pv
|
grib_set_pv
|
||||||
|
grib_list
|
||||||
|
grib_get_data
|
||||||
|
large_grib1
|
||||||
|
set_missing
|
||||||
|
sections_copy
|
||||||
check_gaussian_grids
|
check_gaussian_grids
|
||||||
bufr_attributes
|
bufr_attributes
|
||||||
bufr_clone
|
bufr_clone
|
||||||
|
|
|
@ -9,9 +9,9 @@ TESTS = grib_iterator.sh \
|
||||||
grib_multi.sh \
|
grib_multi.sh \
|
||||||
grib_multi_write.sh \
|
grib_multi_write.sh \
|
||||||
grib_precision.sh \
|
grib_precision.sh \
|
||||||
list.sh \
|
grib_list.sh \
|
||||||
large_grib1.sh \
|
large_grib1.sh \
|
||||||
get_data.sh \
|
grib_get_data.sh \
|
||||||
sections_copy.sh \
|
sections_copy.sh \
|
||||||
set_missing.sh \
|
set_missing.sh \
|
||||||
grib_clone.sh \
|
grib_clone.sh \
|
||||||
|
@ -30,88 +30,90 @@ TESTS = grib_iterator.sh \
|
||||||
bufr_read_temp.sh \
|
bufr_read_temp.sh \
|
||||||
get_product_kind.sh
|
get_product_kind.sh
|
||||||
|
|
||||||
noinst_PROGRAMS = grib_nearest \
|
noinst_PROGRAMS = c_grib_nearest \
|
||||||
grib_set_bitmap \
|
c_grib_set_bitmap \
|
||||||
grib_iterator \
|
c_grib_iterator \
|
||||||
grib_get_keys \
|
c_grib_get_keys \
|
||||||
grib_print_data \
|
c_grib_print_data \
|
||||||
grib_set_keys \
|
c_grib_set_keys \
|
||||||
set_missing \
|
c_set_missing \
|
||||||
grib_keys_iterator \
|
c_grib_keys_iterator \
|
||||||
grib_set_data \
|
c_grib_set_data \
|
||||||
grib_index \
|
c_grib_index \
|
||||||
mars_param \
|
c_mars_param \
|
||||||
values_check \
|
c_values_check \
|
||||||
box \
|
c_box \
|
||||||
grib_multi \
|
c_grib_multi \
|
||||||
multi2 \
|
c_multi2 \
|
||||||
grib_multi_write \
|
c_grib_multi_write \
|
||||||
grib_precision \
|
c_grib_precision \
|
||||||
grib_set_pv \
|
c_grib_set_pv \
|
||||||
list \
|
c_grib_list \
|
||||||
sections_copy \
|
c_sections_copy \
|
||||||
large_grib1 \
|
c_large_grib1 \
|
||||||
get_data \
|
c_grib_get_data \
|
||||||
grib_iterator_bitmap \
|
c_grib_iterator_bitmap \
|
||||||
grib_clone new_sample \
|
c_grib_clone \
|
||||||
check_gaussian_grid \
|
c_new_sample \
|
||||||
grib_ensemble_index \
|
c_check_gaussian_grid \
|
||||||
points \
|
c_grib_ensemble_index \
|
||||||
bufr_attributes \
|
c_points \
|
||||||
bufr_clone \
|
c_bufr_attributes \
|
||||||
bufr_expanded \
|
c_bufr_clone \
|
||||||
bufr_get_keys \
|
c_bufr_expanded \
|
||||||
bufr_read_header \
|
c_bufr_get_keys \
|
||||||
bufr_read_synop \
|
c_bufr_read_header \
|
||||||
bufr_get_keys \
|
c_bufr_read_synop \
|
||||||
bufr_subset \
|
c_bufr_get_keys \
|
||||||
bufr_keys_iterator \
|
c_bufr_subset \
|
||||||
bufr_set_keys \
|
c_bufr_keys_iterator \
|
||||||
bufr_missing \
|
c_bufr_set_keys \
|
||||||
bufr_read_temp \
|
c_bufr_missing \
|
||||||
get_product_kind
|
c_bufr_read_temp \
|
||||||
|
c_get_product_kind
|
||||||
|
|
||||||
#bin_PROGRAMS = points
|
#bin_PROGRAMS = points
|
||||||
|
|
||||||
box_SOURCES = box.c
|
c_box_SOURCES = box.c
|
||||||
grib_set_data_SOURCES = grib_set_data.c
|
c_grib_set_data_SOURCES = grib_set_data.c
|
||||||
mars_param_SOURCES = mars_param.c
|
c_mars_param_SOURCES = mars_param.c
|
||||||
values_check_SOURCES = values_check.c
|
c_values_check_SOURCES = values_check.c
|
||||||
grib_nearest_SOURCES = grib_nearest.c
|
c_grib_nearest_SOURCES = grib_nearest.c
|
||||||
grib_multi_write_SOURCES = grib_multi_write.c
|
c_grib_multi_write_SOURCES = grib_multi_write.c
|
||||||
grib_get_keys_SOURCES = grib_get_keys.c
|
c_grib_get_keys_SOURCES = grib_get_keys.c
|
||||||
grib_print_data_SOURCES = grib_print_data.c
|
c_grib_print_data_SOURCES = grib_print_data.c
|
||||||
grib_set_keys_SOURCES = grib_set_keys.c
|
c_grib_set_keys_SOURCES = grib_set_keys.c
|
||||||
set_missing_SOURCES = set_missing.c
|
c_set_missing_SOURCES = set_missing.c
|
||||||
grib_index_SOURCES = grib_index.c
|
c_grib_index_SOURCES = grib_index.c
|
||||||
grib_set_bitmap_SOURCES = grib_set_bitmap.c
|
c_grib_set_bitmap_SOURCES = grib_set_bitmap.c
|
||||||
grib_multi_SOURCES = grib_multi.c
|
c_grib_multi_SOURCES = grib_multi.c
|
||||||
multi2_SOURCES = multi2.c
|
c_multi2_SOURCES = multi2.c
|
||||||
grib_keys_iterator_SOURCES = grib_keys_iterator.c
|
c_grib_keys_iterator_SOURCES = grib_keys_iterator.c
|
||||||
grib_iterator_SOURCES = grib_iterator.c
|
c_grib_iterator_SOURCES = grib_iterator.c
|
||||||
grib_iterator_bitmap_SOURCES = grib_iterator_bitmap.c
|
c_grib_iterator_bitmap_SOURCES = grib_iterator_bitmap.c
|
||||||
grib_set_pv_SOURCES = grib_set_pv.c
|
c_grib_set_pv_SOURCES = grib_set_pv.c
|
||||||
points_SOURCES = points.c
|
c_points_SOURCES = points.c
|
||||||
list_SOURCES = list.c
|
c_grib_list_SOURCES = grib_list.c
|
||||||
sections_copy_SOURCES = sections_copy.c
|
c_sections_copy_SOURCES = sections_copy.c
|
||||||
large_grib1_SOURCES = large_grib1.c
|
c_large_grib1_SOURCES = large_grib1.c
|
||||||
get_data_SOURCES = get_data.c
|
c_grib_precision_SOURCES = grib_precision.c
|
||||||
grib_clone_SOURCES = grib_clone.c
|
c_grib_get_data_SOURCES = grib_get_data.c
|
||||||
new_sample_SOURCES = new_sample.c
|
c_grib_clone_SOURCES = grib_clone.c
|
||||||
check_gaussian_grid_SOURCES = check_gaussian_grid.c
|
c_new_sample_SOURCES = new_sample.c
|
||||||
grib_ensemble_index_SOURCES = grib_ensemble_index.c
|
c_check_gaussian_grid_SOURCES = check_gaussian_grid.c
|
||||||
bufr_attributes_SOURCES = bufr_attributes.c
|
c_grib_ensemble_index_SOURCES = grib_ensemble_index.c
|
||||||
bufr_clone_SOURCES = bufr_clone.c
|
c_bufr_attributes_SOURCES = bufr_attributes.c
|
||||||
bufr_expanded_SOURCES = bufr_expanded.c
|
c_bufr_clone_SOURCES = bufr_clone.c
|
||||||
bufr_get_keys_SOURCES = bufr_get_keys.c
|
c_bufr_expanded_SOURCES = bufr_expanded.c
|
||||||
bufr_keys_iterator = bufr_keys_iterator.c
|
c_bufr_get_keys_SOURCES = bufr_get_keys.c
|
||||||
bufr_missing = bufr_missing.c
|
c_bufr_keys_iterator_SOURCES = bufr_keys_iterator.c
|
||||||
bufr_read_header_SOURCES = bufr_read_header.c
|
c_bufr_missing_SOURCES = bufr_missing.c
|
||||||
bufr_read_synop_SOURCES = bufr_read_synop.c
|
c_bufr_read_header_SOURCES = bufr_read_header.c
|
||||||
bufr_read_temp_SOURCES = bufr_read_temp.c
|
c_bufr_read_synop_SOURCES = bufr_read_synop.c
|
||||||
bufr_set_keys_SOURCES = bufr_set_keys.c
|
c_bufr_read_temp_SOURCES = bufr_read_temp.c
|
||||||
bufr_subset_SOURCES = bufr_subset.c
|
c_bufr_set_keys_SOURCES = bufr_set_keys.c
|
||||||
get_product_kind_SOURCES = get_product_kind.c
|
c_bufr_subset_SOURCES = bufr_subset.c
|
||||||
|
c_get_product_kind_SOURCES = get_product_kind.c
|
||||||
|
|
||||||
INCLUDES = -I$(top_builddir)/src
|
INCLUDES = -I$(top_builddir)/src
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the key values into a file
|
#Write the key values into a file
|
||||||
${examples_dir}/bufr_attributes 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_attributes 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the results
|
#TODO: check the results
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ f=${data_dir}/bufr/syno_1.bufr
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Clone the bufr messages
|
#Clone the bufr messages
|
||||||
${examples_dir}/bufr_clone $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
${examples_dir}c_bufr_clone $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||||
|
|
||||||
#Compare clone to the original
|
#Compare clone to the original
|
||||||
set +e
|
set +e
|
||||||
|
|
|
@ -24,7 +24,7 @@ f=${data_dir}/bufr/syno_1.bufr
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the values into a file
|
#Write the values into a file
|
||||||
${examples_dir}/bufr_expanded $f > $fTmp 2> $REDIRECT
|
${examples_dir}c_bufr_expanded $f > $fTmp 2> $REDIRECT
|
||||||
|
|
||||||
#TODO: add a better check. It could be compared against the bufrdc
|
#TODO: add a better check. It could be compared against the bufrdc
|
||||||
# references.
|
# references.
|
||||||
|
|
|
@ -24,7 +24,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the key values into a file
|
#Write the key values into a file
|
||||||
${examples_dir}/bufr_get_keys 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_get_keys 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the results
|
#TODO: check the results
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ REDIRECT=/dev/null
|
||||||
f=${data_dir}/bufr/syno_1.bufr
|
f=${data_dir}/bufr/syno_1.bufr
|
||||||
|
|
||||||
#Dump the keys
|
#Dump the keys
|
||||||
${examples_dir}/bufr_keys_iterator $f 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_keys_iterator $f 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the output
|
#TODO: check the output
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the key values into a file
|
#Write the key values into a file
|
||||||
${examples_dir}/bufr_missing #2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_missing #2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the results
|
#TODO: check the results
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ fRef=${f}.header.ref
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the values into a file and compare with reference
|
#Write the values into a file and compare with reference
|
||||||
${examples_dir}/bufr_read_header $f 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_read_header $f 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#We compare output to the reference by ignoring the whitespaces
|
#We compare output to the reference by ignoring the whitespaces
|
||||||
diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT
|
diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT
|
||||||
|
|
|
@ -24,7 +24,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the values into a file and compare with reference
|
#Write the values into a file and compare with reference
|
||||||
${examples_dir}/bufr_read_synop 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_read_synop 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the output
|
#TODO: check the output
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the key values into a file
|
#Write the key values into a file
|
||||||
${examples_dir}/bufr_read_temp #2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_read_temp #2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: check the results
|
#TODO: check the results
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ f=${data_dir}/bufr/syno_multi.bufr
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#
|
#
|
||||||
${examples_dir}bufr_set_keys $fBufrTmp 2> $REDIRECT > $REDIRECT
|
${examples_dir}c_bufr_set_keys $fBufrTmp 2> $REDIRECT > $REDIRECT
|
||||||
|
|
||||||
#Compare modified to the original
|
#Compare modified to the original
|
||||||
set +e
|
set +e
|
||||||
|
|
|
@ -23,7 +23,7 @@ rm -f $fTmp | true
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
|
|
||||||
#Write the values into a file and compare with reference
|
#Write the values into a file and compare with reference
|
||||||
${examples_dir}/bufr_subset 2> $REDIRECT > $fTmp
|
${examples_dir}c_bufr_subset 2> $REDIRECT > $fTmp
|
||||||
|
|
||||||
#TODO: add a proper check when subsets are properly implemented
|
#TODO: add a proper check when subsets are properly implemented
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,5 @@
|
||||||
# Check all sample GRIBs with a Gaussian grid
|
# Check all sample GRIBs with a Gaussian grid
|
||||||
samples_dir=${proj_dir}/samples
|
samples_dir=${proj_dir}/samples
|
||||||
for gg in ${samples_dir}/reduced_gg_* ${samples_dir}/regular_gg_*; do
|
for gg in ${samples_dir}/reduced_gg_* ${samples_dir}/regular_gg_*; do
|
||||||
${examples_dir}check_gaussian_grid $gg >/dev/null
|
${examples_dir}c_check_gaussian_grid $gg >/dev/null
|
||||||
done
|
done
|
||||||
|
|
|
@ -16,6 +16,6 @@ fTmp=${label}.tmp
|
||||||
# Create a file containing both GRIB and BUFR messages
|
# Create a file containing both GRIB and BUFR messages
|
||||||
cat ${data_dir}/sample.grib2 ${data_dir}/bufr/syno_multi.bufr >$fTmp
|
cat ${data_dir}/sample.grib2 ${data_dir}/bufr/syno_multi.bufr >$fTmp
|
||||||
|
|
||||||
${examples_dir}/get_product_kind $fTmp >/dev/null 2>&1
|
${examples_dir}c_get_product_kind $fTmp >/dev/null 2>&1
|
||||||
|
|
||||||
rm -f $fTmp
|
rm -f $fTmp
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
TEMP=cloned.grib
|
TEMP=cloned.grib
|
||||||
|
|
||||||
INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1
|
INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1
|
||||||
${examples_dir}grib_clone ${INPUT} ${TEMP} > /dev/null
|
${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null
|
||||||
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
||||||
|
|
||||||
INPUT=${data_dir}/sample.grib2
|
INPUT=${data_dir}/sample.grib2
|
||||||
${examples_dir}grib_clone ${INPUT} ${TEMP} > /dev/null
|
${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null
|
||||||
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
||||||
|
|
||||||
rm -f ${TEMP}
|
rm -f ${TEMP}
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C Implementation: get_data
|
* C Implementation: grib_get_data
|
||||||
*
|
*
|
||||||
* Description: how to get lat/lon/values.
|
* Description: how to get lat/lon/values from a GRIB message
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}get_data > /dev/null
|
${examples_dir}c_grib_get_data > /dev/null
|
|
@ -9,5 +9,5 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}grib_get_keys > /dev/null
|
${examples_dir}c_grib_get_keys > /dev/null
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}grib_iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null
|
${examples_dir}c_grib_iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null
|
||||||
|
|
||||||
${examples_dir}grib_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null
|
${examples_dir}c_grib_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null
|
${examples_dir}c_grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null
|
||||||
|
|
||||||
${examples_dir}grib_keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null
|
${examples_dir}c_grib_keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C Implementation: list
|
* C Implementation: grib_list
|
||||||
*
|
*
|
||||||
* Description: how to get values using keys.
|
* Description: how to get values using keys.
|
||||||
*
|
*
|
|
@ -9,6 +9,5 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}list > /dev/null
|
${examples_dir}c_grib_list > /dev/null
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,13 @@ if [ ! -f "${data_dir}/multi.grib2" ]
|
||||||
then
|
then
|
||||||
echo "SKIP test 1: $0"
|
echo "SKIP test 1: $0"
|
||||||
else
|
else
|
||||||
${examples_dir}grib_multi > /dev/null
|
${examples_dir}c_grib_multi > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "${data_dir}/multi_created.grib2" ]
|
if [ ! -f "${data_dir}/multi_created.grib2" ]
|
||||||
then
|
then
|
||||||
echo "SKIP test 2: $0"
|
echo "SKIP test 2: $0"
|
||||||
else
|
else
|
||||||
${examples_dir}multi2 > /dev/null
|
${examples_dir}c_multi2 > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ then
|
||||||
echo SKIP: $0
|
echo SKIP: $0
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
${examples_dir}grib_multi_write ${data_dir}/sample.grib2 ${data_dir}/multi_sample.grib2 > /dev/null
|
${examples_dir}c_grib_multi_write ${data_dir}/sample.grib2 ${data_dir}/multi_sample.grib2 > /dev/null
|
||||||
|
|
||||||
${tools_dir}grib_get -p step ${data_dir}/multi_sample.grib2 > ${data_dir}/multi_step.test
|
${tools_dir}grib_get -p step ${data_dir}/multi_sample.grib2 > ${data_dir}/multi_step.test
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}grib_precision > /dev/null
|
${examples_dir}c_grib_precision > /dev/null
|
||||||
|
|
||||||
rm -f out.precision.grib1
|
rm -f out.precision.grib1
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
numberOfValues=`${examples_dir}grib_print_data ../../data/constant_field.grib1 | grep values | awk '{print $1}'`
|
numberOfValues=`${examples_dir}c_grib_print_data ../../data/constant_field.grib1 | grep values | awk '{print $1}'`
|
||||||
|
|
||||||
if [ $numberOfValues -ne 99200 ]
|
if [ $numberOfValues -ne 99200 ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}grib_set_keys > /dev/null
|
${examples_dir}c_grib_set_keys > /dev/null
|
||||||
|
|
||||||
rm -f out.set.grib1
|
rm -f out.set.grib1
|
||||||
|
|
|
@ -13,7 +13,7 @@ GRIB1=${data_dir}/regular_latlon_surface.grib1
|
||||||
GRIB2=${proj_dir}/samples/regular_ll_sfc_grib2.tmpl
|
GRIB2=${proj_dir}/samples/regular_ll_sfc_grib2.tmpl
|
||||||
OUT=temp.$$.out
|
OUT=temp.$$.out
|
||||||
|
|
||||||
${examples_dir}grib_set_pv $GRIB1 $OUT > /dev/null
|
${examples_dir}c_grib_set_pv $GRIB1 $OUT > /dev/null
|
||||||
${examples_dir}grib_set_pv $GRIB2 $OUT > /dev/null
|
${examples_dir}c_grib_set_pv $GRIB2 $OUT > /dev/null
|
||||||
|
|
||||||
rm -f $OUT
|
rm -f $OUT
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
# The executable should produce a GRIB1 file
|
# The executable should produce a GRIB1 file
|
||||||
${examples_dir}large_grib1
|
${examples_dir}c_large_grib1
|
||||||
|
|
||||||
# Make sure it can be listed OK
|
# Make sure it can be listed OK
|
||||||
output=${examples_dir}bigfile.grib
|
output=${examples_dir}bigfile.grib
|
||||||
|
|
|
@ -15,7 +15,7 @@ OUTPUT=temp.sections.grib
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Copy the GRID section from REGUL_GRID_FILE
|
# Copy the GRID section from REGUL_GRID_FILE
|
||||||
${examples_dir}sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE g $OUTPUT >/dev/null
|
${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE g $OUTPUT >/dev/null
|
||||||
|
|
||||||
# Now the output should have a regular grid
|
# Now the output should have a regular grid
|
||||||
# but its date should be the same as the Gaussian grid sample
|
# but its date should be the same as the Gaussian grid sample
|
||||||
|
@ -25,7 +25,7 @@ grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Copy the GRID section from GAUSS_GRID_FILE
|
# Copy the GRID section from GAUSS_GRID_FILE
|
||||||
${examples_dir}sections_copy $GAUSS_GRID_FILE $REGUL_GRID_FILE g $OUTPUT >/dev/null
|
${examples_dir}c_sections_copy $GAUSS_GRID_FILE $REGUL_GRID_FILE g $OUTPUT >/dev/null
|
||||||
|
|
||||||
# Now the output should have a gaussian grid
|
# Now the output should have a gaussian grid
|
||||||
# but its date should be the same as the regular grid
|
# but its date should be the same as the regular grid
|
||||||
|
@ -35,7 +35,7 @@ grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Copy both the PRODUCT and GRID sections from REGUL_GRID_FILE
|
# Copy both the PRODUCT and GRID sections from REGUL_GRID_FILE
|
||||||
${examples_dir}sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE gp $OUTPUT >/dev/null
|
${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE gp $OUTPUT >/dev/null
|
||||||
|
|
||||||
# Now the output should have a regular grid
|
# Now the output should have a regular grid
|
||||||
# and its date should be the same as the regular latlon
|
# and its date should be the same as the regular latlon
|
||||||
|
@ -45,7 +45,7 @@ grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Copy all sections from REGUL_GRID_FILE (use commas)
|
# Copy all sections from REGUL_GRID_FILE (use commas)
|
||||||
${examples_dir}sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE p,l,g,d,b $OUTPUT >/dev/null
|
${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE p,l,g,d,b $OUTPUT >/dev/null
|
||||||
|
|
||||||
# Now the output should be identical to the regular grib
|
# Now the output should be identical to the regular grib
|
||||||
${tools_dir}grib_compare $REGUL_GRID_FILE $OUTPUT
|
${tools_dir}grib_compare $REGUL_GRID_FILE $OUTPUT
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
|
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
${examples_dir}set_missing > /dev/null
|
${examples_dir}c_set_missing > /dev/null
|
||||||
rm -f out_surface_level.grib2
|
rm -f out_surface_level.grib2
|
||||||
|
|
Loading…
Reference in New Issue