ICON Community Interface 0.4.0
Loading...
Searching...
No Matches
comin_print.F90
Go to the documentation of this file.
1
3!
4! @authors 08/2021 :: ICON Community Interface <comin@icon-model.org>
5!
6! SPDX-License-Identifier: BSD-3-Clause
7!
8! See LICENSES for license information.
9! Where software is supplied by third parties, it is indicated in the
10! headers of the routines.
11!
13
14 USE comin_state, ONLY: state
16 USE iso_c_binding, ONLY: c_ptr
17
18 PUBLIC :: comin_print_debug
19 PUBLIC :: comin_print_info
20 PUBLIC :: comin_print_warning
21
22CONTAINS
23
27 SUBROUTINE comin_print_debug(msg)
28 CHARACTER(LEN=*), INTENT(IN) :: msg
29
30 IF (state%lstdout .AND. state%current_plugin%log_debug) THEN
31 WRITE(state%output_unit, *) "DEBUG(" // state%current_plugin%name // "): " // trim(msg)
32 END IF
33 END SUBROUTINE comin_print_debug
34
35 ! C-wrapper
36 SUBROUTINE comin_print_debug_c(msg) &
37 BIND(C, name="comin_print_debug")
38 TYPE(c_ptr), VALUE, INTENT(IN) :: msg
39
41 END SUBROUTINE comin_print_debug_c
42
46 SUBROUTINE comin_print_info(msg)
47 CHARACTER(LEN=*), INTENT(IN) :: msg
48
49 IF (state%lstdout .AND. state%current_plugin%log_info) THEN
50 WRITE(state%output_unit, *) "INFO(" // state%current_plugin%name // "): " // trim(msg)
51 END IF
52 END SUBROUTINE comin_print_info
53
54 ! C-wrapper
55 SUBROUTINE comin_print_info_c(msg) &
56 BIND(C, name="comin_print_info")
57 TYPE(c_ptr), VALUE, INTENT(IN) :: msg
58
60 END SUBROUTINE comin_print_info_c
61
65 SUBROUTINE comin_print_warning(msg)
66 CHARACTER(LEN=*), INTENT(IN) :: msg
67
68 IF (state%lstdout .AND. state%current_plugin%log_warning) THEN
69 WRITE(state%output_unit, *) "WARNING(" // state%current_plugin%name // "): " // trim(msg)
70 END IF
71 END SUBROUTINE comin_print_warning
72
73 ! C-wrapper
74 SUBROUTINE comin_print_warning_c(msg) &
75 BIND(C, name="comin_print_warning")
76 TYPE(c_ptr), VALUE, INTENT(IN) :: msg
77
79 END SUBROUTINE comin_print_warning_c
80
81END MODULE comin_print
subroutine, public comin_print_info(msg)
Prints a info message if the plugin has set log_info (enabled per default) The message will only be p...
subroutine, public comin_print_warning(msg)
Prints a warning if the plugin has set log_warning (enabled per default) The message will only be pri...
subroutine, public comin_print_debug(msg)
Prints a debug message if the plugin has set log_debug (disabled per default) The message will only b...
subroutine comin_print_debug_c(msg)
subroutine comin_print_info_c(msg)
subroutine comin_print_warning_c(msg)
type(t_comin_state), pointer, public state