Your code is not really properly formatted.
Furthermore, starting with a zero fluid flow (unm1=0), and without a ramping in time for the inlet:
you will get a pressure shock in the first time steps.
I would suggest that you ramp up the inflow gradually (see: Nonzero pressure Navier Stokes - #2 by dokken)