ICON Community Interface 0.4.0
Loading...
Searching...
No Matches
comin_errhandler_constants.F90
Go to the documentation of this file.
1
3!
4! @authors 09/2023 :: ICON Community Interface <icon@dwd.de>
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 IMPLICIT NONE
15
16 PUBLIC
17#include "comin_global.inc"
18
21 ENUM, BIND(C)
22 ENUMERATOR :: comin_success = 0, &
23 & COMIN_INFO, &
24 & COMIN_WARNING, &
25 & COMIN_ERROR_STATUS, &
26 & COMIN_ERROR_CALLBACK_REGISTER_OUTSIDE_PRIMARYCONSTRUCTOR, &
27 & COMIN_ERROR_CALLBACK_COMPLETE, &
28 & COMIN_ERROR_CALLBACK_EP_ID_UNKNOWN, &
29 & COMIN_ERROR_DESCRDATA_SET_FCT_GLB2LOC, &
30 & COMIN_ERROR_DESCRDATA_FINALIZE, &
31 & COMIN_ERROR_METADATA_SET_OUTSIDE_PRIMARYCONSTRUCTOR, &
32 & COMIN_ERROR_METADATA_KEY_NOT_FOUND, &
33 & COMIN_ERROR_METADATA_GET_INSIDE_PRIMARYCONSTRUCTOR, &
34 & COMIN_ERROR_SETUP_FINALIZE, &
35 & COMIN_ERROR_SETUP_COMIN_ALREADY_INITIALIZED, &
36 & COMIN_ERROR_PLUGIN_INIT_COMIN_VERSION, &
37 & COMIN_ERROR_PLUGIN_INIT_PRECISION, &
38 & COMIN_ERROR_PLUGIN_INIT_STATE_INITIALIZED, &
39 & COMIN_ERROR_SETUP_ERRHANDLER_NOT_ASSOCIATED, &
40 & COMIN_ERROR_SETUP_ERRHANDLER_NOT_SET, &
41 & COMIN_ERROR_SETUP_PRECISION_TEST_FAILED, &
42 & COMIN_ERROR_VAR_REQUEST_AFTER_PRIMARYCONSTRUCTOR, &
43 & COMIN_ERROR_VAR_REQUEST_EXISTS_IS_LMODEXCLUSIVE, &
44 & COMIN_ERROR_VAR_REQUEST_EXISTS_REQUEST_LMODEXCLUSIVE, &
45 & COMIN_ERROR_VAR_DESCRIPTOR_NOT_FOUND, &
46 & COMIN_ERROR_VAR_ITEM_NOT_ASSOCIATED, &
47 & COMIN_ERROR_FIELD_NOT_ALLOCATED, &
48 & COMIN_ERROR_POINTER_NOT_ASSOCIATED, &
49 & COMIN_ERROR_TRACER_REQUEST_NOT_FOR_ALL_DOMAINS, &
50 & COMIN_ERROR_VAR_SYNC_DEVICE_MEM_NOT_ASSOCIATED, &
51 & COMIN_ERROR_VAR_SYNC_HALO_NOT_ASSOCIATED, &
52 & COMIN_ERROR_VAR_GET_OUTSIDE_SECONDARY_CONSTRUCTOR, &
53 & COMIN_ERROR_VAR_GET_NO_DEVICE, &
54 & COMIN_ERROR_VAR_GET_VARIABLE_NOT_FOUND, &
55 & COMIN_ERROR_VAR_GET_CONTAINER_CAN_NOT_HALO_SYNCHRONIZED, &
56 & COMIN_ERROR_VAR_GET_IRREGULAR_VAR_CAN_NOT_HALO_SYNCHRONIZED, &
57 & COMIN_ERROR_VAR_SYNC_HALO_NOT_SUPPORTED_ZAXIS, &
58 & COMIN_ERROR_VAR_METADATA_INCONSISTENT_TYPE, &
59 & COMIN_ERROR_VAR_GET_VARIABLE_WRONG_TYPE, &
60 & COMIN_ERROR_FATAL
61 end ENUM
62
63CONTAINS
64
65 FUNCTION comin_errhandler_get_string(err_code) RESULT(string)
66 CHARACTER(LEN=COMIN_MAX_LEN_ERR_MESSAGE) :: string
67 INTEGER, INTENT(IN) :: err_code
68
69 SELECT CASE(err_code)
70 CASE(comin_success)
71 string = "Success"
72 CASE(comin_info)
73 string = "Info"
74 CASE(comin_warning)
75 string = "Warning"
77 string = "Error"
79 string = "Callbacks cannot be registered after primary constructor."
81 string = "Callback registration could not be completed."
83 string = "Unknown id for ENTRY point."
85 string = "Unable to set descriptive DATA FUNCTION: glb2loc. FUNCTION not associated."
87 string = "Unable to clean up descriptive DATA structure (finalize)."
89 string = "Cannot set metadata outside primary constructor."
91 string = "Metadata key not found."
93 string = "Unable to get metadata inside primary constructor."
95 string = "Setup finalized failed."
97 string = "ComIn is already initilized."
99 string = "Host and plugin are using incompatible ComIn versions."
101 string = "Host and plugin are using incompatible PRECISION (wp)."
103 string = "State is already initialized WITH a different state."
105 string = "The host model error handler PROCEDURE cannot be found."
107 string = "Error handler not set (setup check)."
109 string = "PRECISION test failed (setup check)."
111 string = "Variables cannot be requested after primary constructor."
113 string = "Requested variable already exists and is exclusive."
115 string = "Requested exclusive variable already exists."
117 string = "var_descriptor not found."
119 string = "var_item not associated."
121 string = "Filed not allocated."
123 string = "POINTER not associated."
125 string = "Traers need to be requested for all domains (id=-1)."
127 string = "Sync device memory callback not set (setup check)."
129 string = "Sync halo callback not set (setup check)."
131 string = "Cannot get variable outside of secondary constructor"
133 string = "No device available"
135 string = "Cannot find variable"
137 string = "Cannot halo sync a container"
139 string = "Cannot halo sync an irregular variable"
141 string = "Can only halo sync vars on 2D or 3D vertical grid"
143 string = "Wrong type used requesting the pointer of a variable"
145 string = "Fatal error"
146 END SELECT
147 END FUNCTION comin_errhandler_get_string
character(len=comin_max_len_err_message) function comin_errhandler_get_string(err_code)