After @JohnBollinger: (untested, obviously)
unsigned ix, iy;
for(iy=0;iy<Ny;iy++) {
unsigned yl,yh;
yl = (iy -1) %Ny; yh = (iy +1) %Ny;
for(ix=0;ix<Nx;ix++) {
unsigned xl,xh;
xl = (ix -1) %Nx; xh = (ix +1) %Nx;
yl = (iy -1) %Ny; yh = (iy +1) %Ny;
pudx = (u[xh][iy] + u[xh][iy] - 2.0*u[ix][iy])/(calc1);
pudy = (u[ix][yh] + u[ix][yl] - 2.0*u[ix][iy])/(calc2);
u_new[ix][iy] = 2.0*u[ix][iy] - u_old[ix][iy] + calc*(pudx+pudy);
}
}