23 & comin_descrdata_get_global, t_comin_descrdata_global, &
25 & ep_secondary_constructor, ep_atm_write_output_before, &
26 & comin_flag_read, comin_flag_write, &
28 & comin_domain_outside_loop, &
32 & comin_dim_semantics_level, comin_dim_semantics_nproma, &
33 & comin_dim_semantics_block
38 INTEGER,
PARAMETER ::
wp = selected_real_kind(12,307)
52 LOGICAL,
INTENT(IN) :: cond
53 CHARACTER(len=*),
INTENT(IN) :: message
54 IF (.NOT. cond)
CALL comin_plugin_finish(
'simple_fortran_constructor',
'Assertion failed: ' // message)
65 TYPE(t_comin_setup_version_info) :: version
66 TYPE(t_comin_metadata_rw) :: meta
70 IF (version%version_no_major > 1) &
74 p_global = comin_descrdata_get_global()
81 CALL meta%set(
"tracer", .false.)
82 CALL meta%set(
"restart", .false.)
83 CALL meta%set(
"groups", [
"mygroup" ])
90 CALL meta%set(
"tracer", .true.)
91 CALL meta%set(
"restart", .false.)
105 INTEGER :: dim_semantics(5)
115 CALL assert(
pres%valid(),
"handle for 'pres' is valid")
130 & all(dim_semantics(1:3) == [comin_dim_semantics_nproma, comin_dim_semantics_level, comin_dim_semantics_block]), &
131 &
"'example_fortran_var' dimension semantics are nproma, level, block")
134 CALL meta%get(
"tracer", tracer)
135 CALL assert(tracer,
"'example_fortran_tracer' is a tracer")
144 REAL(wp),
POINTER :: &
145 & example_fortran_ptr(:,:,:,:,:), pres_ptr(:,:,:,:,:), tracer_slice(:,:,:)
151 IF (domain_id == comin_domain_outside_loop)
THEN
154 WRITE(
text,
'(a,i0)')
" currently on domain ", domain_id
160 CALL pres%get_ptr(pres_ptr)
161 example_fortran_ptr = pres_ptr + 42
165 tracer_slice(1,9,1) = 1.0
void comin_plugin_finish(const char *routine, const char *text)
void comin_print_info(const char *msg)
void comin_setup_get_version(unsigned int *major, unsigned int *minor, unsigned int *patch)
t_comin_metadata * comin_var_request_get_metadata(const t_comin_var_descriptor *desc)
void comin_var_request_add(const t_comin_var_descriptor *var_desc, bool lmodexclusive)
t_comin_var_handle comin_var_get(int context_len, const t_comin_entry_point context[], const t_comin_var_descriptor *var_descriptor, int flag)
Get a variable handle for the given entry points.
const t_comin_metadata * comin_var_get_metadata(const t_comin_var_descriptor *desc)
int comin_current_get_domain_id()
void comin_callback_register(t_comin_entry_point entry_point, t_comin_callback_function fct_ptr)
Example plugin for the ICON Community Interface (ComIn).
type(t_comin_var_handle) example_fortran_var
type(t_comin_var_handle) example_fortran_tracer
subroutine simple_fortran_diagfct()
subroutine simple_fortran_constructor()
integer, parameter wp
working precision
subroutine assert(cond, message)
character(len=200) text
text buffer for printing
type(t_comin_descrdata_global) p_global
access descriptive data structures
type(t_comin_var_handle) pres
handles for custom ICON variables