function d_3D = convert_vec_to_3D( grid, d_vec)
d_3D = zeros( grid.nx, grid.ny, grid.nz);
for i = 1: grid.nx
  for j = 1: grid.ny
    for k = 1: grid.nz
      rc = grid.ijk2rc( i,j,k);
      d_3D( i,j,k) = d_vec( rc);
    end
  end
end
end