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_data2d_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_data2d_resize_short: doing reallocation!")
129 print *,
"nc_diag_data2d_resize_short: allocate NEW m_short" 140 integer(i_llong),
intent(in) :: addl_num_entries
141 logical,
intent(in),
optional :: update_acount_in
149 integer(i_long) :: sc_index
150 integer(i_long) :: sc_index_vi
153 character(len=200) :: debugstr
156 logical :: update_acount
159 if (.NOT.
present(update_acount_in))
then 160 update_acount = .true.
162 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_data2d_store%acount(sc_index),
"/",
diag_data2d_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_data2d_resize_long: doing reallocation!")
202 print *,
"alloc_m_multi increased to:" 208 print *,
"nc_diag_data2d_resize_long: allocate NEW m_long" 219 integer(i_llong),
intent(in) :: addl_num_entries
220 logical,
intent(in),
optional :: update_acount_in
225 integer(i_long) :: sc_index
226 integer(i_long) :: sc_index_vi
228 logical :: update_acount
231 if (.NOT.
present(update_acount_in))
then 232 update_acount = .true.
234 update_acount = update_acount_in
248 sc_index_vi = sc_index + 6
254 print *,
"realloc needed for data2d rsingle!" 257 #ifdef ENABLE_ACTION_MSGS 258 if (nclayer_enable_action)
then 259 call nclayer_actionm(
"nc_diag_data2d_resize_rsingle: doing reallocation!")
277 integer(i_llong),
intent(in) :: addl_num_entries
278 logical,
intent(in),
optional :: update_acount_in
283 integer(i_long) :: sc_index
284 integer(i_long) :: sc_index_vi
286 logical :: update_acount
289 if (.NOT.
present(update_acount_in))
then 290 update_acount = .true.
292 update_acount = update_acount_in
305 sc_index_vi = sc_index + 6
310 #ifdef ENABLE_ACTION_MSGS 311 if (nclayer_enable_action)
then 312 call nclayer_actionm(
"nc_diag_data2d_resize_rdouble: doing reallocation!")
330 integer(i_llong),
intent(in) :: addl_num_entries
331 logical,
intent(in),
optional :: update_acount_in
336 integer(i_long) :: sc_index
337 integer(i_long) :: sc_index_vi
339 logical :: update_acount
342 if (.NOT.
present(update_acount_in))
then 343 update_acount = .true.
345 update_acount = update_acount_in
358 sc_index_vi = sc_index + 6
363 #ifdef ENABLE_ACTION_MSGS 364 if (nclayer_enable_action)
then 365 call nclayer_actionm(
"nc_diag_data2d_resize_string: doing reallocation!")
381 integer(i_llong),
intent(in) :: addl_num_entries
383 type(diag_d2d_iarr),
dimension(:),
allocatable :: tmp_stor_i_arr
385 #ifdef ENABLE_ACTION_MSGS 386 if (nclayer_enable_action)
then 387 call nclayer_actionm(
"nc_diag_data2d_resize_iarr_type: doing reallocation!")
397 deallocate(tmp_stor_i_arr)
401 integer(i_long),
intent(in) :: iarr_index
402 integer(i_llong),
intent(in) :: addl_num_entries
403 logical,
intent(in),
optional :: update_icount_in
405 logical :: update_icount
407 integer(i_llong) :: addl_num_entries_r
410 if (.NOT.
present(update_icount_in))
then 411 update_icount = .true.
413 update_icount = update_icount_in
421 print *,
"realloc needed for data2d iarr!" 422 write (*,
"(A, I0, A, I0, A)")
"(size needed / size available: ",
diag_data2d_store%stor_i_arr(iarr_index)%icount,
" / ",
diag_data2d_store%stor_i_arr(iarr_index)%isize,
")" 426 #ifdef ENABLE_ACTION_MSGS 427 if (nclayer_enable_action)
then 428 call nclayer_actionm(
"nc_diag_data2d_resize_iarr: doing reallocation!")
432 if (update_icount)
then 438 print *,
" ** addl_num_entries_r = " 439 print *, addl_num_entries_r
444 print *,
" ** realloc done" 451 if (update_icount)
diag_data2d_store%stor_i_arr(iarr_index)%icount = addl_num_entries
type(diag_data2d), allocatable diag_data2d_store
integer(i_long), parameter nlayer_multi_base
integer, parameter, public i_byte
integer, parameter, public i_long
subroutine nc_diag_data2d_resize_iarr_type(addl_num_entries)
subroutine nc_diag_data2d_resize_rdouble(addl_num_entries, update_acount_in)
subroutine nc_diag_data2d_resize_rsingle(addl_num_entries, update_acount_in)
subroutine nc_diag_data2d_resize_byte(addl_num_entries, update_acount_in)
subroutine nc_diag_data2d_resize_long(addl_num_entries, update_acount_in)
subroutine nc_diag_data2d_resize_iarr(iarr_index, addl_num_entries, update_icount_in)
subroutine nc_diag_data2d_resize_short(addl_num_entries, update_acount_in)
integer, parameter, public i_short
integer(i_short), parameter nlayer_default_ent
subroutine nc_diag_data2d_resize_string(addl_num_entries, update_acount_in)
integer, parameter, public r_double
integer, parameter, public r_single
integer, parameter, public i_llong