subroutine ndarray_oc_dump_all_hook(pf, lev, state)
type(pf_pfasst_t), intent(inout) :: pf
class(pf_level_t), intent(inout) :: lev
type(pf_state_t), intent(in) :: state
character(len=256) :: fnamey, fnamep
integer :: m
type(ndarray_oc), pointer :: qend
do m=1, lev%nnodes
qend => cast_as_ndarray_oc(lev%Q(m))
write(fnamey, "('y_s',i0.2,'l',i0.2,'m',i0.2,'.npy')") &
state%step, lev%index, m
call ndarray_dump_numpy(trim(pf%outdir)//c_null_char,trim(fnamey)//c_null_char, '<f8'//c_null_char//c_null_char, &
qend%dim,qend%shape, size(qend%yflatarray), qend%yflatarray)
write(fnamep, "('p_s',i0.2,'l',i0.2,'m',i0.2,'.npy')") &
state%step, lev%index, m
call ndarray_dump_numpy(trim(pf%outdir)//c_null_char,trim(fnamep)//c_null_char, '<f8'//c_null_char//c_null_char, &
qend%dim, qend%shape, size(qend%pflatarray), qend%pflatarray)
end do
end subroutine ndarray_oc_dump_all_hook