56 module fms_yaml_output_mod
67 public :: yaml_out_add_level2key
68 public :: string_len_parameter
71 integer,
parameter :: string_len_parameter = 255
78 type,
bind(c) :: fmsYamlOutKeys_type
79 character (c_char) :: key1 (string_len_parameter)
80 character (c_char) :: key2 (string_len_parameter)
81 character (c_char) :: key3 (string_len_parameter)
82 character (c_char) :: key4 (string_len_parameter)
83 character (c_char) :: key5 (string_len_parameter)
84 character (c_char) :: key6 (string_len_parameter)
85 character (c_char) :: key7 (string_len_parameter)
86 character (c_char) :: key8 (string_len_parameter)
87 character (c_char) :: key9 (string_len_parameter)
88 character (c_char) :: key10 (string_len_parameter)
89 character (c_char) :: key11 (string_len_parameter)
90 character (c_char) :: key12 (string_len_parameter)
91 character (c_char) :: key13 (string_len_parameter)
92 character (c_char) :: key14 (string_len_parameter)
93 character (c_char) :: key15 (string_len_parameter)
94 character (c_char) :: key16 (string_len_parameter)
95 character (c_char) :: level2key (string_len_parameter * lvl2_key_parameter)
96 integer(c_int) :: level2key_offset
99 type,
bind(c) :: fmsYamlOutValues_type
100 character (c_char) :: val1 (string_len_parameter)
101 character (c_char) :: val2 (string_len_parameter)
102 character (c_char) :: val3 (string_len_parameter)
103 character (c_char) :: val4 (string_len_parameter)
104 character (c_char) :: val5 (string_len_parameter)
105 character (c_char) :: val6 (string_len_parameter)
106 character (c_char) :: val7 (string_len_parameter)
107 character (c_char) :: val8 (string_len_parameter)
108 character (c_char) :: val9 (string_len_parameter)
109 character (c_char) :: val10 (string_len_parameter)
110 character (c_char) :: val11 (string_len_parameter)
111 character (c_char) :: val12 (string_len_parameter)
112 character (c_char) :: val13 (string_len_parameter)
113 character (c_char) :: val14 (string_len_parameter)
114 character (c_char) :: val15 (string_len_parameter)
115 character (c_char) :: val16 (string_len_parameter)
121 key3, val3, lvl2keyeach)
bind(C, name="write_yaml_from_struct_3")
124 character (c_char) :: yamlname
125 integer (c_int),
value :: a1size
126 type (fmsYamlOutKeys_type) :: keys(a1size)
127 type (fmsYamlOutValues_type) :: vals(a1size)
128 integer (c_int),
value :: a2size
129 type (fmsYamlOutKeys_type) :: key2(a2size)
130 type (fmsYamlOutValues_type) :: val2(a2size)
131 integer (c_int),
value :: a3size
132 integer (c_int) :: a3each (a2size)
135 type (fmsYamlOutKeys_type) :: key3(a3size)
136 type (fmsYamlOutValues_type) :: val3(a3size)
137 integer (c_int) :: lvl2keyeach(lvl2_key_parameter)
144 character(c_char),
intent(in) :: key_name
145 integer(c_int),
value :: key_length
155 subroutine yaml_out_add_level2key(key_name, keytype)
156 character(len=*) :: key_name
164 call fms_f2c_string (yk%key1,
"")
165 call fms_f2c_string (yk%key2,
"")
166 call fms_f2c_string (yk%key3,
"")
167 call fms_f2c_string (yk%key4,
"")
168 call fms_f2c_string (yk%key5,
"")
169 call fms_f2c_string (yk%key6,
"")
170 call fms_f2c_string (yk%key7,
"")
171 call fms_f2c_string (yk%key8,
"")
172 call fms_f2c_string (yk%key9,
"")
173 call fms_f2c_string (yk%key10,
"")
174 call fms_f2c_string (yk%key11,
"")
175 call fms_f2c_string (yk%key12,
"")
176 call fms_f2c_string (yk%key13,
"")
177 call fms_f2c_string (yk%key14,
"")
178 call fms_f2c_string (yk%key15,
"")
179 call fms_f2c_string (yk%key16,
"")
180 call fms_f2c_string(yk%level2key,
"")
181 yk%level2key_offset = -1
187 call fms_f2c_string (yv%val1,
"")
188 call fms_f2c_string (yv%val2,
"")
189 call fms_f2c_string (yv%val3,
"")
190 call fms_f2c_string (yv%val4,
"")
191 call fms_f2c_string (yv%val5,
"")
192 call fms_f2c_string (yv%val6,
"")
193 call fms_f2c_string (yv%val7,
"")
194 call fms_f2c_string (yv%val8,
"")
195 call fms_f2c_string (yv%val9,
"")
196 call fms_f2c_string (yv%val10,
"")
197 call fms_f2c_string (yv%val11,
"")
198 call fms_f2c_string (yv%val12,
"")
199 call fms_f2c_string (yv%val13,
"")
200 call fms_f2c_string (yv%val14,
"")
201 call fms_f2c_string (yv%val15,
"")
202 call fms_f2c_string (yv%val16,
"")
206 end module fms_yaml_output_mod
subroutine, public fms_f2c_string(dest, str_in)
Copies a Fortran string into a C string and puts c_null_char in any trailing spaces.
subroutine, public initialize_val_struct(yv)
integer, parameter lvl2_key_parameter
Max number of strings to be stored in lvl2keys Must match whats in yaml_output_functions....
subroutine, public initialize_key_struct(yk)
Keys for the output yaml on a given level corresponding to the struct in yaml_output_functions....
Values for the output yaml on a given level corresponding to the struct in yaml_output_functions....
Adds a level 2 key (key that starts new tabbed section) to the list. yaml_out_add_level2key (wrapper ...