From b59c5d36d4604be269aa296656138279a6cdfaf0 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 19 Oct 2020 18:41:01 +0100 Subject: [PATCH 1/6] ECC-1159: Windows: MEMFS option does not work (initial) --- memfs.py | 64 +++++++++++++++++++++++++++----------------- memfs/CMakeLists.txt | 3 +++ 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/memfs.py b/memfs.py index f3864a992..21aaaeb21 100755 --- a/memfs.py +++ b/memfs.py @@ -4,9 +4,13 @@ import os import re import sys import binascii +import time assert len(sys.argv) > 2 +start = time.time() +print("MEMFS: starting") + # Exclude experimental features e.g. GRIB3 and TAF # The BUFR codetables is not used in the engine EXCLUDED = ["grib3", "codetables", "taf", "stations"] @@ -29,7 +33,7 @@ print("Excluding: ", EXCLUDED) FILES = {} SIZES = {} NAMES = [] -CHUNK = 5500 * 1000 # chunk size in bytes +CHUNK = 16 * 1024 * 1024 # chunk size in bytes # Binary to ASCII function. Different in Python 2 and 3 try: @@ -45,11 +49,12 @@ def get_outfile_name(base, count): # The last argument is the base name of the generated C file(s) output_file_base = sys.argv[-1] -totsize = 0 # amount written -fcount = 0 -opath = get_outfile_name(output_file_base, fcount) -print("MEMFS: Generating output: ", opath) -g = open(opath, "w") + +buffer = None +fcount = -1 + + + for directory in dirs: @@ -58,13 +63,21 @@ for directory in dirs: NAMES.append(dname) for dirpath, dirnames, files in os.walk(directory, followlinks=True): - # for ex in EXCLUDED: - # if ex in dirnames: - # print('Note: eccodes memfs.py script: %s/%s will not be included.' % (dirpath,ex)) + + # Prune the walk by modifying the dirnames in-place dirnames[:] = [dirname for dirname in dirnames if dirname not in EXCLUDED] for name in files: + + + if buffer is None: + fcount += 1 + opath = get_outfile_name(output_file_base, fcount) + print("MEMFS: Generating output:", opath) + buffer = open(opath, 'wb') + + full = "%s/%s" % (dirpath, name) _, ext = os.path.splitext(full) if ext not in [".def", ".table", ".tmpl", ".list", ".txt"]: @@ -72,8 +85,6 @@ for directory in dirs: if name == "CMakeLists.txt": continue - fsize = os.path.getsize(full) - totsize += fsize full = full.replace("\\", "/") fname = full[full.find("/%s/" % (dname,)) :] # print("MEMFS: Add ", fname) @@ -82,9 +93,10 @@ for directory in dirs: assert name not in FILES assert name not in SIZES FILES[name] = fname - SIZES[name] = fsize + SIZES[name] = os.path.getsize(full) - print("const unsigned char %s[] = {" % (name,), file=g) + txt = "const unsigned char %s[] = {" % (name,) + buffer.write(txt.encode()) with open(full, "rb") as f: i = 0 @@ -98,24 +110,24 @@ for directory in dirs: # e.g. 23 -> 0x23 for n in range(0, len(contents_hex), 2): twoChars = ascii(contents_hex[n : n + 2]) - print("0x%s," % (twoChars,), end="", file=g) + txt = "0x%s," % (twoChars,) + buffer.write(txt.encode()) i += 1 if (i % 20) == 0: - print("", file=g) + buffer.write("\n".encode()) - print("};", file=g) - if totsize >= CHUNK: - g.close() - fcount += 1 - opath = get_outfile_name(output_file_base, fcount) - print("MEMFS: Generating output: ", opath) - g = open(opath, "w") - totsize = 0 + buffer.write("};\n".encode()) + if buffer.tell() >= CHUNK: + buffer.close() + buffer = None + + +if buffer is not None: + buffer.close() -g.close() # The number of generated C files is hard coded. # See memfs/CMakeLists.txt -assert fcount == 3, fcount +assert fcount == 6, fcount opath = output_file_base + "_final.c" print("MEMFS: Generating output: ", opath) g = open(opath, "w") @@ -311,3 +323,5 @@ FILE* codes_memfs_open(const char* path) { ) print("Finished") + +print("MEMFS: done", time.time() - start) diff --git a/memfs/CMakeLists.txt b/memfs/CMakeLists.txt index 0f5da4be9..b1299d2ae 100644 --- a/memfs/CMakeLists.txt +++ b/memfs/CMakeLists.txt @@ -10,6 +10,9 @@ set( generated_c_files ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_001.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_002.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_003.c + ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_004.c + ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_005.c + ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_006.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_final.c) add_custom_command( From 149a6fcc0dbce28429ebd04645764872db3076d4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 20 Oct 2020 16:23:44 +0100 Subject: [PATCH 2/6] MEMFS: no need to use binary mode for output --- memfs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/memfs.py b/memfs.py index a2bb7c774..0dc951130 100755 --- a/memfs.py +++ b/memfs.py @@ -69,7 +69,7 @@ for directory in dirs: fcount += 1 opath = get_outfile_name(output_file_base, fcount) print("MEMFS: Generating output:", opath) - buffer = open(opath, 'wb') + buffer = open(opath, "w") full = "%s/%s" % (dirpath, name) _, ext = os.path.splitext(full) @@ -89,7 +89,7 @@ for directory in dirs: SIZES[name] = os.path.getsize(full) txt = "const unsigned char %s[] = {" % (name,) - buffer.write(txt.encode()) + buffer.write(txt) with open(full, "rb") as f: i = 0 @@ -104,12 +104,12 @@ for directory in dirs: for n in range(0, len(contents_hex), 2): twoChars = ascii(contents_hex[n : n + 2]) txt = "0x%s," % (twoChars,) - buffer.write(txt.encode()) + buffer.write(txt) i += 1 if (i % 20) == 0: - buffer.write("\n".encode()) + buffer.write("\n") - buffer.write("};\n".encode()) + buffer.write("};\n") if buffer.tell() >= CHUNK: buffer.close() buffer = None From 71a7ad6a250d1a9ef8ef334f344e58b33151fce9 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 20 Oct 2020 17:32:02 +0100 Subject: [PATCH 3/6] Rename tests --- examples/C/CMakeLists.txt | 6 +++--- examples/C/Makefile.am | 6 +++--- examples/C/{set_missing.c => grib_set_missing.c} | 0 examples/C/{set_missing.sh => grib_set_missing.sh} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename examples/C/{set_missing.c => grib_set_missing.c} (100%) rename examples/C/{set_missing.sh => grib_set_missing.sh} (92%) diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index 7452a1528..eb25fbe23 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -15,7 +15,7 @@ list( APPEND test_bins grib_print_data grib_set_keys grib_index - set_missing + grib_set_missing grib_keys_iterator grib_set_data mars_param @@ -83,7 +83,7 @@ if( HAVE_BUILD_TOOLS ) grib_get_data grib_nearest_multiple grib_multi - set_missing + grib_set_missing bufr_attributes bufr_copy_data bufr_clone @@ -117,7 +117,7 @@ else() grib_get_data grib_nearest_multiple grib_multi - set_missing + grib_set_missing bufr_attributes bufr_expanded bufr_get_keys diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am index 57933cf49..ed686f1d8 100644 --- a/examples/C/Makefile.am +++ b/examples/C/Makefile.am @@ -13,7 +13,7 @@ TESTS = grib_iterator.sh \ large_grib1.sh \ grib_get_data.sh \ grib_sections_copy.sh \ - set_missing.sh \ + grib_set_missing.sh \ grib_clone.sh \ grib_set_pv.sh \ grib_set_bitmap.sh \ @@ -37,7 +37,7 @@ noinst_PROGRAMS = c_grib_nearest \ c_grib_get_keys \ c_grib_print_data \ c_grib_set_keys \ - c_set_missing \ + c_grib_set_missing \ c_grib_keys_iterator \ c_grib_set_data \ c_grib_index \ @@ -84,7 +84,7 @@ c_grib_multi_write_SOURCES = grib_multi_write.c c_grib_get_keys_SOURCES = grib_get_keys.c c_grib_print_data_SOURCES = grib_print_data.c c_grib_set_keys_SOURCES = grib_set_keys.c -c_set_missing_SOURCES = set_missing.c +c_grib_set_missing_SOURCES = grib_set_missing.c c_grib_index_SOURCES = grib_index.c c_grib_set_bitmap_SOURCES = grib_set_bitmap.c c_grib_multi_SOURCES = grib_multi.c diff --git a/examples/C/set_missing.c b/examples/C/grib_set_missing.c similarity index 100% rename from examples/C/set_missing.c rename to examples/C/grib_set_missing.c diff --git a/examples/C/set_missing.sh b/examples/C/grib_set_missing.sh similarity index 92% rename from examples/C/set_missing.sh rename to examples/C/grib_set_missing.sh index a2d5b27d0..52167eee9 100755 --- a/examples/C/set_missing.sh +++ b/examples/C/grib_set_missing.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}/c_set_missing +${examples_dir}/c_grib_set_missing rm -f out_surface_level.grib2 From a1a66d170582c415741ec5324abdd0368dc2ee96 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 20 Oct 2020 17:36:25 +0100 Subject: [PATCH 4/6] Rename tests --- examples/F90/CMakeLists.txt | 4 ++-- examples/F90/Makefile.am | 6 +++--- examples/F90/{get_pl.f90 => grib_get_pl.f90} | 4 ++-- examples/F90/{get_pl.sh => grib_get_pl.sh} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename examples/F90/{get_pl.f90 => grib_get_pl.f90} (96%) rename examples/F90/{get_pl.sh => grib_get_pl.sh} (89%) diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 06a2583c1..e1c3b1c9d 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -18,7 +18,7 @@ if( HAVE_BUILD_TOOLS ) bufr_copy_message grib_get_keys grib_get_data - get_pl + grib_get_pl get_pv grib_keys_iterator grib_multi_write @@ -63,7 +63,7 @@ else() grib_index grib_get_keys grib_get_data - get_pl + grib_get_pl get_pv grib_keys_iterator grib_multi diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index cdf73fc85..79dde29a6 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -1,7 +1,7 @@ AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ @FORCE_32_CFLAGS@ -TESTS = grib_copy_message.sh grib_get_keys.sh grib_get_data.sh get_pl.sh get_pv.sh grib_keys_iterator.sh \ +TESTS = grib_copy_message.sh grib_get_keys.sh grib_get_data.sh grib_get_pl.sh get_pv.sh grib_keys_iterator.sh \ grib_nearest.sh grib_precision.sh grib_multi_write.sh grib_multi.sh \ grib_print_data.sh grib_set_keys.sh \ grib_set_bitmap.sh grib_set_missing.sh grib_set_pv.sh grib_samples.sh grib_count_messages.sh \ @@ -18,7 +18,7 @@ noinst_PROGRAMS = eccodes_f_grib_index \ eccodes_f_grib_copy_message \ eccodes_f_grib_get_keys \ eccodes_f_grib_get_data \ - eccodes_f_get_pl \ + eccodes_f_grib_get_pl \ eccodes_f_get_pv \ eccodes_f_grib_keys_iterator \ eccodes_f_grib_multi_write \ @@ -60,7 +60,7 @@ eccodes_f_grib_index_SOURCES=grib_index.f90 eccodes_f_grib_copy_message_SOURCES=grib_copy_message.f90 eccodes_f_grib_get_keys_SOURCES=grib_get_keys.f90 eccodes_f_grib_get_data_SOURCES=grib_get_data.f90 -eccodes_f_get_pl_SOURCES=get_pl.f90 +eccodes_f_grib_get_pl_SOURCES=grib_get_pl.f90 eccodes_f_get_pv_SOURCES=get_pv.f90 eccodes_f_grib_keys_iterator_SOURCES=grib_keys_iterator.f90 eccodes_f_grib_multi_write_SOURCES=grib_multi_write.f90 diff --git a/examples/F90/get_pl.f90 b/examples/F90/grib_get_pl.f90 similarity index 96% rename from examples/F90/get_pl.f90 rename to examples/F90/grib_get_pl.f90 index b364f4113..a13e1752a 100644 --- a/examples/F90/get_pl.f90 +++ b/examples/F90/grib_get_pl.f90 @@ -10,7 +10,7 @@ ! Description: how to get PL values. ! ! -program get_pl +program grib_get_pl use eccodes implicit none integer :: infile @@ -42,4 +42,4 @@ program get_pl call codes_close_file(infile) -end program get_pl +end program grib_get_pl diff --git a/examples/F90/get_pl.sh b/examples/F90/grib_get_pl.sh similarity index 89% rename from examples/F90/get_pl.sh rename to examples/F90/grib_get_pl.sh index 7001252b9..62448137e 100755 --- a/examples/F90/get_pl.sh +++ b/examples/F90/grib_get_pl.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}/eccodes_f_get_pl > /dev/null +${examples_dir}/eccodes_f_grib_get_pl > /dev/null From bc7bc629a65a59d6ddc3b08781910f6b0392754e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 20 Oct 2020 17:46:08 +0100 Subject: [PATCH 5/6] Rename tests --- examples/F90/CMakeLists.txt | 4 ++-- examples/F90/Makefile.am | 6 +++--- examples/F90/{get_pv.f90 => grib_get_pv.f90} | 4 ++-- examples/F90/{get_pv.sh => grib_get_pv.sh} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename examples/F90/{get_pv.f90 => grib_get_pv.f90} (96%) rename examples/F90/{get_pv.sh => grib_get_pv.sh} (89%) diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index e1c3b1c9d..af5a97f57 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -19,7 +19,7 @@ if( HAVE_BUILD_TOOLS ) grib_get_keys grib_get_data grib_get_pl - get_pv + grib_get_pv grib_keys_iterator grib_multi_write grib_multi @@ -64,7 +64,7 @@ else() grib_get_keys grib_get_data grib_get_pl - get_pv + grib_get_pv grib_keys_iterator grib_multi grib_nearest diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index 79dde29a6..068e72c91 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -1,7 +1,7 @@ AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@ @FORCE_32_CFLAGS@ -TESTS = grib_copy_message.sh grib_get_keys.sh grib_get_data.sh grib_get_pl.sh get_pv.sh grib_keys_iterator.sh \ +TESTS = grib_copy_message.sh grib_get_keys.sh grib_get_data.sh grib_get_pl.sh grib_get_pv.sh grib_keys_iterator.sh \ grib_nearest.sh grib_precision.sh grib_multi_write.sh grib_multi.sh \ grib_print_data.sh grib_set_keys.sh \ grib_set_bitmap.sh grib_set_missing.sh grib_set_pv.sh grib_samples.sh grib_count_messages.sh \ @@ -19,7 +19,7 @@ noinst_PROGRAMS = eccodes_f_grib_index \ eccodes_f_grib_get_keys \ eccodes_f_grib_get_data \ eccodes_f_grib_get_pl \ - eccodes_f_get_pv \ + eccodes_f_grib_get_pv \ eccodes_f_grib_keys_iterator \ eccodes_f_grib_multi_write \ eccodes_f_grib_multi \ @@ -61,7 +61,7 @@ eccodes_f_grib_copy_message_SOURCES=grib_copy_message.f90 eccodes_f_grib_get_keys_SOURCES=grib_get_keys.f90 eccodes_f_grib_get_data_SOURCES=grib_get_data.f90 eccodes_f_grib_get_pl_SOURCES=grib_get_pl.f90 -eccodes_f_get_pv_SOURCES=get_pv.f90 +eccodes_f_grib_get_pv_SOURCES=grib_get_pv.f90 eccodes_f_grib_keys_iterator_SOURCES=grib_keys_iterator.f90 eccodes_f_grib_multi_write_SOURCES=grib_multi_write.f90 eccodes_f_grib_multi_SOURCES=grib_multi.f90 diff --git a/examples/F90/get_pv.f90 b/examples/F90/grib_get_pv.f90 similarity index 96% rename from examples/F90/get_pv.f90 rename to examples/F90/grib_get_pv.f90 index dcfcdb77a..2fcf8a26e 100644 --- a/examples/F90/get_pv.f90 +++ b/examples/F90/grib_get_pv.f90 @@ -10,7 +10,7 @@ ! Description: how to get PV values. ! ! -program get_pv +program grib_get_pv use eccodes implicit none integer :: infile @@ -42,4 +42,4 @@ program get_pv call codes_close_file(infile) -end program get_pv +end program grib_get_pv diff --git a/examples/F90/get_pv.sh b/examples/F90/grib_get_pv.sh similarity index 89% rename from examples/F90/get_pv.sh rename to examples/F90/grib_get_pv.sh index 568d8701c..c0dca3755 100755 --- a/examples/F90/get_pv.sh +++ b/examples/F90/grib_get_pv.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}/eccodes_f_get_pv > /dev/null +${examples_dir}/eccodes_f_grib_get_pv > /dev/null From cdda46accfd84e5fdb8ab6f4cbc47a90f281ca6e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 20 Oct 2020 18:04:01 +0100 Subject: [PATCH 6/6] Rename tests --- examples/F90/CMakeLists.txt | 4 ++-- examples/F90/Makefile.am | 12 ++++++------ .../F90/{get_set_uuid.f90 => grib_get_set_uuid.f90} | 4 ++-- .../F90/{get_set_uuid.sh => grib_get_set_uuid.sh} | 2 +- .../F90/{read_message.f90 => grib_read_message.f90} | 4 ++-- .../F90/{read_message.sh => grib_read_message.sh} | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) rename examples/F90/{get_set_uuid.f90 => grib_get_set_uuid.f90} (98%) rename examples/F90/{get_set_uuid.sh => grib_get_set_uuid.sh} (93%) rename examples/F90/{read_message.f90 => grib_read_message.f90} (96%) rename examples/F90/{read_message.sh => grib_read_message.sh} (90%) diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index af5a97f57..c2cd8aee9 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -33,9 +33,9 @@ if( HAVE_BUILD_TOOLS ) grib_count_messages grib_count_messages_multi grib_copy_namespace - read_message + grib_read_message read_from_file - get_set_uuid + grib_get_set_uuid grib_clone bufr_attributes bufr_copy_data diff --git a/examples/F90/Makefile.am b/examples/F90/Makefile.am index 068e72c91..6530fe905 100644 --- a/examples/F90/Makefile.am +++ b/examples/F90/Makefile.am @@ -5,8 +5,8 @@ TESTS = grib_copy_message.sh grib_get_keys.sh grib_get_data.sh grib_get_pl.sh gr grib_nearest.sh grib_precision.sh grib_multi_write.sh grib_multi.sh \ grib_print_data.sh grib_set_keys.sh \ grib_set_bitmap.sh grib_set_missing.sh grib_set_pv.sh grib_samples.sh grib_count_messages.sh \ - read_message.sh grib_count_messages_multi.sh \ - read_from_file.sh grib_index.sh get_set_uuid.sh \ + grib_read_message.sh grib_count_messages_multi.sh \ + read_from_file.sh grib_index.sh grib_get_set_uuid.sh \ bufr_attributes.sh grib_clone.sh bufr_clone.sh \ bufr_expanded.sh bufr_get_keys.sh bufr_get_string_array.sh \ bufr_read_header.sh bufr_read_synop.sh \ @@ -34,11 +34,11 @@ noinst_PROGRAMS = eccodes_f_grib_index \ eccodes_f_grib_samples \ eccodes_f_grib_count_messages \ eccodes_f_grib_count_messages_multi \ - eccodes_f_read_message \ + eccodes_f_grib_read_message \ eccodes_f_read_from_file \ eccodes_f_new_from_file \ eccodes_f_grib_copy_namespace \ - eccodes_f_get_set_uuid \ + eccodes_f_grib_get_set_uuid \ eccodes_f_grib_set_gvc \ eccodes_f_grib_clone \ eccodes_f_bufr_clone \ @@ -76,11 +76,11 @@ eccodes_f_grib_set_pv_SOURCES=grib_set_pv.f90 eccodes_f_grib_samples_SOURCES=grib_samples.f90 eccodes_f_grib_count_messages_SOURCES=grib_count_messages.f90 eccodes_f_grib_count_messages_multi_SOURCES=grib_count_messages_multi.f90 -eccodes_f_read_message_SOURCES=read_message.f90 +eccodes_f_grib_read_message_SOURCES=grib_read_message.f90 eccodes_f_read_from_file_SOURCES=read_from_file.f90 eccodes_f_new_from_file_SOURCES=new_from_file.f90 eccodes_f_grib_copy_namespace_SOURCES=grib_copy_namespace.f90 -eccodes_f_get_set_uuid_SOURCES=get_set_uuid.f90 +eccodes_f_grib_get_set_uuid_SOURCES=grib_get_set_uuid.f90 eccodes_f_grib_set_gvc_SOURCES=grib_set_gvc.f90 eccodes_f_grib_clone_SOURCES=grib_clone.f90 eccodes_f_bufr_attributes_SOURCES=bufr_attributes.f90 diff --git a/examples/F90/get_set_uuid.f90 b/examples/F90/grib_get_set_uuid.f90 similarity index 98% rename from examples/F90/get_set_uuid.f90 rename to examples/F90/grib_get_set_uuid.f90 index 097285987..17a812a3b 100644 --- a/examples/F90/get_set_uuid.f90 +++ b/examples/F90/grib_get_set_uuid.f90 @@ -11,7 +11,7 @@ ! ! Original authors: Harald Anlauf, Doerte Liermann (DWD), Luis Kornblueh (MPIfM). ! -program get_set_uuid +program grib_get_set_uuid use eccodes implicit none integer :: infile, outfile @@ -97,4 +97,4 @@ contains nibble = achar (iachar ('a') - 10 + x) end select end function nibble -end program get_set_uuid +end program grib_get_set_uuid diff --git a/examples/F90/get_set_uuid.sh b/examples/F90/grib_get_set_uuid.sh similarity index 93% rename from examples/F90/get_set_uuid.sh rename to examples/F90/grib_get_set_uuid.sh index cf512b777..66254cf75 100755 --- a/examples/F90/get_set_uuid.sh +++ b/examples/F90/grib_get_set_uuid.sh @@ -14,7 +14,7 @@ uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.gr [ "$uuid" = "08b1e836bc6911e1951fb51b5624ad8d" ] # This reads the file in data/test_uuid.grib2 and creates test_uuid.grib2 -${examples_dir}/eccodes_f_get_set_uuid > /dev/null +${examples_dir}/eccodes_f_grib_get_set_uuid > /dev/null # Check output was written output=out_uuid.grib2 diff --git a/examples/F90/read_message.f90 b/examples/F90/grib_read_message.f90 similarity index 96% rename from examples/F90/read_message.f90 rename to examples/F90/grib_read_message.f90 index cb4dee699..ac0f80ff2 100644 --- a/examples/F90/read_message.f90 +++ b/examples/F90/grib_read_message.f90 @@ -8,7 +8,7 @@ ! ! Description: how to get values using keys. ! -program read_message +program grib_read_message use eccodes implicit none integer :: ifile,ofile @@ -49,5 +49,5 @@ implicit none call codes_close_file(ifile) call codes_close_file(ofile) -end program read_message +end program grib_read_message diff --git a/examples/F90/read_message.sh b/examples/F90/grib_read_message.sh similarity index 90% rename from examples/F90/read_message.sh rename to examples/F90/grib_read_message.sh index 04d6cbcfe..639fc4c97 100755 --- a/examples/F90/read_message.sh +++ b/examples/F90/grib_read_message.sh @@ -14,7 +14,7 @@ out=out.readmsg.grib rm -f $out | true -${examples_dir}/eccodes_f_read_message > /dev/null +${examples_dir}/eccodes_f_grib_read_message > /dev/null ${tools_dir}/grib_compare $in $out