9 #ifdef enable_action_msgs
10 nclayer_enable_action, nclayer_actionm, &
29 integer(i_llong),
intent(in) :: addl_num_entries
30 logical,
intent(in),
optional :: update_acount_in
35 integer(i_long) :: sc_index
36 integer(i_long) :: sc_index_vi
38 logical :: update_acount
41 if (.NOT.
present(update_acount_in))
then 42 update_acount = .true.
44 update_acount = update_acount_in
58 sc_index_vi = sc_index + 6
63 #ifdef ENABLE_ACTION_MSGS 64 if (nclayer_enable_action)
then 65 call nclayer_actionm(
"nc_diag_metadata_resize_byte: doing reallocation!")
83 integer(i_llong),
intent(in) :: addl_num_entries
84 logical,
intent(in),
optional :: update_acount_in
89 integer(i_long) :: sc_index
90 integer(i_long) :: sc_index_vi
92 logical :: update_acount
95 if (.NOT.
present(update_acount_in))
then 96 update_acount = .true.
98 update_acount = update_acount_in
112 sc_index_vi = sc_index + 6
117 #ifdef ENABLE_ACTION_MSGS 118 if (nclayer_enable_action)
then 119 call nclayer_actionm(
"nc_diag_metadata_resize_short: doing reallocation!")
137 integer(i_llong),
intent(in) :: addl_num_entries
138 logical,
intent(in),
optional :: update_acount_in
146 integer(i_long) :: sc_index
147 integer(i_long) :: sc_index_vi
150 character(len=200) :: debugstr
153 logical :: update_acount
156 if (.NOT.
present(update_acount_in))
then 157 update_acount = .true.
159 update_acount = update_acount_in
176 sc_index_vi = sc_index + 6
182 write (debugstr,
"(A, I1, A, I7, A, I7)")
"In sc_index ", sc_index,
", the acount/asize is: ",
diag_metadata_store%acount(sc_index),
"/",
diag_metadata_store%asize(sc_index)
183 call nclayer_debug(debugstr)
188 call nclayer_debug(
"acount < asize, reallocating.")
189 print *,
"Start long realloc..." 191 #ifdef ENABLE_ACTION_MSGS 192 if (nclayer_enable_action)
then 193 call nclayer_actionm(
"nc_diag_metadata_resize_long: doing reallocation!")
202 print *,
"alloc_m_multi increased to:" 216 integer(i_llong),
intent(in) :: addl_num_entries
217 logical,
intent(in),
optional :: update_acount_in
222 integer(i_long) :: sc_index
223 integer(i_long) :: sc_index_vi
225 logical :: update_acount
228 if (.NOT.
present(update_acount_in))
then 229 update_acount = .true.
231 update_acount = update_acount_in
245 sc_index_vi = sc_index + 6
251 print *,
"realloc needed for metadata rsingle!" 254 #ifdef ENABLE_ACTION_MSGS 255 if (nclayer_enable_action)
then 256 call nclayer_actionm(
"nc_diag_metadata_resize_rsingle: doing reallocation!")
274 integer(i_llong),
intent(in) :: addl_num_entries
275 logical,
intent(in),
optional :: update_acount_in
280 integer(i_long) :: sc_index
281 integer(i_long) :: sc_index_vi
283 logical :: update_acount
286 if (.NOT.
present(update_acount_in))
then 287 update_acount = .true.
289 update_acount = update_acount_in
302 sc_index_vi = sc_index + 6
307 #ifdef ENABLE_ACTION_MSGS 308 if (nclayer_enable_action)
then 309 call nclayer_actionm(
"nc_diag_metadata_resize_rdouble: doing reallocation!")
327 integer(i_llong),
intent(in) :: addl_num_entries
328 logical,
intent(in),
optional :: update_acount_in
333 integer(i_long) :: sc_index
334 integer(i_long) :: sc_index_vi
336 logical :: update_acount
339 if (.NOT.
present(update_acount_in))
then 340 update_acount = .true.
342 update_acount = update_acount_in
355 sc_index_vi = sc_index + 6
360 #ifdef ENABLE_ACTION_MSGS 361 if (nclayer_enable_action)
then 362 call nclayer_actionm(
"nc_diag_metadata_resize_string: doing reallocation!")
378 integer(i_llong),
intent(in) :: addl_num_entries
380 type(diag_md_iarr),
dimension(:),
allocatable :: tmp_stor_i_arr
382 #ifdef ENABLE_ACTION_MSGS 383 if (nclayer_enable_action)
then 384 call nclayer_actionm(
"nc_diag_metadata_resize_iarr_type: doing reallocation!")
394 deallocate(tmp_stor_i_arr)
398 integer(i_long),
intent(in) :: iarr_index
399 integer(i_llong),
intent(in) :: addl_num_entries
400 logical,
intent(in),
optional :: update_icount_in
402 logical :: update_icount
404 integer(i_llong) :: addl_num_entries_r
407 if (.NOT.
present(update_icount_in))
then 408 update_icount = .true.
410 update_icount = update_icount_in
418 print *,
"realloc needed for metadata iarr!" 423 #ifdef ENABLE_ACTION_MSGS 424 if (nclayer_enable_action)
then 425 call nclayer_actionm(
"nc_diag_metadata_resize_iarr: doing reallocation!")
428 if (update_icount)
then 434 print *,
" ** addl_num_entries_r = " 435 print *, addl_num_entries_r
440 print *,
" ** realloc done" subroutine nc_diag_metadata_resize_rdouble(addl_num_entries, update_acount_in)
integer(i_long), parameter nlayer_multi_base
integer, parameter, public i_byte
type(diag_metadata), allocatable diag_metadata_store
integer, parameter, public i_long
subroutine nc_diag_metadata_resize_rsingle(addl_num_entries, update_acount_in)
subroutine nc_diag_metadata_resize_string(addl_num_entries, update_acount_in)
subroutine nc_diag_metadata_resize_long(addl_num_entries, update_acount_in)
subroutine nc_diag_metadata_resize_iarr_type(addl_num_entries)
subroutine nc_diag_metadata_resize_byte(addl_num_entries, update_acount_in)
integer, parameter, public i_short
subroutine nc_diag_metadata_resize_short(addl_num_entries, update_acount_in)
integer(i_short), parameter nlayer_default_ent
integer, parameter, public r_double
integer, parameter, public r_single
integer, parameter, public i_llong
subroutine nc_diag_metadata_resize_iarr(iarr_index, addl_num_entries, update_icount_in)