diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 2f0924fef..4db9170d1 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -10,6 +10,7 @@ if( HAVE_BUILD_TOOLS ) list( APPEND tests_sanity codes_ecc-1392 codes_datetime_julian + codes_set_paths grib_set_pv grib_set_data bufr_ecc-1284 @@ -65,6 +66,7 @@ else() list( APPEND tests_sanity grib_set_pv grib_set_data + codes_set_paths get_native_type grib_ecc-671 ) list( APPEND tests_extra diff --git a/examples/F90/codes_dump.f90 b/examples/F90/codes_dump.f90 index 7c09fb24e..b68c68e51 100644 --- a/examples/F90/codes_dump.f90 +++ b/examples/F90/codes_dump.f90 @@ -7,7 +7,7 @@ ! virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. ! ! -program grib_dump_test +program codes_dump_test use eccodes implicit none integer :: ifile, iret, msgid diff --git a/examples/F90/codes_set_paths.f90 b/examples/F90/codes_set_paths.f90 new file mode 100644 index 000000000..7511ae3eb --- /dev/null +++ b/examples/F90/codes_set_paths.f90 @@ -0,0 +1,21 @@ +! (C) Copyright 2005- 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. +! +! +program codes_set_paths + use eccodes + implicit none + + character(len=512) :: samples_path, defs_path + + samples_path = "/tmp/samples" + defs_path = "/tmp/defs" + call codes_set_samples_path(samples_path) + call codes_set_definitions_path(defs_path) + +end program diff --git a/examples/F90/codes_set_paths.sh b/examples/F90/codes_set_paths.sh new file mode 100755 index 000000000..dc43d6865 --- /dev/null +++ b/examples/F90/codes_set_paths.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +export ECCODES_DEBUG=1 +${examples_dir}/eccodes_f_codes_set_paths