12 use fckit_configuration_module,
only: fckit_configuration
13 use,
intrinsic :: iso_c_binding
16 use fckit_log_module,
only : fckit_log
32 type(c_ptr),
intent(in),
value :: c_conf
33 type(c_ptr),
intent(in),
value :: c_vars
35 character(len=*),
parameter :: myname_=
"test_vars_interface"
36 type(fckit_configuration) :: f_conf
38 character(len=:),
allocatable :: test_vars(:), varlist(:)
39 character(var_length) :: varname
40 character(max_string) :: err_msg
43 f_conf = fckit_configuration(c_conf)
47 call f_conf%get_or_die(
"test variables",test_vars)
48 call vars%push_back(test_vars)
52 call vars%push_back(varname)
55 varlist = vars%varlist()
57 do jvar = 1,
size(test_vars)
58 if (trim(test_vars(jvar)) /= trim(varlist(jvar)))
then
59 write(err_msg,*) myname_ //
" varlist incorrect: ", jvar, &
60 & trim(test_vars(jvar)) //
" /= " // trim(varlist(jvar))
61 call abor1_ftn(err_msg)
66 if (trim(varname) /= trim(varlist(jvar)))
then
67 write(err_msg,*) myname_ //
" varlist incorrect: ", jvar, &
68 & trim(varname) //
" /= " // trim(varlist(jvar))
69 call abor1_ftn(err_msg)
74 end module test_oops_variables
Fortran interface to Variables.
Test interface for oops variables.
integer, parameter var_length
subroutine c_test_vars_interface(c_conf, c_vars)
Test uniform real distribution.
integer, parameter max_string