9#include "test_macros.inc"
13 use,
INTRINSIC :: iso_c_binding
18 CHARACTER(LEN=1024) :: grid_dir
21 FUNCTION utest_file_exists_c ( path ) bind ( c, name='yac_file_exists' )
22 use,
INTRINSIC :: iso_c_binding, only : c_char, c_int
23 CHARACTER(KIND=c_char),
DIMENSION(*) :: path
24 INTEGER(KIND=c_int) :: utest_file_exists_c
25 END FUNCTION utest_file_exists_c
30 CALL utest_start_test(
'read_icon')
32 CALL test(command_argument_count() == 1)
34 IF (command_argument_count() /= 1)
THEN
35 print *,
"ERROR: missing grid file directory"
39 CALL get_command_argument(1, grid_dir)
43 utest_file_exists_c( &
44 trim(grid_dir)//
"icon_grid_R02B01.nc"//c_null_char))
THEN
53 TYPE(c_ptr) :: icon_grid
57 trim(grid_dir)//
"icon_grid_R02B01.nc"//c_null_char, &