2Test plugin for the ICON Community Interface (ComIn)
4Creates variables with different datatypes and checks the corresponding buffer
6@authors 12/2024 :: ICON Community Interface <comin@icon-model.org>
8SPDX-License-Identifier: BSD-3-Clause
10Please see the file LICENSE in the root of the source tree for this code.
11Where software is supplied by third parties, it is indicated in the
12headers of the routines.
20 "dp": comin.COMIN_VAR_DATATYPE_DOUBLE,
21 "sp": comin.COMIN_VAR_DATATYPE_FLOAT,
22 "i": comin.COMIN_VAR_DATATYPE_INT,
30for name, comin_dt
in comin_datatypes.items():
31 descr = (
"test_var_" + name, 1)
32 comin.var_request_add(descr,
False)
39@comin.EP_SECONDARY_CONSTRUCTOR
42 flag = comin.COMIN_FLAG_READ | comin.COMIN_FLAG_WRITE
45 [comin.EP_ATM_TIMELOOP_START], (
"test_var_" + name, 1), flag
47 for name, comin_dt
in comin_datatypes.items()
51@comin.EP_ATM_TIMELOOP_START
53 for name, var_handle
in var_handles.items():
55 np.asarray(var_handle).dtype == numpy_datatypes[name]
56 ), f
"Check for {name} unsuccessful ({np.asarray(var_handle).dtype} != {numpy_datatypes[name]})"
57 comin.print_info(f
"Check for {name} successful ({numpy_datatypes[name]})")
var_get(context, var_descriptor, flag)
get variable object, arguments: [entry point], (name string, domain id), access flag)
metadata_set(var_descriptor, **kwargs)
sets metadata for a requested field, arguments: name string, domain id, metadata key,...
simple_python_constructor()