Examples: Cleanup

This commit is contained in:
Shahram Najm 2022-12-08 15:06:58 +00:00
parent 1b5f78f275
commit ee6a747f18
2 changed files with 5 additions and 3 deletions

View File

@ -18,7 +18,7 @@ program copy_namespace
call codes_open_file(file1, '../../data/reduced_latlon_surface.grib2', 'r') call codes_open_file(file1, '../../data/reduced_latlon_surface.grib2', 'r')
call codes_open_file(file2, '../../data/regular_latlon_surface.grib1', 'r') call codes_open_file(file2, '../../data/regular_latlon_surface.grib1', 'r')
call codes_open_file(file3, 'out.grib_copy_namespace.grib', 'w') call codes_open_file(file3, 'temp.grib_copy_namespace_test_f.grib', 'w')
call codes_grib_new_from_file(file1, igrib1) call codes_grib_new_from_file(file1, igrib1)
call codes_grib_new_from_file(file2, igrib2) call codes_grib_new_from_file(file2, igrib2)

View File

@ -16,8 +16,10 @@ INPUT=../../data/regular_latlon_surface.grib1
res=`${tools_dir}/grib_get -p Ni,Nj $INPUT` res=`${tools_dir}/grib_get -p Ni,Nj $INPUT`
[ "$res" = "16 31" ] [ "$res" = "16 31" ]
#The input and output BUFR files are hardcoded in the f90 example!!! # Note: The input and output GRIB files are hardcoded in the example!
OUTPUT=out.grib_copy_namespace.grib # The output is a clone of the regular lat/lon but then
# we copy the reduced lat/lon geography namespace to the output
OUTPUT=temp.$label.grib
${examples_dir}/eccodes_f_grib_copy_namespace ${examples_dir}/eccodes_f_grib_copy_namespace
res=`${tools_dir}/grib_get -p Ni,Nj $OUTPUT` res=`${tools_dir}/grib_get -p Ni,Nj $OUTPUT`